TtsApi class
Text-to-speech synthesis and playback.
Constructors
- TtsApi()
-
Bind the namespace. Reach it through
RunAnywhere.tts.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
playbackProgress
→ Stream<
double> -
Playback position of speak in
[0.0, 1.0].no setter -
playbackState
→ Stream<
bool> -
Whether speak is currently playing audio. The SDK owns playback, so
this is the only way a UI can follow it.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
speak(
String text, {TtsOptions? options}) → SpeechHandle -
Synthesize
textand play it through the device speaker, returning immediately with a handle to the in-flight utterance. -
stop(
) → Future< void> - Stop playback and any in-flight synthesis.
-
synthesize(
String text, {TtsOptions? options}) → Future< Audio> -
Synthesize
textinto one audio buffer. -
synthesizeStream(
String text, {TtsOptions? options}) → Stream< AudioChunk> -
Synthesize
textand emit audio chunks as they are produced. -
toString(
) → String -
A string representation of this object.
inherited
-
voices(
) → Future< List< Voice> > - Voices the loaded model offers.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited