UI Accessibility Plugin  Version 1.1.1
Make your UI accessible for visually impaired users
UAP_CustomTTS Class Reference

Base class for custom TTS implementations. DO NOT MODIFY THIS FILE! Please use or make a copy of Custom_TTS_Template.cs instead! More...

Inheritance diagram for UAP_CustomTTS:

Public Types

enum  TTSInitializationState { NotInitialized, InProgress, Initialized }
 Custom Text-to-Speech Initialization state. NotInitialized - this TTS implementation cannot be used
InProgress - initialization is in progress, but not ready to synthesize speech (no calls to the SpeakText() function will be made)
Initialized - ready to synthesize speech
More...
 

Static Public Member Functions

static void InitializeCustomTTS< T > ()
 
static void Speak (string textToSay, float speakRate)
 
static void Stop ()
 
static bool IsSpeaking ()
 
static TTSInitializationState IsInitialized ()
 

Protected Member Functions

virtual void Initialize ()
 Initialize anything that needs to be done only once at the start More...
 
virtual TTSInitializationState GetInitializationStatus ()
 Return whether or not the initialization is finished, or pending. If using a server based TTS method, the app might need to wait for a callback before initialization is complete. Returning 'InProgress' will tell the plugin to queue and wait any text that needs to be spoken. More...
 
virtual void SpeakText (string textToSay, float speakRate)
 Synthesize and speak the provided text. More...
 
virtual void StopSpeaking ()
 Stop speaking (if anything is currently playing) More...
 
virtual bool IsCurrentlySpeaking ()
 Return true if currently speaking (or about to speak) More...
 

Static Protected Attributes

static UAP_CustomTTS Instance = null
 

Detailed Description

Base class for custom TTS implementations. DO NOT MODIFY THIS FILE! Please use or make a copy of Custom_TTS_Template.cs instead!

Member Enumeration Documentation

Custom Text-to-Speech Initialization state. NotInitialized - this TTS implementation cannot be used
InProgress - initialization is in progress, but not ready to synthesize speech (no calls to the SpeakText() function will be made)
Initialized - ready to synthesize speech

Member Function Documentation

virtual TTSInitializationState UAP_CustomTTS.GetInitializationStatus ( )
protectedvirtual

Return whether or not the initialization is finished, or pending. If using a server based TTS method, the app might need to wait for a callback before initialization is complete. Returning 'InProgress' will tell the plugin to queue and wait any text that needs to be spoken.

Returns
TTSInitializationState.Initialized - ready to speak text
TTSInitializationState.InProgress - Waiting, should be completed soon
TTSInitializationState.NotInitalized - this TTS system is not available
virtual void UAP_CustomTTS.Initialize ( )
protectedvirtual

Initialize anything that needs to be done only once at the start

virtual bool UAP_CustomTTS.IsCurrentlySpeaking ( )
protectedvirtual

Return true if currently speaking (or about to speak)

virtual void UAP_CustomTTS.SpeakText ( string  textToSay,
float  speakRate 
)
protectedvirtual

Synthesize and speak the provided text.

Parameters
textToSayText string that is to be spoken.
speakRateSpeed of speech, between 0..2, with 1.0 being normal speed
virtual void UAP_CustomTTS.StopSpeaking ( )
protectedvirtual

Stop speaking (if anything is currently playing)


The documentation for this class was generated from the following file: