Skip to navigation

WebSockets

The channel for streaming audio and receiving transcription results. model is required. Connect Finch-Indic (finch_indic_1.0) to wss://in.api.murf.ai/v1/transcription/stream-input, and Finch-Global (finch_global_1.0) to wss://us-east.api.murf.ai/v1/transcription/stream-input. Authenticate with your API key (query or header). See bindings below.

Each model is valid only on its host. Finch-Indic is served at wss://in.api.murf.ai/v1/transcription/stream-input. Finch-Global is served at wss://us-east.api.murf.ai/v1/transcription/stream-input.

Handshake

WSS
wss://in.api.murf.ai/v1/transcription/stream-input

Headers

api-keystringOptional

Your Murf API key (hyphenated header name).

Query parameters

api_keystringOptional

Your Murf API key. Required unless you send the api-key header.

modelenumRequired

Required. finch_indic_1.0 (Finch-Indic) is served only at wss://in.api.murf.ai/v1/transcription/stream-input. finch_global_1.0 (Finch-Global) is served only at wss://us-east.api.murf.ai/v1/transcription/stream-input. Each model is valid only on its host.

Allowed values:
languagestringOptionalDefaults to auto

Language of the audio, scoped to the connected model. Finch-Indic (finch_indic_1.0): one of en_IN (English, India), as (Assamese), bn (Bengali), gu (Gujarati), hi (Hindi), kn (Kannada), ml (Malayalam), mr (Marathi), or (Odia), pa (Punjabi), ta (Tamil), te (Telugu); auto (default) to detect from every Indic language; or a comma-separated list such as hi,en_IN to detect from a smaller set. Each value also accepts the India region, for example hi_IN or en-IN. Finch-Global (finch_global_1.0): one of en (English, US/UK/AU), de (German), es (Spanish), fr (French), it (Italian), pt (Portuguese), nl (Dutch); auto (default) to detect from every Finch-Global language; or a comma-separated list such as fr,en to detect from a smaller set.

keywordsstringOptional

Comma-separated words or phrases to boost during recognition. URL-encode spaces (for example voice%20clone).

alphadoubleOptional0-1Defaults to 0.5

How strongly to boost keywords. Higher values increase their influence.

text_formattingbooleanOptionalDefaults to false

Set to true to format numbers and similar terms in Hindi and English (India) transcripts. Has no effect for other languages.

commit_modeenumOptionalDefaults to vad

Default vad: the server ends each turn when the caller pauses. Set manual only if the client decides end of turn. Any other value closes the connection with 4002.

Allowed values:
bvcbooleanOptionalDefaults to false

Set to true to remove background voices before transcription.

Send

setAudioConfigurationobjectRequired

Optional. Send once, as the first text message, before any binary audio. If omitted, the server expects 16-bit PCM, 16 kHz, mono.

OR
AudiostringRequiredformat: "binary"

Binary WebSocket frames, encoded as declared in AudioConfig (or raw 16-bit PCM, 16 kHz, mono if no AudioConfig was sent). For Opus, send one Opus packet per frame, without an Ogg or WebM container.

OR
FinalizeobjectRequired

Flush pending speech immediately and send a final message with rawEvent.event set to EndOfTurn and rawEvent.trigger set to manual. The connection stays open; audio sent afterwards starts the next turn. rawEvent.turn_index goes up by one, rawEvent.sequence_id keeps counting, and audio_window_start / audio_window_end stay relative to the start of the session.

OR
CloseStreamobjectRequired

Flush pending speech, send a final message if a turn is still open, then close the WebSocket with code 1000.

OR
KeepAliveobjectRequired
Send while you are not sending audio to stop the connection from closing due to inactivity.

Receive

PartialobjectRequired

Sent while the caller is speaking. Each partial contains the whole turn up to that point, so replace the text you are showing instead of appending to it. Word timestamps are not included.

OR
FinalobjectRequired

Sent when the caller pauses, or after Finalize or CloseStream. Use transcript as the caller’s utterance, and read rawEvent.words for word timestamps. If there was no pending speech, transcript is empty.

OR
QuotaWarningobjectRequired
Sent at most once per session when remaining funds reach the warning threshold. The stream stays open until credits run out or the client closes it.
OR
ErrorobjectRequired

Sent immediately before the server closes the WebSocket. The close code identifies the cause: 4001 invalid or missing API key; 4002 invalid audio config, undecodable audio, invalid JSON, or invalid query parameter; 4003 insufficient credits at connect; 4004 concurrency limit reached; 4005 credits exhausted mid-session; 4006 API key revoked mid-session; 4008 no audio or KeepAlive (initial_timeout or idle_timeout); 4010 billing service unreachable at connect; 4011 speech detection unavailable at connect.