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

ITTSWebHandler Interface

Methods

CancelRequests ( clipData )
Cancels any request for a specific clip
Signature
bool Meta.WitAi.TTS.Interfaces.ITTSWebHandler.CancelRequests(TTSClipData clipData)
Parameters
clipData: TTSClipData
Returns
bool
CreateClipData ( clipId , textToSpeak , voiceSettings , diskCacheSettings )
Method for creating a new TTSClipData
Signature
TTSClipData Meta.WitAi.TTS.Interfaces.ITTSWebHandler.CreateClipData(string clipId, string textToSpeak, TTSVoiceSettings voiceSettings, TTSDiskCacheSettings diskCacheSettings)
Parameters
clipId: string  Unique clip identifier
textToSpeak: string  Text to be spoken
voiceSettings: TTSVoiceSettings  Settings for how the clip should sound during playback.
diskCacheSettings: TTSDiskCacheSettings  If and how this clip should be cached.
DecodeTtsFromJson ( responseNode , textToSpeak , voiceSettings )
Decode a response node into text to be spoken or a specific voice setting
Signature
bool Meta.WitAi.TTS.Interfaces.ITTSWebHandler.DecodeTtsFromJson(WitResponseNode responseNode, out string textToSpeak, out TTSVoiceSettings voiceSettings)
Parameters
responseNode: WitResponseNode  Parsed data that includes text to be spoken and voice settings
textToSpeak: out string  The text to be spoken output
voiceSettings: out TTSVoiceSettings  The output for voice settings
Returns
bool  True if decode was successful
GetWebErrors ( clipData )
Method for determining if there are problems that will arise with performing a web request prior to doing so
Signature
string Meta.WitAi.TTS.Interfaces.ITTSWebHandler.GetWebErrors(TTSClipData clipData)
Parameters
clipData: TTSClipData  The clip data to be used for the request
Returns
string  Invalid error(s). It will be empty if there are none
IsDownloadedToDisk ( diskPath )
Performs a check to determine if a file is cached to disk or not
Signature
Task<string> Meta.WitAi.TTS.Interfaces.ITTSWebHandler.IsDownloadedToDisk(string diskPath)
Parameters
diskPath: string  The path to be checked
Returns
Task< string >  Returns an error if the path cannot be found
RequestDownloadFromWeb ( clipData , diskPath )
Method for performing a web download request
Signature
Task<string> Meta.WitAi.TTS.Interfaces.ITTSWebHandler.RequestDownloadFromWeb(TTSClipData clipData, string diskPath)
Parameters
clipData: TTSClipData  Clip request data
diskPath: string  The specific disk path the file should be downloaded to
Returns
Task< string >
RequestStreamFromDisk ( clipData , diskPath , onReady )
Downloads audio from a web service and returns an error if applicable.
Signature
Task<string> Meta.WitAi.TTS.Interfaces.ITTSWebHandler.RequestStreamFromDisk(TTSClipData clipData, string diskPath, Action< TTSClipData > onReady)
Parameters
clipData: TTSClipData  Information about the clip being requested.
diskPath: string  The specific disk path of the file.
onReady: Action< TTSClipData >  Callback on request is ready for playback.
Returns
Task< string >
RequestStreamFromWeb ( clipData , onReady )
Streams audio from a web service and returns an error if applicable.
Signature
Task<string> Meta.WitAi.TTS.Interfaces.ITTSWebHandler.RequestStreamFromWeb(TTSClipData clipData, Action< TTSClipData > onReady)
Parameters
clipData: TTSClipData  Information about the clip being requested.
onReady: Action< TTSClipData >  Callback on request is ready for playback.
Returns
Task< string >