ChromeTtsEngine class

Properties

hashCode → int
The hash code for this object.
no setterinherited
isAvailable → bool
no setter
onInstallLanguageRequest → EventStream<OnInstallLanguageRequestEvent>
Fired when a TTS client requests to install a new language. The engine should attempt to download and install the language, and call ttsEngine.updateLanguage with the result. On success, the engine should also call ttsEngine.updateVoices to register the newly available voices.
no setter
onLanguageStatusRequest → EventStream<OnLanguageStatusRequestEvent>
Fired when a TTS client requests the install status of a language.
no setter
onPause → EventStream<void>
Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
no setter
onResume → EventStream<void>
Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
no setter
onSpeak → EventStream<OnSpeakEvent>
Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object.
no setter
onSpeakWithAudioStream → EventStream<OnSpeakWithAudioStreamEvent>
Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. Differs from ttsEngine.onSpeak in that Chrome provides audio playback services and handles dispatching tts events.
no setter
onStop → EventStream<void>
Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state.
no setter
onUninstallLanguageRequest → EventStream<OnUninstallLanguageRequestEvent>
Fired when a TTS client indicates a language is no longer needed.
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
sendTtsAudio(int requestId, AudioBuffer audio) → void
Routes TTS audio from a speech engine to a client. audio An audio buffer from the text-to-speech engine.
sendTtsEvent(int requestId, TtsEvent event) → void
Routes a TTS event from a speech engine to a client. event The update event from the text-to-speech engine indicating the status of this utterance.
toString() → String
A string representation of this object.
inherited
updateLanguage(LanguageStatus status) → void
Called by an engine when a language install is attempted, and when a language is uninstalled. Also called in response to a status request from a client. When a voice is installed or uninstalled, the engine should also call ttsEngine.updateVoices to register the voice. status The install status of the language.
updateVoices(List<TtsVoice> voices) → void
Called by an engine to update its list of voices. This list overrides any voices declared in this extension's manifest. voices Array of tts.TtsVoice objects representing the available voices for speech synthesis.

Operators

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