createStreamingSTT()
Creates a streaming (online) STT engine for real-time recognition with partial results and endpoint detection. Use this for live transcription from microphones or audio streams.Parameters
Streaming STT initialization options. See StreamingSttInitOptions.
Returns
Promise resolving to aStreamingSttEngine instance.
Example
StreamingSttEngine
Streaming STT engine interface returned bycreateStreamingSTT().
Properties
Unique identifier for this engine instance.
Methods
createStream()
Create a new recognition stream for this engine. Multiple streams can be active simultaneously.Optional hotwords/keywords string for contextual biasing (transducer/nemo_transducer only).
SttStream instance.
Example:
destroy()
Release native recognizer and all streams. Cannot be used after calling this.SttStream
Streaming recognition stream. Created byStreamingSttEngine.createStream().
Properties
Unique identifier for this stream.
Methods
acceptWaveform()
Feed PCM audio samples to the stream.PCM audio samples as float values in range [-1, 1].
Sample rate in Hz (typically 16000).
isReady()
Check if there’s enough audio to run decoding.true if decode can be called.
decode()
Run decoding on accumulated audio. Call whenisReady() returns true.
getResult()
Get current partial or final recognition result. Call afterdecode().
StreamingSttResult.
Example:
isEndpoint()
Check if endpoint (end of utterance) was detected based on configured rules.true if endpoint detected.
Example:
reset()
Reset stream state for reuse (clears audio buffer and recognition state).inputFinished()
Signal that no more audio will be fed to the stream.release()
Release native stream resources. Do not use the stream after calling this.processAudioChunk()
Convenience method that feeds audio, auto-decodes while ready, and returns result with endpoint status. Reduces bridge round-trips from 5 to 1 per chunk.PCM audio samples. Automatically normalized if
enableInputNormalization was true (default).Sample rate in Hz.
result and isEndpoint boolean.
Example:
Utility Functions
mapDetectedToOnlineType()
Map detected offline STT model type to streaming (online) model type. Throws if model doesn’t support streaming.getOnlineTypeOrNull()
Returns streaming model type for a detected model, ornull if streaming is not supported.