Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
AssemblyAISTT
Speech-to-text with AssemblyAI’s streaming Universal models, using your own AssemblyAI key. Good for accurate real-time transcription with built-in end-of-turn detection, in English or multilingual. Authenticates with ASSEMBLYAI_API_KEY from your environment, or an explicitapi_key.
Fields
Sample rate of incoming audio in Hz. Leave unset to detect it automatically. Defaults to None (not set).
Sample rate in Hz to send to AssemblyAI, 8000 to 96000. Leave unset to send audio at the rate it arrives, with no resampling. Defaults to None (not set).
Encoding of the audio sent to AssemblyAI. Only “pcm_s16le” (16-bit little-endian PCM) is supported. Defaults to ‘pcm_s16le’.
Whether finished turns come back with punctuation and casing applied. Universal-3 Pro models always format turns and ignore this. Defaults to True.
Words or phrases to boost recognition of, such as product names, jargon or proper nouns. Defaults to None (not set).
Confidence, 0 to 1, needed to end a turn; higher waits for more certainty. Universal-streaming models only (0.5 used when unset); Pro models ignore it. Defaults to None (not set).
Silence in milliseconds before a confident end of turn is finalized. When unset, universal-streaming models use 800. Defaults to None (not set).
Silence in milliseconds after which a turn ends regardless of confidence. When unset, universal-streaming models use 2000. Defaults to None (not set).
Literal['universal-streaming-english', 'universal-streaming-multilingual', 'universal-3-5-pro', 'universal-3-6-pro', 'u3-rt-pro', 'u3-rt-pro-beta-1']
default:"UNSET"
Recognition model: “universal-streaming-english”, “universal-streaming-multilingual”, or Universal-3 Pro “universal-3-5-pro” / “universal-3-6-pro”. (“u3-rt-pro” is a retired alias). Defaults to ‘universal-streaming-english’.
Whether to detect the spoken language automatically. Supported by the multilingual model. Defaults to False.
Expected language or languages, e.g. “es” or [“en”, “es”]. Up to 10 ISO 639-1 codes; “multi” cannot be combined with others. Defaults to None (not set).
Accuracy versus latency preset: “min_latency”, “balanced” or “max_accuracy”. Universal-3 Pro models only. Defaults to None (not set).
Free-text description of the audio, such as topic or vocabulary, used to steer transcription. Universal-3 Pro models only. Defaults to None (not set).
What the agent just said, used to improve transcription of the user’s reply. Universal-3 Pro models only, up to 1750 characters. Defaults to None (not set).
How many earlier conversation turns are carried forward as context for transcription. 0 turns this off. Defaults to None (not set).
Whether to send extra partial transcripts at a steady pace during long turns. Defaults to None (not set).
How soon the first early partial transcript arrives, in milliseconds. Lower reacts faster to barge-in; higher is more reliable. Defaults to None (not set).
Voice activity sensitivity, 0 to 1. Lower values pick up quieter speech. Defaults to None (not set).
Isolate the main speaker and suppress background noise. Use “near-field” for headsets and phones, “far-field” for rooms and laptop mics. Defaults to None (not set).
How aggressively background audio is suppressed, 0 to 1. Requires voice_focus. Defaults to None (not set).
Start generating a reply from early transcripts before the turn ends, to cut response latency. Only helps on universal-streaming models. Defaults to False.
Data region for the AssemblyAI endpoint, “US” or “EU”. Ignored when base_url is set. Defaults to ‘US’.
Custom streaming endpoint URL, e.g. for a private deployment. Overrides region. Defaults to None (not set).
Deprecated; use min_turn_silence. If set, it takes precedence over min_turn_silence. Defaults to None (not set).