API reference
API reference
Select your platform
No SDKs available
No versions available

TTSSpeaker Class

Meta::WitAi::TTS::Utilities::TTSSpeaker extends MonoBehaviour.
Meta::WitAi::TTS::Utilities::TTSSpeaker extends Meta.WitAi.Speech.ISpeechEventProvider.
Meta::WitAi::TTS::Utilities::TTSSpeaker extends Meta.WitAi.TTS.Interfaces.ISpeaker.
Meta::WitAi::TTS::Utilities::TTSSpeaker extends Meta.WitAi.TTS.Interfaces.ITTSEventPlayer.

Overview

Data Fields

Events[Get]
string
string
bool
Whether a clip is currently playing for this speaker
The data for the currently playing clip
bool
Whether there are any clips in the loading queue
bool
Whether the speaker currently has currently speaking clip or a playback queue
int
The total samples available for the current tts events
The current tts events available

Properties

string
VoiceID[Get]
The voice settings to be used for this TTSSpeaker
bool
Whether any queued clips are still not ready for playback
List< TTSClipData >
The script used to perform audio playback of IAudioClipStreams.
AudioSource
bool
Whether playback is currently paused or not
int
The current amount of elapsed samples of the playing audio data if applicable
TTSEventSampleDelegate
The callback following the change of the current sample
TTSEventContainerDelegate
The callback following a tts event update

Object Data

void
Start ( )
void
void
void
void
void
void
bool
bool
bool
IEnumerator
WaitForCompletion
( List< TTSSpeakerRequestData > requestData )
bool
void
HandlePlaybackComplete
( bool stopped )
void
SetPause
( bool toPaused )
void
Log
( string comment )
void
void
void
LogRequestData
( string comment,
TTSSpeakerRequestData requestData,
bool warning )
void
OnInit
( TTSSpeakerRequestData requestData )
void
void
void
OnLoadFailed
( TTSSpeakerRequestData requestData,
string error )
void
void
void
void
OnPlaybackCancelled
( TTSSpeakerRequestData requestData,
string reason )
void
void
void
void
OnPlaybackSampleUpdated
( int sample )
Updates callback sample
void
Updates event callback

Public Member Functions

List< string >
GetFinalText
( string textToSpeak )
Gets final text following prepending/appending and any special formatting
List< string >
GetFinalTextFormatted
( string format,
params string [] textsToSpeak )
Obtain final text list from format and text list
string
GetFormattedText
( string format,
params string [] textsToSpeak )
Formats text using an initial format string parameter and additional text items to be inserted into the format
void
Speak
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
void
Speak
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Cancels all previous clips when loaded and then plays.
void
Speak
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings. Cancels all previous clips when loaded and then plays.
void
Speak
( string textToSpeak )
Load a tts clip using the specified text. Cancels all previous clips when loaded and then plays.
void
SpeakFormat
( string format,
params string [] textsToSpeak )
Loads a formated phrase to be spoken. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( string textToSpeak )
Load a tts clip using the specified text and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
void
SpeakQueued
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
void
SpeakQueued
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
void
SpeakQueued
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings events. Adds clip to playback queue and will speak once queue has completed all playback.
void
SpeakQueued
( string textToSpeak )
Load a tts clip using the specified text. Adds clip to playback queue and will speak once queue has completed all playback.
void
SpeakFormatQueued
( string format,
params string [] textsToSpeak )
Loads a formated phrase to be spoken. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( string [] textsToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( string [] textsToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases and playback events and then waits for the files to load & play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( string [] textsToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text phrases and disk cache settings and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( string [] textsToSpeak )
Load a tts clip using the specified text phrases and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
void
Stop
( string textToSpeak,
bool allInstances )
Stop load and playback of a specific clip
void
Stop
( TTSClipData clipData,
bool allInstances )
Stop load and playback of a specific clip
void
Abort loading of all items in the load queue
void
Stop playback of currently played audio clip
void
Stop ( )
Stops loading and playback immediately
void
SetVoiceOverride
( TTSVoiceSettings overrideVoiceSettings )
Set a voice override for future requests
void
Clears the current voice override
void
Speak
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
bool
Speak
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
bool
Speak
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified response node and disk cache settings Cancels all previous clips when loaded and then plays.
bool
Speak
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node and playback events Cancels all previous clips when loaded and then plays.
bool
Speak
( WitResponseNode responseNode )
Load a tts clip using the specified response node and playback events Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
IEnumerator
SpeakAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
void
SpeakQueued
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
bool
SpeakQueued
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
bool
SpeakQueued
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
bool
SpeakQueued
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings events. Adds clip to playback queue and will speak once queue has completed all playback.
bool
SpeakQueued
( WitResponseNode responseNode )
Load a tts clip using the specified text. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( string [] textsToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases and playback events and then waits for the files to load & play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakQueuedAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text phrases and disk cache settings and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
Load a tts clip using the specified text phrases and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
void
Pause ( )
Pause any current or future loaded audio playback
void
Resume ( )
Resume playback for current and future audio clips
void
Call before sending speech data to warm up system
void
Call at the start of a larger text block to indicate many queued requests will be coming
void
Call at the end of a larger text block to indicate a block of text is complete.

Details

Fields

TTSSpeakerEvents Meta.WitAi.TTS.Utilities.TTSSpeaker.Events
No description available.
VoiceSpeechEvents Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeechEvents
No description available.
string Meta.WitAi.TTS.Utilities.TTSSpeaker.PrependedText
No description available.
string Meta.WitAi.TTS.Utilities.TTSSpeaker.AppendedText
No description available.
TTSWitVoiceSettings Meta.WitAi.TTS.Utilities.TTSSpeaker.customWitVoiceSettings
No description available.
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsSpeaking
Whether a clip is currently playing for this speaker
TTSClipData Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakingClip
The data for the currently playing clip
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsLoading
Whether there are any clips in the loading queue
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsActive
Whether the speaker currently has currently speaking clip or a playback queue
int Meta.WitAi.TTS.Utilities.TTSSpeaker.TotalSamples
The total samples available for the current tts events
TTSEventContainer Meta.WitAi.TTS.Utilities.TTSSpeaker.CurrentEvents
The current tts events available

Properties

TTSService Meta.WitAi.TTS.Utilities.TTSSpeaker.TTSService
No description available.
string Meta.WitAi.TTS.Utilities.TTSSpeaker.VoiceID
No description available.
TTSVoiceSettings Meta.WitAi.TTS.Utilities.TTSSpeaker.VoiceSettings
The voice settings to be used for this TTSSpeaker
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsPreparing
Whether any queued clips are still not ready for playback
List<TTSClipData> Meta.WitAi.TTS.Utilities.TTSSpeaker.QueuedClips
No description available.
IAudioPlayer Meta.WitAi.TTS.Utilities.TTSSpeaker.AudioPlayer
The script used to perform audio playback of IAudioClipStreams.
  1. Gets IAudioPlayer component if applied to this speaker
  2. If no IAudioPlayer component is found, the TTSService's audio system will be used to generate an audio player.
  3. If still not found, adds a UnityAudioPlayer.
AudioSource Meta.WitAi.TTS.Utilities.TTSSpeaker.AudioSource
No description available.
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsPaused
Whether playback is currently paused or not
int Meta.WitAi.TTS.Utilities.TTSSpeaker.ElapsedSamples
The current amount of elapsed samples of the playing audio data if applicable
TTSEventSampleDelegate Meta.WitAi.TTS.Utilities.TTSSpeaker.OnSampleUpdated
The callback following the change of the current sample
TTSEventContainerDelegate Meta.WitAi.TTS.Utilities.TTSSpeaker.OnEventsUpdated
The callback following a tts event update

Object Data

virtual string Meta.WitAi.TTS.Utilities.TTSSpeaker.LogCategory
No description available.
TTSSpeakerRequestData Meta.WitAi.TTS.Utilities.TTSSpeaker._speakingRequest
No description available.

Object Data

virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.Start ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.RefreshProcessors ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnDestroy ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnEnable ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnDisable ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.HandleClipUnload
( TTSClipData clipData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.HandleClipUpdate
( TTSClipData clipData )
No description available.
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsClipRequestActive
( TTSSpeakerRequestData requestData )
No description available.
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsClipRequestLoading
( TTSSpeakerRequestData requestData )
No description available.
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsClipRequestSpeaking
( TTSSpeakerRequestData requestData )
No description available.
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.WaitForCompletion
( List< TTSSpeakerRequestData > requestData )
No description available.
virtual bool Meta.WitAi.TTS.Utilities.TTSSpeaker.IsPlaybackComplete ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.HandlePlaybackComplete
( bool stopped )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.SetPause
( bool toPaused )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.Log
( string comment )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackQueueBegin ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackQueueComplete ( )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.LogRequestData
( string comment,
TTSSpeakerRequestData requestData,
bool warning )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnInit
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnLoadBegin
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnLoadAborted
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnLoadFailed
( TTSSpeakerRequestData requestData,
string error )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnLoadSuccess
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackReady
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackStart
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackCancelled
( TTSSpeakerRequestData requestData,
string reason )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackClipUpdated
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackComplete
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnComplete
( TTSSpeakerRequestData requestData )
No description available.
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackSampleUpdated
( int sample )
Updates callback sample
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.OnPlaybackEventsUpdated
( TTSEventContainer events )
Updates event callback

Member Functions

virtual List<string> Meta.WitAi.TTS.Utilities.TTSSpeaker.GetFinalText
( string textToSpeak )
Gets final text following prepending/appending and any special formatting
Parameters
textToSpeak
The base text to be spoken
Returns
Returns an array of split texts to be spoken
virtual List<string> Meta.WitAi.TTS.Utilities.TTSSpeaker.GetFinalTextFormatted
( string format,
params string [] textsToSpeak )
Obtain final text list from format and text list
Parameters
format
The format to be used
textsToSpeak
The array of strings to be inserted into the format
Returns
Returns a list of formatted texts
string Meta.WitAi.TTS.Utilities.TTSSpeaker.GetFormattedText
( string format,
params string [] textsToSpeak )
Formats text using an initial format string parameter and additional text items to be inserted into the format
Parameters
format
The format to be used
textsToSpeak
The array of strings to be inserted into the format
Returns
A formatted text string
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
playbackEvents
Events to be called for this specific tts playback request
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( string textToSpeak )
Load a tts clip using the specified text. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakFormat
( string format,
params string [] textsToSpeak )
Loads a formated phrase to be spoken. Cancels all previous clips when loaded and then plays.
Parameters
format
Format string to be filled in with texts
textsToSpeak
Texts to be inserted into the formatter
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( string textToSpeak )
Load a tts clip using the specified text and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textToSpeak
The text to be spoken
playbackEvents
Events to be called for this specific tts playback request
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( string textToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textToSpeak
The text to be spoken
diskCacheSettings
Specific tts load caching settings
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( string textToSpeak )
Load a tts clip using the specified text. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textToSpeak
The text to be spoken
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakFormatQueued
( string format,
params string [] textsToSpeak )
Loads a formated phrase to be spoken. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
format
Format string to be filled in with texts
textsToSpeak
Texts to be inserted into the formatter
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( string [] textsToSpeak,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textsToSpeak
Multiple texts to be spoken
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( string [] textsToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases and playback events and then waits for the files to load & play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textsToSpeak
Multiple texts to be spoken
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( string [] textsToSpeak,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text phrases and disk cache settings and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textsToSpeak
Multiple texts to be spoken
diskCacheSettings
Specific tts load caching settings
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( string [] textsToSpeak )
Load a tts clip using the specified text phrases and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textsToSpeak
Multiple texts to be spoken
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.Stop
( string textToSpeak,
bool allInstances )
Stop load and playback of a specific clip
Parameters
clipData
The clip to be stopped and removed from the queue
allInstances
Whether to remove the first instance of this clip or all instances
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.Stop
( TTSClipData clipData,
bool allInstances )
Stop load and playback of a specific clip
Parameters
clipData
The clip to be stopped and removed from the queue
allInstances
Whether to remove the first instance of this clip or all instances
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.StopLoading ( )
Abort loading of all items in the load queue
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.StopSpeaking ( )
Stop playback of currently played audio clip
virtual void Meta.WitAi.TTS.Utilities.TTSSpeaker.Stop ( )
Stops loading and playback immediately
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SetVoiceOverride
( TTSVoiceSettings overrideVoiceSettings )
Set a voice override for future requests
Parameters
overrideSettings
The settings to be applied to upcoming requests
void Meta.WitAi.TTS.Utilities.TTSSpeaker.ClearVoiceOverride ( )
Clears the current voice override
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
overrideVoiceSettings
Custom voice settings to be used for this and upcoming requests
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified response node and disk cache settings Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node and playback events Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
playbackEvents
Events to be called for this specific tts playback request
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.Speak
( WitResponseNode responseNode )
Load a tts clip using the specified response node and playback events Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
Returns
True if responseNode is decoded successfully
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
textToSpeak
The text to be spoken
overrideVoiceSettings
Custom voice settings to be used for this and upcoming requests
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings and then waits for the file to load and play. Cancels all previous clips when loaded and then plays.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
void Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( string textToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textToSpeak
The text to be spoken
overrideVoiceSettings
Custom voice settings to be used for this and upcoming requests
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text, disk cache settings and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text and playback events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
playbackEvents
Events to be called for this specific tts playback request
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text and disk cache settings events. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
Returns
True if responseNode is decoded successfully
bool Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueued
( WitResponseNode responseNode )
Load a tts clip using the specified text. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
Returns
True if responseNode is decoded successfully
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( string [] textsToSpeak,
TTSVoiceSettings overrideVoiceSettings,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
textsToSpeak
Multiple texts to be spoken
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases, disk cache settings and playback events and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases and playback events and then waits for the files to load & play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( WitResponseNode responseNode,
TTSDiskCacheSettings diskCacheSettings )
Load a tts clip using the specified text phrases and disk cache settings and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
diskCacheSettings
Specific tts load caching settings
IEnumerator Meta.WitAi.TTS.Utilities.TTSSpeaker.SpeakQueuedAsync
( WitResponseNode responseNode )
Load a tts clip using the specified text phrases and then waits for the files to load and play. Adds clip to playback queue and will speak once queue has completed all playback.
Parameters
responseNode
Parsed data that includes text to be spoken and voice settings
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Pause ( )
Pause any current or future loaded audio playback
void Meta.WitAi.TTS.Utilities.TTSSpeaker.Resume ( )
Resume playback for current and future audio clips
void Meta.WitAi.TTS.Utilities.TTSSpeaker.PrepareToSpeak ( )
Call before sending speech data to warm up system
void Meta.WitAi.TTS.Utilities.TTSSpeaker.StartTextBlock ( )
Call at the start of a larger text block to indicate many queued requests will be coming
void Meta.WitAi.TTS.Utilities.TTSSpeaker.EndTextBlock ( )
Call at the end of a larger text block to indicate a block of text is complete.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon