Skip to main content

Realtime media

Sellable product

This capability is granted by an API key scoped to the `` product (product face). See the product reference below.

Real-time conversational media primitives as a shared capability. v1 ships SEMANTIC TURN-DETECTION: given a window of the caller's recent speech (16 kHz mono PCM16), it returns the probability the speaker has finished their turn — a learned semantic endpointer that replaces naive silence/energy VAD (which cuts users off mid-sentence). Stateless + synchronous (~12 ms CPU inference); the caller (voice-gateway / aakhara) feeds a rolling audio window and gates barge-in / response-start on the result. Later waves add VAD de-stub, backchannel/filler cues, and echo/PLC — same capability.

  • Group: Voice & AI
  • Contract: contracts/realtime-media/v1/openapi.yaml
  • Public base: https://api.vagarylabs.com (the consolidated API gateway — one host, per-brand sibling api.<zone>)
  • Auth: a product API key (vgk_…) issued from the console — Authorization: Bearer vgk_…
  • Product face (customer-keyed):
    • https://api.vagarylabs.com/product/v1/realtime/vad

Endpoints

MethodPathSummary
POST/v1/turn/detectSemantic turn-detection over a window of recent caller speech (Smart-Turn v3)
POST/v1/turn/detect_semanticSemantic (text) turn-detection over the running transcript (livekit EOU transformer)
POST/v1/vad/analyzeAcoustic voice-activity over a window of recent caller audio (pipecat-harvested Silero VAD)
POST/v1/denoiseReal-time speech noise-suppression over a window of caller audio (DTLN-harvested denoiser)
POST/v1/echo/cancelAcoustic echo cancellation over aligned near-end (mic) + far-end (reference) PCM16 audio
POST/v1/plc/concealPacket-loss concealment — reconstruct a PCM16 stream, synthesizing the lost frames
POST/v1/ambience/mixMix a low background-ambience bed under OUTBOUND agent speech (PCM16). Flag-gated
GET/healthliveness + model-loaded state
GET/metricsPrometheus exposition (fleet observability SDK — fail-open)

Schemas

TurnDetectRequest

FieldTypeDescription
audio_base64stringbase64 of raw mono PCM16 (signed 16-bit little-endian) at sample_rate. Most-recent speech.
sample_rateintegerinput sample rate in Hz. Resampled to 16000 if different (linear).
organization_idstringproduct-tier end-customer tenant (I6); optional in v1 (accounting/label only, no store).

TurnDetectResponse

FieldTypeDescription
is_completebooleanprobability > 0.5 — the speaker has likely finished their turn
probabilitynumbersigmoid turn-completion probability in [0,1]
inference_msnumberwall-clock inference latency
samplesintegerinput sample count (post-resample

SemanticTurnDetectRequest

FieldTypeDescription
chat_ctxarrayrecent conversation turns (only user/assistant roles are scored; the last MAX_TURNS are kept). Adjacent same-role turns are combined to match the model's training data.
organization_idstringproduct-tier end-customer tenant (I6); optional in v1 (accounting/label only, no store).

SemanticTurnDetectResponse

FieldTypeDescription
eou_probabilitynumberend-of-utterance probability in [0,1] (higher ⇒ turn complete)
is_completebooleaneou_probability > threshold — the speaker has likely finished their turn
inference_msnumberwall-clock inference latency
turnsintegernumber of user/assistant turns scored (post-filter
backendstringthe turn-detection backend that produced this result

VADAnalyzeRequest

FieldTypeDescription
audio_base64stringbase64 of raw mono PCM16 (signed 16-bit little-endian). Recent caller audio window.
sample_rateintegerinput sample rate in Hz. 8000 and 16000 are fed to Silero directly; any other rate is resampled to 16000 (linear) first. Must contain at least one VAD frame (512 samples @16k / 256 @8k).
organization_idstringproduct-tier end-customer tenant (I6); optional in v1 (accounting/label only, no store).

VADAnalyzeResponse

FieldTypeDescription
statestringterminal VAD hysteresis state after consuming the window.
is_speechbooleantrue when state != quiet (voice activity present)
frames_analyzedintegernumber of fixed VAD frames consumed from the window
sample_rateintegersample rate the window was analyzed at (post-resample)
inference_msnumberwall-clock analyze latency

DenoiseRequest

FieldTypeDescription
audio_base64stringbase64 of raw mono PCM16 (signed 16-bit little-endian) at sample_rate. Recent caller audio window.
sample_rateintegerinput sample rate in Hz. DTLN is 16 kHz-fixed: the window is resampled to 16 kHz for denoising and the cleaned audio is resampled back to this rate. Must contain at least one 512-sample denoise block at 16 kHz.
organization_idstringproduct-tier end-customer tenant (I6); optional in v1 (accounting/label only, no store — never read by the handler).

DenoiseResponse

FieldTypeDescription
audio_base64stringbase64 of the denoised mono PCM16 (signed 16-bit little-endian), at sample_rate (round-tripped to the input rate).
sample_rateintegersample rate of the returned audio (equals the input rate)
frames_processedintegernumber of 512/128 overlap-add blocks processed at 16 kHz
inference_msnumberwall-clock denoise latency

Generated by scripts/gen-capability-docs.py from contracts/realtime-media/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.