SpeechSynthesizer class abstract

Represents a text-to-speech model instance.

Sibling of SpeechRecognizer. Note sampleRate is an intentional divergence: STT consumes caller-supplied audio, TTS produces it, so the caller must be told the rate to play it or wrap it in WAV.

Constructors

SpeechSynthesizer()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sampleRate → int
Output sample rate, Hz.
no setter

Methods

addCloseListener(void listener()) → void
See InferenceModel.addCloseListener.
close() → Future<void>
Close the TTS model and release resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
synthesize(String text) → Future<Uint8List>
Synthesize text to 16-bit little-endian mono PCM at sampleRate. Batch (full text → full audio) for now; streaming is a follow-on.
toString() → String
A string representation of this object.
inherited

Operators

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