stream transcribes one utterance. It returns partial text while audio arrives. When speech ends, end the audio source, read the final result, and let the stream complete. transcribe sends one complete WAV file and returns only the final result. This reference lists the methods, options, defaults, and errors. For walkthroughs and complete programs, see the SDK guides and examples.
Call stream
Each example below starts one stream with a 120-second overall timeout and reads every update.client is an open client, and source is an audio source. Options by language gives the source type for each language.
Call transcribe
transcribe sends one complete WAV file and returns one final transcript, with no partial updates. Each example below transcribes audio, the bytes of a WAV file, with a 120-second overall timeout.
The call works this way in every SDK:
Guides and examples
The Rime SDK repository keeps the STT guide and a runnable example for each language next to the SDK source. Each example transcribes a headerless PCM16 recording and prints every update.
To try STT on a hosted sample recording first, follow the speech-to-text quickstart.
Connection and credentials
Recognition options
Every call needs a language tag. The other options are optional.
The SDK sends the language tag to the service without changes, and the service validates it. Recognition settings explains how the language, mode, and context terms change the transcript, and which values the service rejects. In the input format, headerless PCM16 means signed 16-bit little-endian samples. Set the input format to match your source audio. The option names and types differ by SDK language, as the next section shows.
Options by language
- Python
- Node.js / TypeScript
- Go
- Rust
Call
client.stt.stream(source, language="en", ...) without await. The call returns a transcript stream, and network work starts when you enter its async context or read the first result.Import
PCMFormat and TranscriptionMode from rimelabs_sdk. The source and the results use these types:Audio formats and source completion
Partial and final results
Each update contains the complete current transcript, so replace the previous text with each update, and do not append. How a transcription works explains partial and final transcripts. The results of an SDK stream also behave this way:Timeouts and limits
Service limits apply to every stream, whatever you set in the SDK, and Errors and limits lists them all. For example, a stream fails after 15 seconds without audio. Silence counts as audio, so keep sending silence through pauses. Passtimeout to set an overall deadline for one stream. There is no overall deadline by default. The deadline covers connecting, sending, and reading, and it includes the time that your source or your reader spends waiting. It stays active until you read the final transcript. In every SDK, the clock starts when work starts:
The SDK also enforces these limits, whatever your timeout is. Each limit applies in all four languages, unless its row says something different:
Cancel and clean up
When you cancel one stream, the other streams stay active. When you close the client, all its operations stop. A source that owns a device must handle cancellation and release its resources. Each SDK cancels a stream this way:Errors
Every SDK failure belongs to one error category, so branch on the category, not on the message text. The SDK does not retry a failed stream or send its audio again. Decide whether to retry tells which categories are worth a new stream.
Python and Node.js errors inherit from
RimeError. In Rust, call error.kind() for the category. Keep the request ID of every stream, and include it when you report a failure. Each SDK gives the request ID this way:

