API reference

WitWebSocketTtsRequest Class

Performs a single authentication request

Constructors

WitWebSocketTtsRequest ( requestId , textToSpeak , voiceSettings , audioType , useEvents , downloadPath )
Generates encoded chunk and applies reference data for all parameters
Signature
Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.WitWebSocketTtsRequest(string requestId, string textToSpeak, Dictionary< string, string > voiceSettings, TTSWitAudioType audioType, bool useEvents, string downloadPath=null)
Parameters
requestId: string
textToSpeak: string
voiceSettings: Dictionary< string, string >
audioType: TTSWitAudioType
useEvents: bool
downloadPath: string

Fields

OnEventsReceived : AudioJsonDecodeDelegate
Callback for event json received from service
Signature
AudioJsonDecodeDelegate Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.OnEventsReceived
OnSamplesReceived : AudioSampleDecodeDelegate
Callback for sample received from service
Signature
AudioSampleDecodeDelegate Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.OnSamplesReceived

Properties

AudioType : TTSWitAudioType
[Get]
Accessor for audio type
Signature
TTSWitAudioType Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.AudioType
DownloadPath : string
[Get]
If set, downloads decoded audio and events to this path. Should include directory and file name without extension.
Signature
string Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.DownloadPath
TextToSpeak : string
[Get]
Accessor for text to speak
Signature
string Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.TextToSpeak
UseEvents : bool
[Get]
Accessor for whether or not events should be requested
Signature
bool Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.UseEvents
VoiceSettings : Dictionary< string, string >
[Get]
Accessor for voice setting values
Signature
Dictionary<string, string> Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.VoiceSettings

Protected Methods

HandleComplete ()
Callback when last chunk has been downloaded
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleComplete()
Returns
override void
HandleDownloadBegin ()
Method called for first response handling to mark download begin, setup file strean & perform first response callback on main thread.
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleDownloadBegin()
Returns
override void

Methods

HandleDownload ( jsonString , jsonData , binaryData )
Handles the download, decode and callbacks for audio & audio event data
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleDownload(string jsonString, WitResponseNode jsonData, byte[] binaryData)
Parameters
jsonString: string
jsonData: WitResponseNode  Decoded json data object.
binaryData: byte []  Decoded binary data chunk which may be null or empty.
Returns
override void
ToString ()
Provides information of all parameters
Signature
override string Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.ToString()
Returns
override string