Allows to speak text files. More...
Public Member Functions | |
void | SpeakAll () |
Speaks all texts until StopAll is called. More... | |
void | StopAll () |
Stops speaking all texts. More... | |
void | Next () |
Speaks the next text (main use for UI). More... | |
void | Next (bool random) |
Speaks the next text. More... | |
void | Previous () |
Speaks the previous text (main use for UI). More... | |
void | Previous (bool random) |
Speaks the previous text. More... | |
void | Speak () |
Speaks a text (main use for UI). More... | |
string | SpeakText (int index=-1, bool random=false) |
Speaks a text with an optional index. More... | |
void | Silence () |
Silence the speech. More... | |
void | Reload () |
Reloads all text files (e.g. when new text files were added during runtime). More... | |
Public Attributes | |
TextFileSpeakerStartEvent | OnStarted |
TextFileSpeakerCompleteEvent | OnCompleted |
Properties | |
TextAsset[] | TextFiles [get, set] |
Text files to speak. More... | |
Crosstales.RTVoice.Model.VoiceAlias | Voices [get, set] |
Voices for the speech. More... | |
Crosstales.RTVoice.Model.Enum.SpeakMode | Mode [get, set] |
Speak mode. More... | |
AudioSource | Source [get, set] |
AudioSource for the output (optional). More... | |
float | Rate [get, set] |
Speech rate of the speaker in percent (range: 0-3). More... | |
float | Pitch [get, set] |
Speech pitch of the speaker in percent (range: 0-2). More... | |
float | Volume [get, set] |
Volume of the speaker in percent (range: 0-1). More... | |
bool | PlayOnStart [get, set] |
Enable speaking of the text on start. More... | |
bool | PlayAllOnStart [get, set] |
Enable speaking of a all random text files on start (default: false). NOTE: this can only be stopped with the "StopAll"-method More... | |
bool | SpeakRandom [get, set] |
Speaks the text files in random order. More... | |
float | Delay [get, set] |
Delay in seconds until the speech for this text starts. More... | |
Events | |
TextFileSpeakerStart | OnTextFileSpeakerStart |
An event triggered whenever a TextFileSpeaker 'Speak' is started. More... | |
TextFileSpeakerComplete | OnTextFileSpeakerComplete |
An event triggered whenever a TextFileSpeaker 'Speak' is completed. More... | |
Detailed Description
Allows to speak text files.
Member Function Documentation
◆ Next() [1/2]
void Crosstales.RTVoice.Tool.TextFileSpeaker.Next | ( | ) |
Speaks the next text (main use for UI).
◆ Next() [2/2]
void Crosstales.RTVoice.Tool.TextFileSpeaker.Next | ( | bool | random | ) |
Speaks the next text.
- Parameters
-
random Speak a random text
◆ Previous() [1/2]
void Crosstales.RTVoice.Tool.TextFileSpeaker.Previous | ( | ) |
Speaks the previous text (main use for UI).
◆ Previous() [2/2]
void Crosstales.RTVoice.Tool.TextFileSpeaker.Previous | ( | bool | random | ) |
Speaks the previous text.
- Parameters
-
random Speak a random text
◆ Reload()
void Crosstales.RTVoice.Tool.TextFileSpeaker.Reload | ( | ) |
Reloads all text files (e.g. when new text files were added during runtime).
◆ Silence()
void Crosstales.RTVoice.Tool.TextFileSpeaker.Silence | ( | ) |
Silence the speech.
◆ Speak()
void Crosstales.RTVoice.Tool.TextFileSpeaker.Speak | ( | ) |
Speaks a text (main use for UI).
◆ SpeakAll()
void Crosstales.RTVoice.Tool.TextFileSpeaker.SpeakAll | ( | ) |
Speaks all texts until StopAll is called.
◆ SpeakText()
string Crosstales.RTVoice.Tool.TextFileSpeaker.SpeakText | ( | int | index = -1 , |
bool | random = false |
||
) |
Speaks a text with an optional index.
- Parameters
-
index Index of the text (default: -1 (random), optional). random Speak a random text (default: false, optional)
- Returns
- UID of the speaker.
◆ StopAll()
void Crosstales.RTVoice.Tool.TextFileSpeaker.StopAll | ( | ) |
Stops speaking all texts.
Property Documentation
◆ Delay
|
getset |
Delay in seconds until the speech for this text starts.
◆ Mode
|
getset |
Speak mode.
◆ Pitch
|
getset |
Speech pitch of the speaker in percent (range: 0-2).
◆ PlayAllOnStart
|
getset |
Enable speaking of a all random text files on start (default: false). NOTE: this can only be stopped with the "StopAll"-method
◆ PlayOnStart
|
getset |
Enable speaking of the text on start.
◆ Rate
|
getset |
Speech rate of the speaker in percent (range: 0-3).
◆ Source
|
getset |
AudioSource for the output (optional).
◆ SpeakRandom
|
getset |
Speaks the text files in random order.
◆ TextFiles
|
getset |
Text files to speak.
◆ Voices
|
getset |
Voices for the speech.
◆ Volume
|
getset |
Volume of the speaker in percent (range: 0-1).
Event Documentation
◆ OnTextFileSpeakerComplete
TextFileSpeakerComplete Crosstales.RTVoice.Tool.TextFileSpeaker.OnTextFileSpeakerComplete |
An event triggered whenever a TextFileSpeaker 'Speak' is completed.
◆ OnTextFileSpeakerStart
TextFileSpeakerStart Crosstales.RTVoice.Tool.TextFileSpeaker.OnTextFileSpeakerStart |
An event triggered whenever a TextFileSpeaker 'Speak' is started.
The documentation for this class was generated from the following file:
- C:/Users/slaub/Unity/assets/RTVoice/RTVoicePro/Assets/Plugins/crosstales/RTVoice/Extras/TextFileSpeaker/Scripts/TextFileSpeaker.cs