Navigation
API > API/Plugins > API/Plugins/TextToSpeech > API/Plugins/TextToSpeech/GenericPlatform
Inheritance Hierarchy
- TSharedFromThis
- FTextToSpeechBase
References
| Module | TextToSpeech |
| Header | /Engine/Plugins/Experimental/TextToSpeech/Source/TextToSpeech/Public/GenericPlatform/TextToSpeechBase.h |
| Include | #include "GenericPlatform/TextToSpeechBase.h" |
Syntax
class FTextToSpeechBase : public TSharedFromThis< FTextToSpeechBase >
Remarks
Abstract base class for all text to speech engines. Subclass for each new speech synthesis method to be used. Text to speech takes in an FString and synthesizes audio data based on the text using the underlying speech synthesizer.
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Activate () |
Activates the TTS system and does the necessary set up. | |
| void | Deactivate () |
Deactivates the TTS and performs tear down. | |
| TextToSpeechId | GetId () |
Returns the ID associated with this text to speech object | |
| float | GetRate () |
Returns the current speech rate strings are spoken at. Value is between 0 and 1.0f. | |
| float | GetVolume () |
Returns the current volume being spoken at. Value is between 0 and 1.0f. | |
| bool | IsActive () |
Returns true if the TTS is active. Else false. | |
| bool | IsMuted () |
Returns true if the TTS is muted. Else false. | |
| bool | IsSpeaking () |
Returns true if any string is currently being spoken, else false. | |
| void | Mute () |
Mutes the TTS so no synthesized speech is audible | |
| void | OnActivated () |
Called at the end of Activate() Override in child classes to provide additional set up. | |
| void | Called at the start of Deactivate() Override in child classes to provide additional tear down | ||
| void | This should only be called by text to speech implementations to signal that a requessted string has successfully finished speaking. | ||
| void | SetMuted
(
bool bInMuted |
Sets the flag for whether the TTS is muted | |
| void | SetRate
(
float InRate |
Sets the current speech rate strings should be spoken at. Clamps to 0 and 1.0f. | |
| void | SetTextToSpeechFinishedSpeakingDelegate
(
const FOnTextToSpeechFinishSpeaking& Delegate |
Sets the TextToSpeechFinishedSpeakingDelegate | |
| void | SetVolume
(
float InVolume |
Sets the volume for strings to be spoken at. Clamps to 0 and 1.0f. | |
| void | Immediately speaks the requested string. | ||
| void | StopSpeaking () |
Immediately stops speaking the current string being spoken | |
| void | Unmute () |
Unmutes the TTS so requests to speak strings are audible again. |
Typedefs
| Name | Description |
|---|---|
| FOnTextToSpeechFinishSpeaking | A delegate that fires when the underlying text to speech has successfully finished speaking the requested string |
Constants
| Name | Description |
|---|---|
| InvalidTextToSpeechId |