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

WitTTSVRequest Class

A WitVRequest subclass for handling requests
Meta::WitAi::Requests::WitTTSVRequest extends Meta.WitAi.Requests.WitVRequest.

Overview

Properties

string
Dictionary< string, string >
TtsData[Get]
bool
Stream[Get]
bool
AudioTextDecodeDelegate

Public Member Functions

WitTTSVRequest
( IWitRequestConfiguration configuration,
string requestId,
string textToSpeak,
Dictionary< string, string > ttsData,
TTSWitAudioType audioFileType,
bool audioStream,
RequestProgressDelegate onDownloadProgress,
bool useTextStream,
AudioTextDecodeDelegate onTextDecoded )
Constructor for wit based text-to-speech VRequests
string
RequestStream
( IAudioClipStream clipStream,
RequestCompleteDelegate< IAudioClipStream > onClipReady )
Performs a wit tts request that streams audio data into the provided audio clip stream.
Performs a wit tts request that streams audio data into the provided audio clip stream & returns once the request is ready
string
RequestDownload
( string downloadPath,
RequestCompleteDelegate< bool > onComplete )
Performs a wit tts request that streams audio data into the a specific path on disk.
async Task< string >
RequestDownloadAsync
( string downloadPath )
Performs a wit tts request that streams audio data into the a specific path on disk and asynchronously returns any errors encountered once complete

Object Data

override Dictionary< string, string >

Static Public Member Functions

static string
GetWebErrors
( string textToSpeak,
IWitRequestConfiguration configuration )
Method for determining if there are problems that will arise with performing a web request prior to doing so
GetWitAudioType
( AudioType audioType )
static AudioType
GetAudioType
( TTSWitAudioType witAudioType )
static string
static bool
Performs a check on whether audio can be streamed or not

Details

Properties

string Meta.WitAi.Requests.WitTTSVRequest.TextToSpeak
No description available.
Dictionary<string, string> Meta.WitAi.Requests.WitTTSVRequest.TtsData
No description available.
TTSWitAudioType Meta.WitAi.Requests.WitTTSVRequest.FileType
No description available.
bool Meta.WitAi.Requests.WitTTSVRequest.Stream
No description available.
bool Meta.WitAi.Requests.WitTTSVRequest.UseTextStream
No description available.
AudioTextDecodeDelegate Meta.WitAi.Requests.WitTTSVRequest.OnTextDecoded
No description available.

Member Functions

Meta.WitAi.Requests.WitTTSVRequest.WitTTSVRequest
( IWitRequestConfiguration configuration,
string requestId,
string textToSpeak,
Dictionary< string, string > ttsData,
TTSWitAudioType audioFileType,
bool audioStream,
RequestProgressDelegate onDownloadProgress,
bool useTextStream,
AudioTextDecodeDelegate onTextDecoded )
Constructor for wit based text-to-speech VRequests
Parameters
configuration
The configuration interface to be used
requestId
A unique identifier that can be used to track the request
textToSpeak
The text to be spoken by the request
ttsData
The text parameters used for the request
audioFileType
The expected audio file type of the request
audioStream
Whether the audio should be played while streaming or should wait until completion.
onDownloadProgress
The callback for progress related to downloading
onFirstResponse
The callback for the first response of data from a request
useEvents
Whether or not events should be requested with this audio request
onTextDecoded
Whether or not events should be requested with this audio request
string Meta.WitAi.Requests.WitTTSVRequest.RequestStream
( IAudioClipStream clipStream,
RequestCompleteDelegate< IAudioClipStream > onClipReady )
Performs a wit tts request that streams audio data into the provided audio clip stream.
Parameters
clipStream
The audio clip stream used to handle audio data caching
onClipReady
The callback when the audio clip stream is ready for playback
Returns
An error string if applicable
async Task<RequestCompleteResponse<IAudioClipStream> > Meta.WitAi.Requests.WitTTSVRequest.RequestStreamAsync
( IAudioClipStream clipStream )
Performs a wit tts request that streams audio data into the provided audio clip stream & returns once the request is ready
Parameters
clipStream
The audio clip stream used to handle audio data caching
onClipReady
The callback when the audio clip stream is ready for playback
Returns
An error string if applicable
string Meta.WitAi.Requests.WitTTSVRequest.RequestDownload
( string downloadPath,
RequestCompleteDelegate< bool > onComplete )
Performs a wit tts request that streams audio data into the a specific path on disk.
Parameters
downloadPath
Path to download the audio clip to
onComplete
The callback when the clip is either completely downloaded or failed to download
Returns
An error string if applicable
async Task<string> Meta.WitAi.Requests.WitTTSVRequest.RequestDownloadAsync
( string downloadPath )
Performs a wit tts request that streams audio data into the a specific path on disk and asynchronously returns any errors encountered once complete
Parameters
downloadPath
Path to download the audio clip to
Returns
An error string if applicable

Object Data

override Dictionary<string, string> Meta.WitAi.Requests.WitTTSVRequest.GetHeaders ( )
No description available.

Static Member Functions

static string Meta.WitAi.Requests.WitTTSVRequest.GetWebErrors
( string textToSpeak,
IWitRequestConfiguration configuration )
Method for determining if there are problems that will arise with performing a web request prior to doing so
static TTSWitAudioType Meta.WitAi.Requests.WitTTSVRequest.GetWitAudioType
( AudioType audioType )
No description available.
static AudioType Meta.WitAi.Requests.WitTTSVRequest.GetAudioType
( TTSWitAudioType witAudioType )
No description available.
static string Meta.WitAi.Requests.WitTTSVRequest.GetAudioMimeType
( TTSWitAudioType witAudioType )
No description available.
static bool Meta.WitAi.Requests.WitTTSVRequest.CanStreamAudio
( TTSWitAudioType witAudioType )
Performs a check on whether audio can be streamed or not
Did you find this page helpful?
Thumbs up icon
Thumbs down icon