v

latestOpenAPI 3.1.02026-08-0814845.6 KB

Open a realtime transcription WebSocket

Upgrade to WebSocket, then send {"type":"config","language":"en","interimResults":true} as the first text frame, within five seconds. The type field is required: without it the router answers {"type":"error","code":"INVALID_CONFIG"} and closes. UNKNOWN FIELDS ARE REJECTED: a config frame carrying a key this route does not define answers the same INVALID_CONFIG error and closes, where it used to be accepted and ignored. The transcription options are diarize (diarization), wordTimestamps, smartFormat, detectLanguage and languageHints, each also accepted in snake_case, and they mean what the query parameters of the same name mean on the buffered routes. When no available provider can serve one over a socket the router answers {"type":"error","code":"UNSUPPORTED_FEATURE"} naming the option and closes, rather than streaming without it. providerOptions forwards provider-specific settings namespaced by provider name, exactly as the X-Speko-Provider-Options header does on the buffered routes and under the same 4096-byte ceiling and the same allow-lists; an unreadable document, an unknown provider or an unforwardable setting answers INVALID_CONFIG naming it, while settings for a provider this socket does not dial are ignored. interim_results is accepted as an alias. sttOptions.language, when present, overrides language. The router answers {"type":"ready","provider":"..."}, then send 16 kHz mono 16-bit signed little-endian PCM as binary frames with no WAV header, and finish with {"type":"end"}. Transcripts come back as TranscriptFrame objects: {"type":"transcript","text":"...","isFinal":bool,"confidence":number,"words":[...]|null}, plus "language" when the serving provider names one in the frame. Partials replace the previous partial rather than appending, words included. Browsers offer speko.realtime.v1 and speko.ephemeral.<credential> as subprotocols.

get/v1/transcribe/stream

Response

Error