VoiceService class

Main voice service coordinating recording, STT, and TTS.

Constructors

VoiceService({VoiceConfig? config})

Properties

audioLevels Stream<AudioLevel>
Audio level stream (while recording).
no setter
config VoiceConfig
Current configuration.
no setter
events Stream<VoiceEvent>
Voice event stream.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state VoiceState
Current voice state.
no setter

Methods

cancelListening() Future<void>
Cancel current recording without processing.
dispose() → void
Dispose resources.
isAvailable() Future<bool>
Check if voice input is available on this platform.
listVoices() Future<List<String>>
List available TTS voices.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
speak(String text) Future<void>
Speak text using TTS.
startListening() Future<void>
Start listening for voice input.
stopListening() Future<TranscriptionResult?>
Stop listening and process the recording.
stopSpeaking() Future<void>
Stop current TTS playback.
toggle() Future<TranscriptionResult?>
Toggle listening state.
toString() String
A string representation of this object.
inherited
updateConfig(VoiceConfig newConfig) → void
Update configuration.

Operators

operator ==(Object other) bool
The equality operator.
inherited