public stream(notnull microphone as Microphone, notnull language as String = "auto", minimumSpeechLevel as Double = 0.0003, partialResults as Boolean = true) as TranscriptionStream
Starts one bounded, cancellable live transcription worker. Partial text replaces the same segmentId; final text commits it. Call microphone.stop() for a normal drain/final result; cancel() discards pending hypotheses. The microphone stays caller-owned and must outlive the stream.
| Parameter | Description |
|---|---|
microphone | Explicitly opened mono 16 kHz capture source. |
language | auto or a supported code. |
minimumSpeechLevel | Finite RMS floor in [0, 1], default 0.0003. Zero disables energy gating, allowing the model to decide whether quiet audio contains speech. The adaptive noise estimate starts at floor/3. |
partialResults | Emit intermediate hypotheses, default true. False performs inference only at utterance boundaries/stop, without dropping PCM. |
Owned single-consumer stream; close it before closing the microphone.
try microphone = Microphone.open(): try updates = speech.stream(microphone, "fr"): for update in updates: print(update.text)