Speech-to-Text

WebSocket Speech-to-Text (Live streaming)

Changed on

Real-time Arabic transcription over WebSocket: interim and final results with word timestamps and confidence, turn detection, and per-turn sentiment and speaker gender. Audio is sent as binary frames; controls and events are JSON text frames. The full message contract is in asyncapi.json (channel "listen"). Supersedes the deprecated WS /websocket/speech-to-text.

get/listen

Request

  • Base URL
    https://api.munsit.com/api/v1
  • URL
    https://api.munsit.com/api/v1/listen
  • Auth
    API key in header x-api-key

Query parameters

api_keystring

API key, for browser clients that cannot set headers. Takes precedence if several auth methods are supplied.

x-api-keystring

API key as a query parameter. Also accepted as a header (see security).

encoding'linear16' | 'mulaw' | 'alaw'

Encoding of the binary audio frames.

sample_rate8000 | 16000

Sample rate of the audio you send.

channels1 | 2

1 (mono) or 2 (stereo, interleaved). With 2, each channel is transcribed independently.

language'auto' | 'ar' | 'en' | 'ar-en'

Transcription language. The munsit model is Arabic only (ar). The munsit-en-ar model defaults to auto (detect the language as the audio goes) and also accepts ar or en to set the main language of the speech; every value still handles mixed Arabic-English speech. ar-en is another name for auto. Any other value is an invalid connection parameter (error 4002, then the connection closes).

interim_resultsboolean

Emit interim (partial) results while a turn is in progress.

endpointinginteger

Milliseconds of silence that end a turn. Retunable mid-session with the Configure message.

smart_turnboolean

Gate end-of-turn on a semantic turn-completion model in addition to silence. A turn always ends after 2x the endpointing silence regardless.

timestampsboolean

Include word times and per-word confidence in Results. With false, words is an empty array and confidence is null on every result, and UtteranceEnd is still sent. With model munsit-en-ar it also skips the word-timing step, so final transcripts arrive slightly sooner.

hotwordsstring

Comma-separated custom vocabulary, URL-encoded; multi-word phrases allowed. Up to 200 entries of 40 characters each. Entries that cannot be applied are reported in Metadata.dropped_hotwords; with model munsit-en-ar none is applied.

correlation_idstring

Your identifier for this session, echoed in the opening Metadata event.

metadatastring

Base64-encoded JSON object (up to 2 KB) attached to the session.

Changes