TextToSpeech class
TextToSpeech class provides bridge between flutter and platform specific Text-To-Speech (TTS) API
This class communicate to platform interface through TextToSpeechPlatform
instance that contains
subset of TTS native API from respective supported platforms.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getDefaultLanguage(
) → Future< String?> - Returns default language
-
getDisplayLanguageByCode(
String langCode) → Future< String?> -
Returns list of language names by given
langCode
-
getDisplayLanguages(
) → Future< List< String> ?> - Returns list of language names (e.g English, Arabic)
-
getLanguageCodeByName(
String languageName) → Future< String?> -
Returns language code by given
languageName
-
getLanguages(
) → Future< List< String> > - Return list of supported language code (i.e en-US) SpeechSynthesis Web API doesn't provide specific function to get supported language We get it from getVoice function instead
-
getVoice(
) → Future< List< String> ?> - Return supported voices
-
getVoiceByLang(
String lang) → Future< List< String> ?> -
Return list of voice by given
lang
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → Future< bool?> - Pause current utterance immediately.
-
resume(
) → Future< bool?> - Resume current utterance immediately.
-
setLanguage(
String language) → Future< bool?> - Set language for next utterance
-
setPitch(
num pitch) → Future< bool?> - Set pitch of next utterance
-
setRate(
num rate) → Future< bool?> - Set rate (tempo) for next utterance
-
setVolume(
num volume) → Future< bool?> - Set volume of next utterance
-
speak(
String text) → Future< bool?> -
Start speak utterance of the given
text
-
stop(
) → Future< bool?> - Stop current utterance immediately
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited