Main component of RT-Voice. More...
Public Member Functions | |
float | ApproximateSpeechLength (string text, float rate=1f, float wordsPerMinute=175f, float timeFactor=0.9f) |
Approximates the speech length in seconds of a given text and rate. Note: This is an experimental method and doesn't provide an exact value; +/- 15% is "normal"! More... | |
bool | isVoiceForGenderAvailable (Crosstales.RTVoice.Model.Enum.Gender gender, string culture="") |
Is a voice available for a given gender and optional culture from the current TTS-system? More... | |
bool | isVoiceForGenderAvailable (Crosstales.RTVoice.Model.Enum.Gender gender, SystemLanguage language) |
Is a voice available for a given gender and language from the current TTS-system? More... | |
System.Collections.Generic.List< Crosstales.RTVoice.Model.Voice > | VoicesForGender (Crosstales.RTVoice.Model.Enum.Gender gender, string culture="", bool isFuzzy=false) |
Get all available voices for a given gender and optional culture from the current TTS-system. More... | |
System.Collections.Generic.List< Crosstales.RTVoice.Model.Voice > | VoicesForGender (Crosstales.RTVoice.Model.Enum.Gender gender, SystemLanguage language, bool isFuzzy=false) |
Get all available voices for a given gender and language from the current TTS-system. More... | |
Crosstales.RTVoice.Model.Voice | VoiceForGender (Crosstales.RTVoice.Model.Enum.Gender gender, string culture="", int index=0, string fallbackCulture="en", bool isFuzzy=false) |
Get a voice from for a given gender, optional culture and optional index from the current TTS-system. More... | |
Crosstales.RTVoice.Model.Voice | VoiceForGender (Crosstales.RTVoice.Model.Enum.Gender gender, SystemLanguage language, int index=0, bool isFuzzy=false) |
Get a voice from for a given gender, language and index from the current TTS-system. More... | |
bool | isVoiceForCultureAvailable (string culture) |
Is a voice available for a given culture from the current TTS-system? More... | |
bool | isVoiceForLanguageAvailable (SystemLanguage language) |
Is a voice available for a given language from the current TTS-system? More... | |
System.Collections.Generic.List< Crosstales.RTVoice.Model.Voice > | VoicesForCulture (string culture, bool isFuzzy=false) |
Get all available voices for a given culture from the current TTS-system. More... | |
System.Collections.Generic.List< Crosstales.RTVoice.Model.Voice > | VoicesForLanguage (SystemLanguage language, bool isFuzzy=false) |
Get all available voices for a given language from the current TTS-system. More... | |
Crosstales.RTVoice.Model.Voice | VoiceForCulture (string culture, int index=0, string fallbackCulture="en", bool isFuzzy=false) |
Get a voice from for a given culture and optional index from the current TTS-system. More... | |
Crosstales.RTVoice.Model.Voice | VoiceForLanguage (SystemLanguage language, int index=0, bool isFuzzy=false) |
Get a voice from for a given language and optional index from the current TTS-system. More... | |
bool | isVoiceForNameAvailable (string _name, bool isExact=false) |
Is a voice available for a given name from the current TTS-system? More... | |
Crosstales.RTVoice.Model.Voice | VoiceForName (string _name, bool isExact=false) |
Get a voice for a given name from the current TTS-system. More... | |
void | SpeakNativeWithUID (Crosstales.RTVoice.Model.Wrapper wrapper) |
Speaks a text with a given voice (native mode). More... | |
string | SpeakNative (string text, Crosstales.RTVoice.Model.Voice voice=null, float rate=1f, float pitch=1f, float volume=1f, bool forceSSML=true) |
Speaks a text with a given voice (native mode). More... | |
string | SpeakNative (Crosstales.RTVoice.Model.Wrapper wrapper) |
Speaks a text with a given wrapper (native mode). More... | |
void | SpeakWithUID (Crosstales.RTVoice.Model.Wrapper wrapper) |
Speaks a text with a given voice. More... | |
string | Speak (string text, AudioSource source=null, Crosstales.RTVoice.Model.Voice voice=null, bool speakImmediately=true, float rate=1f, float pitch=1f, float volume=1f, string outputFile="", bool forceSSML=true) |
Speaks a text with a given voice. More... | |
string | Speak (Crosstales.RTVoice.Model.Wrapper wrapper) |
Speaks a text with a given wrapper. More... | |
void | SpeakMarkedWordsWithUID (Crosstales.RTVoice.Model.Wrapper wrapper) |
Speaks and marks a text with a given wrapper. More... | |
void | SpeakMarkedWordsWithUID (string uid, string text, AudioSource source, Crosstales.RTVoice.Model.Voice voice=null, float rate=1f, float pitch=1f, bool forceSSML=true) |
Speaks and marks a text with a given voice and tracks the word position. More... | |
string | Generate (Crosstales.RTVoice.Model.Wrapper wrapper) |
Generates an audio file from a given wrapper. More... | |
string | Generate (string text, string outputFile, Crosstales.RTVoice.Model.Voice voice=null, float rate=1f, float pitch=1f, float volume=1f, bool forceSSML=true) |
Generates an audio file from a text with a given voice. More... | |
void | Silence (string uid=null) |
Silence all active TTS-voices (optional with a UID). More... | |
void | Pause (string uid=null) |
Pause all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | UnPause (string uid=null) |
Un-Pause all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | PauseOrUnPause (string uid=null) |
Pause or unpause all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | Mute (string uid=null) |
Mute all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | UnMute (string uid=null) |
Un-mute all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | MuteOrUnMute (string uid=null) |
Mute or unmute all active TTS-voices (optional with a UID, only for 'Speak'-calls). More... | |
void | ReloadProvider () |
Reloads the provider. More... | |
void | DeleteAudioFiles () |
Deletes all generated audio files. More... | |
void | SetVoices (string voices) |
Sets all voices from iOS. More... | |
void | WordSpoken (string word) |
The current spoken word from iOS. More... | |
void | SetState (string state) |
Sets the state from iOS. More... | |
Static Public Member Functions | |
static void | ResetObject () |
Resets this object. More... | |
Static Public Member Functions inherited from Crosstales.Common.Util.Singleton< Speaker > | |
static void | CreateInstance (bool searchExistingGameObject=true, bool deleteExistingInstance=false) |
Creates an instance of this object. More... | |
static void | DeleteInstance () |
Deletes the instance of this object. More... | |
Public Attributes | |
bool | isSpeaking => SpeechCount > 0 |
Checks if RT-Voice is speaking on this system. More... | |
bool | isBusy => BusyCount > 0 |
Checks if RT-Voice is busy on this system. More... | |
bool | isPlatformSupported => voiceProvider?.isPlatformSupported == true |
Indicates if this TTS-system is supporting the current platform. More... | |
VoicesReadyEvent | OnReady |
SpeakStartEvent | OnSpeakStarted |
SpeakCompleteEvent | OnSpeakCompleted |
ProviderChangeEvent | OnProviderChanged |
ErrorEvent | OnError |
Protected Member Functions | |
override void | Awake () |
override void | OnDestroy () |
override void | OnApplicationQuit () |
Properties | |
Crosstales.RTVoice.Provider.BaseCustomVoiceProvider | CustomProvider [get, set] |
Custom provider for RT-Voice. More... | |
bool | CustomMode [get, set] |
Enables or disables the custom provider. More... | |
bool | ESpeakMode [get, set] |
Enable or disable eSpeak for standalone platforms. More... | |
string | ESpeakApplication [get, set] |
eSpeak application name/path. More... | |
string | ESpeakDataPath [get, set] |
eSpeak application data path. More... | |
Crosstales.RTVoice.Model.Enum.ESpeakModifiers | ESpeakModifier [get, set] |
Active modifier for all eSpeak voices. More... | |
string | AndroidEngine [get, set] |
Active speech engine under Android. Note: the default Google Engine is "com.google.android.tts" More... | |
bool | WindowsForce32bit [get, set] |
Force 32bit under Windows standalone More... | |
bool | AutoClearTags [get, set] |
Automatically clear tags from speeches depending on the capabilities of the current TTS-system. More... | |
bool | Caching [get, set] |
Enable or disable the caching of generated speeches. More... | |
bool | SilenceOnDisable [get, set] |
Silence any speeches if this component gets disabled. More... | |
bool | SilenceOnFocusLost [get, set] |
Silence any speeches if the application loses the focus. More... | |
bool | HandleFocus [get, set] |
Starts and stops the Speaker depending on the focus and running state. More... | |
int? | SpeechCount [get] |
Number of active speeches. More... | |
int? | BusyCount [get] |
Number of active calls. More... | |
bool | areVoicesReady [get] |
Are all voices ready to speak? More... | |
bool | isTTSAvailable [get] |
Checks if TTS is available on this system. More... | |
bool | enforcedStandaloneTTS [get] |
Is standalone TTS enforced? More... | |
bool | isPaused [get] |
Is RT-Voice paused? More... | |
bool | isMuted [get] |
Is RT-Voice muted? More... | |
string | AudioFileExtension [get] |
Returns the extension of the generated audio files. More... | |
string | DefaultVoiceName [get] |
Returns the default voice name of the current TTS-provider. More... | |
System.Collections.Generic.List< Crosstales.RTVoice.Model.Voice > | Voices [get] |
Get all available voices from the current TTS-system. More... | |
bool | isWorkingInEditor [get] |
Indicates if this TTS-system is working directly inside the Unity Editor (without 'Play'-mode). More... | |
bool | isWorkingInPlaymode [get] |
Indicates if this TTS-system is working with 'Play'-mode inside the Unity Editor. More... | |
int | MaxTextLength [get] |
Maximal length of the speech text (in characters) for the current TTS-system. More... | |
bool | isSpeakNativeSupported [get] |
Indicates if this TTS-system is supporting SpeakNative. More... | |
bool | isSpeakSupported [get] |
Indicates if this TTS-system is supporting Speak. More... | |
bool | isSSMLSupported [get] |
Indicates if this TTS-system is supporting SSML. More... | |
bool | isOnlineService [get] |
Indicates if this TTS-system is an online service like MaryTTS or AWS Polly. More... | |
bool | hasCoRoutines [get] |
Indicates if this TTS-system uses co-routines. More... | |
bool | isIL2CPPSupported [get] |
Indicates if this TTS-system is supporting IL2CPP. More... | |
bool | hasVoicesInEditor [get] |
Indicates if this provider returns voices in the Editor mode. More... | |
int | MaxSimultaneousSpeeches [get] |
Maximal number of simultaneous speeches (0 = unlimited). More... | |
System.Collections.Generic.List< string > | Cultures [get] |
Get all available cultures from the current TTS-system (ISO 639-1). More... | |
System.Collections.Generic.List< SystemLanguage > | Languages [get] |
Get all available languages from the current TTS-system. More... | |
System.Collections.Generic.List< string > | Engines [get] |
Get all available speech engines (works only for Android). More... | |
Properties inherited from Crosstales.Common.Util.Singleton< Speaker > | |
static T | Instance [get, protected set] |
Returns the singleton instance of this class. More... | |
bool | DontDestroy [get, set] |
Don't destroy gameobject during scene switches. More... | |
Events | |
VoicesReady | OnVoicesReady |
An event triggered whenever the voices of a provider are ready. More... | |
SpeakStart | OnSpeakStart |
An event triggered whenever a speak is started. More... | |
SpeakComplete | OnSpeakComplete |
An event triggered whenever a speak is completed. More... | |
SpeakCurrentWord | OnSpeakCurrentWord |
An event triggered whenever a new word is spoken (native, Windows and iOS only). More... | |
SpeakCurrentWordString | OnSpeakCurrentWordString |
An event triggered whenever a new word is spoken (native, Windows and iOS only). More... | |
SpeakCurrentPhoneme | OnSpeakCurrentPhoneme |
An event triggered whenever a new phoneme is spoken (native, Windows only). More... | |
SpeakCurrentViseme | OnSpeakCurrentViseme |
An event triggered whenever a new viseme is spoken (native, Windows only). More... | |
SpeakAudioGenerationStart | OnSpeakAudioGenerationStart |
An event triggered whenever a speak audio generation is started. More... | |
SpeakAudioGenerationComplete | OnSpeakAudioGenerationComplete |
An event triggered whenever a speak audio generation is completed. More... | |
ProviderChange | OnProviderChange |
An event triggered whenever a provider changes (e.g. Windows to MaryTTS). More... | |
ErrorInfo | OnErrorInfo |
An event triggered whenever an error occurs. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Crosstales.Common.Util.Singleton< Speaker > | |
static string | PrefabPath |
Fully qualified prefab path. More... | |
static string | GameObjectName |
Name of the gameobject in the scene. More... | |
Static Protected Attributes inherited from Crosstales.Common.Util.Singleton< Speaker > | |
static T | instance |
Detailed Description
Main component of RT-Voice.
Member Function Documentation
◆ ApproximateSpeechLength()
float Crosstales.RTVoice.Speaker.ApproximateSpeechLength | ( | string | text, |
float | rate = 1f , |
||
float | wordsPerMinute = 175f , |
||
float | timeFactor = 0.9f |
||
) |
Approximates the speech length in seconds of a given text and rate. Note: This is an experimental method and doesn't provide an exact value; +/- 15% is "normal"!
- Parameters
-
text Text for the length approximation. rate Speech rate of the speaker in percent for the length approximation (1 = 100%, default: 1, optional). wordsPerMinute Words per minute (default: 175, optional). timeFactor Time factor for the calculated value (default: 0.9, optional).
- Returns
- Approximated speech length in seconds of the given text and rate.
◆ DeleteAudioFiles()
void Crosstales.RTVoice.Speaker.DeleteAudioFiles | ( | ) |
Deletes all generated audio files.
◆ Generate() [1/2]
string Crosstales.RTVoice.Speaker.Generate | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Generates an audio file from a given wrapper.
- Parameters
-
wrapper Speak wrapper.
- Returns
- UID of the generator.
◆ Generate() [2/2]
string Crosstales.RTVoice.Speaker.Generate | ( | string | text, |
string | outputFile, | ||
Crosstales.RTVoice.Model.Voice | voice = null , |
||
float | rate = 1f , |
||
float | pitch = 1f , |
||
float | volume = 1f , |
||
bool | forceSSML = true |
||
) |
Generates an audio file from a text with a given voice.
- Parameters
-
text Text to generate. outputFile Saves the generated audio to an output file (without extension). voice Voice to speak (optional). rate Speech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional). pitch Pitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional). volume Volume of the speaker in percent (1 = 100%, values: 0.01-1, default: 1, optional). forceSSML Force SSML on supported platforms (default: true, optional).
- Returns
- UID of the generator.
◆ isVoiceForCultureAvailable()
bool Crosstales.RTVoice.Speaker.isVoiceForCultureAvailable | ( | string | culture | ) |
Is a voice available for a given culture from the current TTS-system?
- Parameters
-
culture Culture of the voice (e.g. "en")
- Returns
- True if a voice is available for a given culture.
◆ isVoiceForGenderAvailable() [1/2]
bool Crosstales.RTVoice.Speaker.isVoiceForGenderAvailable | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
string | culture = "" |
||
) |
Is a voice available for a given gender and optional culture from the current TTS-system?
- Parameters
-
gender Gender of the voice culture Culture of the voice (e.g. "en", optional)
- Returns
- True if a voice is available for a given gender and culture.
◆ isVoiceForGenderAvailable() [2/2]
bool Crosstales.RTVoice.Speaker.isVoiceForGenderAvailable | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
SystemLanguage | language | ||
) |
Is a voice available for a given gender and language from the current TTS-system?
- Parameters
-
gender Gender of the voice language Language of the voice
- Returns
- True if a voice is available for a given gender and language.
◆ isVoiceForLanguageAvailable()
bool Crosstales.RTVoice.Speaker.isVoiceForLanguageAvailable | ( | SystemLanguage | language | ) |
Is a voice available for a given language from the current TTS-system?
- Parameters
-
language Language of the voice
- Returns
- True if a voice is available for a given language.
◆ isVoiceForNameAvailable()
bool Crosstales.RTVoice.Speaker.isVoiceForNameAvailable | ( | string | _name, |
bool | isExact = false |
||
) |
Is a voice available for a given name from the current TTS-system?
- Parameters
-
_name Name of the voice (e.g. "Alex") isExact Exact match for the voice name (default: false, optional)
- Returns
- True if a voice is available for a given name.
◆ Mute()
void Crosstales.RTVoice.Speaker.Mute | ( | string | uid = null | ) |
Mute all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ MuteOrUnMute()
void Crosstales.RTVoice.Speaker.MuteOrUnMute | ( | string | uid = null | ) |
Mute or unmute all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ Pause()
void Crosstales.RTVoice.Speaker.Pause | ( | string | uid = null | ) |
Pause all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ PauseOrUnPause()
void Crosstales.RTVoice.Speaker.PauseOrUnPause | ( | string | uid = null | ) |
Pause or unpause all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ ReloadProvider()
void Crosstales.RTVoice.Speaker.ReloadProvider | ( | ) |
Reloads the provider.
◆ ResetObject()
|
static |
Resets this object.
◆ SetState()
void Crosstales.RTVoice.Speaker.SetState | ( | string | state | ) |
Sets the state from iOS.
- Parameters
-
voices State from iOS.
◆ SetVoices()
void Crosstales.RTVoice.Speaker.SetVoices | ( | string | voices | ) |
Sets all voices from iOS.
- Parameters
-
voices All voices from iOS.
◆ Silence()
void Crosstales.RTVoice.Speaker.Silence | ( | string | uid = null | ) |
Silence all active TTS-voices (optional with a UID).
- Parameters
-
uid UID of the speaker (optional)
◆ Speak() [1/2]
string Crosstales.RTVoice.Speaker.Speak | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Speaks a text with a given wrapper.
- Parameters
-
wrapper Speak wrapper.
- Returns
- UID of the speaker.
◆ Speak() [2/2]
string Crosstales.RTVoice.Speaker.Speak | ( | string | text, |
AudioSource | source = null , |
||
Crosstales.RTVoice.Model.Voice | voice = null , |
||
bool | speakImmediately = true , |
||
float | rate = 1f , |
||
float | pitch = 1f , |
||
float | volume = 1f , |
||
string | outputFile = "" , |
||
bool | forceSSML = true |
||
) |
Speaks a text with a given voice.
- Parameters
-
text Text to speak. source AudioSource for the output (optional). voice Voice to speak (optional). speakImmediately Speak the text immediately (default: true). Only works if 'Source' is not null. rate Speech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional). pitch Pitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional). volume Volume of the speaker in percent (1 = 100%, values: 0.01-1, default: 1, optional). outputFile Saves the generated audio to an output file (without extension, optional). forceSSML Force SSML on supported platforms (default: true, optional).
- Returns
- UID of the speaker.
◆ SpeakMarkedWordsWithUID() [1/2]
void Crosstales.RTVoice.Speaker.SpeakMarkedWordsWithUID | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Speaks and marks a text with a given wrapper.
- Parameters
-
wrapper Speak wrapper.
◆ SpeakMarkedWordsWithUID() [2/2]
void Crosstales.RTVoice.Speaker.SpeakMarkedWordsWithUID | ( | string | uid, |
string | text, | ||
AudioSource | source, | ||
Crosstales.RTVoice.Model.Voice | voice = null , |
||
float | rate = 1f , |
||
float | pitch = 1f , |
||
bool | forceSSML = true |
||
) |
Speaks and marks a text with a given voice and tracks the word position.
- Parameters
-
uid UID of the speaker text Text to speak. source AudioSource for the output. voice Voice to speak (optional). rate Speech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional). pitch Pitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional). forceSSML Force SSML on supported platforms (default: true, optional).
◆ SpeakNative() [1/2]
string Crosstales.RTVoice.Speaker.SpeakNative | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Speaks a text with a given wrapper (native mode).
- Parameters
-
wrapper Speak wrapper.
- Returns
- UID of the speaker.
◆ SpeakNative() [2/2]
string Crosstales.RTVoice.Speaker.SpeakNative | ( | string | text, |
Crosstales.RTVoice.Model.Voice | voice = null , |
||
float | rate = 1f , |
||
float | pitch = 1f , |
||
float | volume = 1f , |
||
bool | forceSSML = true |
||
) |
Speaks a text with a given voice (native mode).
- Parameters
-
text Text to speak. voice Voice to speak (optional). rate Speech rate of the speaker in percent (1 = 100%, values: 0.01-3, default: 1, optional). pitch Pitch of the speech in percent (1 = 100%, values: 0-2, default: 1, optional). volume Volume of the speaker in percent (1 = 100%, values: 0.01-1, default: 1, optional). forceSSML Force SSML on supported platforms (default: true, optional).
- Returns
- UID of the speaker.
◆ SpeakNativeWithUID()
void Crosstales.RTVoice.Speaker.SpeakNativeWithUID | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Speaks a text with a given voice (native mode).
- Parameters
-
wrapper Speak wrapper.
◆ SpeakWithUID()
void Crosstales.RTVoice.Speaker.SpeakWithUID | ( | Crosstales.RTVoice.Model.Wrapper | wrapper | ) |
Speaks a text with a given voice.
- Parameters
-
wrapper Speak wrapper.
◆ UnMute()
void Crosstales.RTVoice.Speaker.UnMute | ( | string | uid = null | ) |
Un-mute all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ UnPause()
void Crosstales.RTVoice.Speaker.UnPause | ( | string | uid = null | ) |
Un-Pause all active TTS-voices (optional with a UID, only for 'Speak'-calls).
- Parameters
-
uid UID of the speaker (optional)
◆ VoiceForCulture()
Crosstales.RTVoice.Model.Voice Crosstales.RTVoice.Speaker.VoiceForCulture | ( | string | culture, |
int | index = 0 , |
||
string | fallbackCulture = "en" , |
||
bool | isFuzzy = false |
||
) |
Get a voice from for a given culture and optional index from the current TTS-system.
- Parameters
-
culture Culture of the voice (e.g. "en") index Index of the voice (default: 0, optional) fallbackCulture Fallback culture of the voice (default "en", optional) isFuzzy Always returns voices if there is no match with the culture (default: false, optional)
- Returns
- Voice for the given culture and index.
◆ VoiceForGender() [1/2]
Crosstales.RTVoice.Model.Voice Crosstales.RTVoice.Speaker.VoiceForGender | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
string | culture = "" , |
||
int | index = 0 , |
||
string | fallbackCulture = "en" , |
||
bool | isFuzzy = false |
||
) |
Get a voice from for a given gender, optional culture and optional index from the current TTS-system.
- Parameters
-
gender Gender of the voice culture Culture of the voice (e.g. "en", optional) index Index of the voice (default: 0, optional) fallbackCulture Fallback culture of the voice (default "en", optional) isFuzzy Always returns voices if there is no match with the gender and/or culture (default: false, optional)
- Returns
- Voice for the given gender, culture and index.
◆ VoiceForGender() [2/2]
Crosstales.RTVoice.Model.Voice Crosstales.RTVoice.Speaker.VoiceForGender | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
SystemLanguage | language, | ||
int | index = 0 , |
||
bool | isFuzzy = false |
||
) |
Get a voice from for a given gender, language and index from the current TTS-system.
- Parameters
-
gender Gender of the voice language Language of the voice index Index of the voice (default: 0, optional) isFuzzy Always returns voices if there is no match with the gender and/or language (default: false, optional)
- Returns
- Voice for the given gender, language and index.
◆ VoiceForLanguage()
Crosstales.RTVoice.Model.Voice Crosstales.RTVoice.Speaker.VoiceForLanguage | ( | SystemLanguage | language, |
int | index = 0 , |
||
bool | isFuzzy = false |
||
) |
Get a voice from for a given language and optional index from the current TTS-system.
- Parameters
-
language language of the voice index Index of the voice (default: 0, optional) isFuzzy Always returns voices if there is no match with the language (default: false, optional)
- Returns
- Voice for the given language and index.
◆ VoiceForName()
Crosstales.RTVoice.Model.Voice Crosstales.RTVoice.Speaker.VoiceForName | ( | string | _name, |
bool | isExact = false |
||
) |
Get a voice for a given name from the current TTS-system.
- Parameters
-
_name Name of the voice (e.g. "Alex") isExact Exact match for the voice name (default: false, optional)
- Returns
- Voice for the given name or null if not found.
◆ VoicesForCulture()
System.Collections.Generic.List<Crosstales.RTVoice.Model.Voice> Crosstales.RTVoice.Speaker.VoicesForCulture | ( | string | culture, |
bool | isFuzzy = false |
||
) |
Get all available voices for a given culture from the current TTS-system.
- Parameters
-
culture Culture of the voice (e.g. "en") isFuzzy Always returns voices if there is no match with the culture (default: false, optional)
- Returns
- All available voices (alphabetically ordered by 'Name') for a given culture as a list.
◆ VoicesForGender() [1/2]
System.Collections.Generic.List<Crosstales.RTVoice.Model.Voice> Crosstales.RTVoice.Speaker.VoicesForGender | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
string | culture = "" , |
||
bool | isFuzzy = false |
||
) |
Get all available voices for a given gender and optional culture from the current TTS-system.
- Parameters
-
gender Gender of the voice culture Culture of the voice (e.g. "en", optional) isFuzzy Always returns voices if there is no match with the gender and/or culture (default: false, optional)
- Returns
- All available voices (alphabetically ordered by 'Name') for a given gender and culture as a list.
◆ VoicesForGender() [2/2]
System.Collections.Generic.List<Crosstales.RTVoice.Model.Voice> Crosstales.RTVoice.Speaker.VoicesForGender | ( | Crosstales.RTVoice.Model.Enum.Gender | gender, |
SystemLanguage | language, | ||
bool | isFuzzy = false |
||
) |
Get all available voices for a given gender and language from the current TTS-system.
- Parameters
-
gender Gender of the voice language Language of the voice isFuzzy Always returns voices if there is no match with the gender and/or language (default: false, optional)
- Returns
- All available voices (alphabetically ordered by 'Name') for a given gender and language as a list.
◆ VoicesForLanguage()
System.Collections.Generic.List<Crosstales.RTVoice.Model.Voice> Crosstales.RTVoice.Speaker.VoicesForLanguage | ( | SystemLanguage | language, |
bool | isFuzzy = false |
||
) |
Get all available voices for a given language from the current TTS-system.
- Parameters
-
language Language of the voice isFuzzy Always returns voices if there is no match with the language (default: false, optional)
- Returns
- All available voices (alphabetically ordered by 'Name') for a given language as a list.
◆ WordSpoken()
void Crosstales.RTVoice.Speaker.WordSpoken | ( | string | word | ) |
The current spoken word from iOS.
- Parameters
-
voices Current spoken word from iOS.
Member Data Documentation
◆ isBusy
bool Crosstales.RTVoice.Speaker.isBusy => BusyCount > 0 |
Checks if RT-Voice is busy on this system.
- Returns
- True if RT-Voice is busy on this system.
◆ isPlatformSupported
bool Crosstales.RTVoice.Speaker.isPlatformSupported => voiceProvider?.isPlatformSupported == true |
Indicates if this TTS-system is supporting the current platform.
- Returns
- True if this TTS-system supports current platform.
◆ isSpeaking
bool Crosstales.RTVoice.Speaker.isSpeaking => SpeechCount > 0 |
Checks if RT-Voice is speaking on this system.
- Returns
- True if RT-Voice is speaking on this system.
Property Documentation
◆ AndroidEngine
|
getset |
Active speech engine under Android. Note: the default Google Engine is "com.google.android.tts"
◆ areVoicesReady
|
get |
Are all voices ready to speak?
◆ AudioFileExtension
|
get |
Returns the extension of the generated audio files.
- Returns
- Extension of the generated audio files.
◆ AutoClearTags
|
getset |
Automatically clear tags from speeches depending on the capabilities of the current TTS-system.
◆ BusyCount
|
get |
Number of active calls.
◆ Caching
|
getset |
Enable or disable the caching of generated speeches.
◆ Cultures
|
get |
Get all available cultures from the current TTS-system (ISO 639-1).
- Returns
- All available cultures (alphabetically ordered by 'Culture') as a list.
◆ CustomMode
|
getset |
Enables or disables the custom provider.
◆ CustomProvider
|
getset |
Custom provider for RT-Voice.
◆ DefaultVoiceName
|
get |
Returns the default voice name of the current TTS-provider.
- Returns
- Default voice name of the current TTS-provider.
◆ enforcedStandaloneTTS
|
get |
Is standalone TTS enforced?
◆ Engines
|
get |
Get all available speech engines (works only for Android).
- Returns
- All available speech engines as a list.
◆ ESpeakApplication
|
getset |
eSpeak application name/path.
◆ ESpeakDataPath
|
getset |
eSpeak application data path.
◆ ESpeakMode
|
getset |
Enable or disable eSpeak for standalone platforms.
◆ ESpeakModifier
|
getset |
Active modifier for all eSpeak voices.
◆ HandleFocus
|
getset |
Starts and stops the Speaker depending on the focus and running state.
◆ hasCoRoutines
|
get |
Indicates if this TTS-system uses co-routines.
- Returns
- True if this TTS-system uses co-routines.
◆ hasVoicesInEditor
|
get |
Indicates if this provider returns voices in the Editor mode.
- Returns
- True if this provider returns voices in the Editor mode.
◆ isIL2CPPSupported
|
get |
Indicates if this TTS-system is supporting IL2CPP.
- Returns
- True if this TTS-system supports IL2CPP.
◆ isMuted
|
get |
Is RT-Voice muted?
◆ isOnlineService
|
get |
Indicates if this TTS-system is an online service like MaryTTS or AWS Polly.
- Returns
- True if this TTS-system is an online service.
◆ isPaused
|
get |
Is RT-Voice paused?
◆ isSpeakNativeSupported
|
get |
Indicates if this TTS-system is supporting SpeakNative.
- Returns
- True if this TTS-system supports SpeakNative.
◆ isSpeakSupported
|
get |
Indicates if this TTS-system is supporting Speak.
- Returns
- True if this TTS-system supports Speak.
◆ isSSMLSupported
|
get |
Indicates if this TTS-system is supporting SSML.
- Returns
- True if this TTS-system supports SSML.
◆ isTTSAvailable
|
get |
Checks if TTS is available on this system.
- Returns
- True if TTS is available on this system.
◆ isWorkingInEditor
|
get |
Indicates if this TTS-system is working directly inside the Unity Editor (without 'Play'-mode).
- Returns
- True if this TTS-system is working directly inside the Unity Editor.
◆ isWorkingInPlaymode
|
get |
Indicates if this TTS-system is working with 'Play'-mode inside the Unity Editor.
- Returns
- True if this TTS-system is working with 'Play'-mode inside the Unity Editor.
◆ Languages
|
get |
Get all available languages from the current TTS-system.
- Returns
- All available languages as a list.
◆ MaxSimultaneousSpeeches
|
get |
Maximal number of simultaneous speeches (0 = unlimited).
- Returns
- The maximal number of simultaneous speeches.
◆ MaxTextLength
|
get |
Maximal length of the speech text (in characters) for the current TTS-system.
- Returns
- The maximal length of the speech text.
◆ SilenceOnDisable
|
getset |
Silence any speeches if this component gets disabled.
◆ SilenceOnFocusLost
|
getset |
Silence any speeches if the application loses the focus.
◆ SpeechCount
|
get |
Number of active speeches.
◆ Voices
|
get |
Get all available voices from the current TTS-system.
- Returns
- All available voices (alphabetically ordered by 'Name') as a list.
◆ WindowsForce32bit
|
getset |
Force 32bit under Windows standalone
Event Documentation
◆ OnErrorInfo
ErrorInfo Crosstales.RTVoice.Speaker.OnErrorInfo |
An event triggered whenever an error occurs.
◆ OnProviderChange
ProviderChange Crosstales.RTVoice.Speaker.OnProviderChange |
An event triggered whenever a provider changes (e.g. Windows to MaryTTS).
◆ OnSpeakAudioGenerationComplete
SpeakAudioGenerationComplete Crosstales.RTVoice.Speaker.OnSpeakAudioGenerationComplete |
An event triggered whenever a speak audio generation is completed.
◆ OnSpeakAudioGenerationStart
SpeakAudioGenerationStart Crosstales.RTVoice.Speaker.OnSpeakAudioGenerationStart |
An event triggered whenever a speak audio generation is started.
◆ OnSpeakComplete
SpeakComplete Crosstales.RTVoice.Speaker.OnSpeakComplete |
An event triggered whenever a speak is completed.
◆ OnSpeakCurrentPhoneme
SpeakCurrentPhoneme Crosstales.RTVoice.Speaker.OnSpeakCurrentPhoneme |
An event triggered whenever a new phoneme is spoken (native, Windows only).
◆ OnSpeakCurrentViseme
SpeakCurrentViseme Crosstales.RTVoice.Speaker.OnSpeakCurrentViseme |
An event triggered whenever a new viseme is spoken (native, Windows only).
◆ OnSpeakCurrentWord
SpeakCurrentWord Crosstales.RTVoice.Speaker.OnSpeakCurrentWord |
An event triggered whenever a new word is spoken (native, Windows and iOS only).
◆ OnSpeakCurrentWordString
SpeakCurrentWordString Crosstales.RTVoice.Speaker.OnSpeakCurrentWordString |
An event triggered whenever a new word is spoken (native, Windows and iOS only).
◆ OnSpeakStart
SpeakStart Crosstales.RTVoice.Speaker.OnSpeakStart |
An event triggered whenever a speak is started.
◆ OnVoicesReady
VoicesReady Crosstales.RTVoice.Speaker.OnVoicesReady |
An event triggered whenever the voices of a provider are ready.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/RTVoice/RTVoicePro/Assets/Plugins/crosstales/RTVoice/Scripts/Speaker.cs