Skip to main content
GET
Stream transcription (WebSocket)

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Query Parameters

protocol
string
default:pyai-hear-v1

Canonical frame protocol. Omit to use the same pyai-hear-v1 default.

Allowed value: "pyai-hear-v1"
model
string
default:pyai-hear

Streaming STT model.

language
enum<string>
default:auto

Omit or use auto to detect the spoken language automatically. An explicit ISO-639-1 code pins recognition for the session. Unsupported explicit values are rejected at the upgrade with 400 unsupported_language.

Available options:
auto,
en,
es,
fr,
de,
hi,
it,
pt,
nl
sample_rate
enum<integer>
default:16000

Input PCM sample rate in Hz. Send 8000 for 8 kHz telephony PCM; the service converts it before recognition and endpointing.

Available options:
8000,
16000
encoding
enum<string>
default:pcm16

Mono little-endian 16-bit PCM. Compressed audio is not supported on this stream.

Available options:
pcm16
interim_results
boolean
default:true

Emit eager partial hypotheses.

numerals
boolean

Tri-state inverse-text normalization for English final transcripts (never interim partials). true renders spoken numbers as digits (phones, currency, dates, ordinals). false keeps those spans in spoken form. Omitted keeps the live engine default: number formatting is ON for finals. Independent of smart_format.

smart_format
boolean
default:false

Opt-in English punctuation and sentence capitalization on final transcripts only. Interim partials are never formatted. May change only case and punctuation; any failure returns the unformatted final. Default false. Independent of numerals. Non-English requests are unchanged.

dictation
boolean
default:false

Opt-in spoken punctuation commands on English final transcripts only: period, comma, new paragraph, and question mark. Separate from smart_format and off by default. Interim partials are never rewritten.

drop_fillers
boolean
default:false

Opt-in stripping of filled pauses (um, uh, umm, uhh, er) on English final transcripts. Off by default. Do not enable on legal or compliance audio by default. Interim partials are never rewritten.

vocabulary
string

Optional per-session terms for known names, brands, products, and other distinctive phrases. PyAI trims entries, removes case-insensitive duplicates, and keeps the first spelling and order. Entries shorter than 4 characters, longer than 64 characters, longer than 5 words, or made only of common words are ignored. At most 5 effective terms are used. When stored vocabulary is enabled for hear_stream, request terms come first and stored suggestions fill any remaining slots. The effective list is fixed for the session and does not select transcription language. Send a comma-separated list or a JSON array string.

Maximum string length: 2048
seed
integer

Optional determinism seed for reproducible eval runs. Forwarded to the engine and honored once the engine supports it; no effect when omitted.

temperature
number

Optional sampling temperature for reproducible eval runs. Forwarded to the engine and honored once the engine supports it; no effect when omitted.

endpointing_ms
integer

Minimum trailing-pause length in milliseconds (50-5000, clamped) before an utterance may end. Turn detection may wait longer; an utterance always completes within max(endpointing_ms, 1500 ms) of streamed silence. The same setting can be changed mid-session with {"type":"config","endpointing_ms":800}. Both paths emit config_ack; assert that warnings is empty. A non-empty warnings means a value was not applied verbatim, but the session remains open. Timing counts only audio you stream, including silence, so pausing the stream pauses the clock. {"type":"commit"} still forces immediate end-of-turn on the STT socket.

Required range: 50 <= x <= 5000
call_id
string

Stable call identifier used for the post-call Recap when Recap is enabled. Omit to use the stream session id.

pack_id
string

Optional Recap pack for the post-call record.

Pattern: ^[a-z0-9_]+$
call_direction
enum<string>

Optional call direction attached to the post-call Recap.

Available options:
inbound,
outbound

Response

Switching Protocols, the streaming transcription WebSocket is open.