Skip to main content

Module speech

Module speech 

Source
Expand description

Speech input: capture audio, recognize it and hand the text to the caller.

SpeechState owns a session and SpeechButton, SpeechIndicator and SpeechWaveform render it. Recognition and audio capture are both replaceable: implement SpeechRecognizer to use any speech service and AudioInput to feed audio from anywhere.

With the speech feature, a state without its own recognizer falls back to the SystemRecognizer of macOS or Windows, and captures from the Microphone. Linux has no system recognizer, so speech input works there only with an application recognizer.

Structs§

AudioFormat
The PCM format a SpeechRecognizer consumes.
AudioSink
Where an AudioInput delivers captured audio.
SpeechButton
The button that starts and stops a SpeechState’s session.
SpeechIndicator
What a stop button shows while a SpeechState captures: bars that rise and fall with the voice, so the button reads as listening rather than as a media control, turning into a stop glyph while the pointer is over it.
SpeechSink
Where a SpeechRecognizer reports its session’s progress.
SpeechState
The state of a speech input: captures audio from an AudioInput, feeds it to a SpeechRecognizer and tracks the transcript.
SpeechWaveform
A live waveform of a SpeechState’s input levels.

Enums§

SpeechError
Why a speech session failed.
SpeechEvent
Events emitted by SpeechState.
SpeechStatus
Where a SpeechState is in its session.

Traits§

AudioInput
A source of audio for a SpeechState, such as the microphone.
RecognitionSession
One running recognition, opened by SpeechRecognizer::start.
SpeechRecognizer
Turns speech into text, e.g. by streaming audio to a cloud service.