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

ISpeaker Interface

Overview

Properties

bool
Whether a clip is currently playing for this speaker
bool
Whether a clip is currently paused
Events[Get]
Events related to the playback of
The specific voice properties used by this speaker
The script used to perform audio playback of IAudioClipStreams.

Public Member Functions

void
Speak
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text & 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 & playback events. Adds clip to playback queue and will speak once queue has completed all playback.
IEnumerator
SpeakAsync
( string textToSpeak )
Load a tts clip using the specified text and then waits for the file to load & play. Cancels all previous clips when loaded & then plays.
bool
Speak
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node & playback events Cancels all previous clips when loaded & then plays.
IEnumerator
SpeakQueuedAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases & 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,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases & 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.
void
Stop ( )
Stops loading & playback immediately
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

Properties

bool Meta.WitAi.TTS.Interfaces.ISpeaker.IsSpeaking
Whether a clip is currently playing for this speaker
bool Meta.WitAi.TTS.Interfaces.ISpeaker.IsPaused
Whether a clip is currently paused
TTSSpeakerEvents Meta.WitAi.TTS.Interfaces.ISpeaker.Events
Events related to the playback of
TTSVoiceSettings Meta.WitAi.TTS.Interfaces.ISpeaker.VoiceSettings
The specific voice properties used by this speaker
IAudioPlayer Meta.WitAi.TTS.Interfaces.ISpeaker.AudioPlayer
The script used to perform audio playback of IAudioClipStreams.

Member Functions

void Meta.WitAi.TTS.Interfaces.ISpeaker.Speak
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text & 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.Interfaces.ISpeaker.SpeakQueued
( string textToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text & 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
IEnumerator Meta.WitAi.TTS.Interfaces.ISpeaker.SpeakAsync
( string textToSpeak )
Load a tts clip using the specified text and then waits for the file to load & play. Cancels all previous clips when loaded & then plays.
Parameters
textToSpeak
The text to be spoken
bool Meta.WitAi.TTS.Interfaces.ISpeaker.Speak
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified response node & playback events Cancels all previous clips when loaded & then plays.
Parameters
responseNode
Parsed data that includes text to be spoken & voice settings
playbackEvents
Events to be called for this specific tts playback request
Returns
True if responseNode is decoded successfully
IEnumerator Meta.WitAi.TTS.Interfaces.ISpeaker.SpeakQueuedAsync
( WitResponseNode responseNode,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases & 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 & voice settings
playbackEvents
Events to be called for this specific tts playback request
IEnumerator Meta.WitAi.TTS.Interfaces.ISpeaker.SpeakQueuedAsync
( string [] textsToSpeak,
TTSSpeakerClipEvents playbackEvents )
Load a tts clip using the specified text phrases & 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
void Meta.WitAi.TTS.Interfaces.ISpeaker.Stop ( )
Stops loading & playback immediately
void Meta.WitAi.TTS.Interfaces.ISpeaker.Pause ( )
Pause any current or future loaded audio playback
void Meta.WitAi.TTS.Interfaces.ISpeaker.Resume ( )
Resume playback for current and future audio clips
void Meta.WitAi.TTS.Interfaces.ISpeaker.PrepareToSpeak ( )
Call before sending speech data to warm up system
void Meta.WitAi.TTS.Interfaces.ISpeaker.StartTextBlock ( )
Call at the start of a larger text block to indicate many queued requests will be coming
void Meta.WitAi.TTS.Interfaces.ISpeaker.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