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

WitWebSocketTtsRequest Class

Performs a single authentication request
Meta::Voice::Net::WebSockets::Requests::WitWebSocketTtsRequest extends Meta.Voice.Net.WebSockets.Requests.WitWebSocketJsonRequest.

Overview

Properties

string
Accessor for text to speak
Dictionary< string, string >
Accessor for voice setting values
Accessor for audio type
bool
Accessor for whether or not events should be requested
string
If set, downloads decoded audio and events to this path. Should include directory and file name without extension.

Data Fields

Action< float[]>
Callback for sample received from service
Callback for event json received from service

Public Member Functions

WitWebSocketTtsRequest
( string textToSpeak,
Dictionary< string, string > voiceSettings,
TTSWitAudioType audioType,
bool useEvents,
string downloadPath )
Generates encoded chunk and applies reference data for all parameters
override void
HandleDownload
( WitResponseNode jsonData,
byte [] binaryData )
Handles the download, decode and callbacks for audio & audio event data
override string
Provides information of all parameters

Object Data

override void
Method called for first response handling to mark download begin, setup file strean & perform first response callback on main thread.
override void
Callback when last chunk has been downloaded

Details

Properties

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

Fields

Action<float[]> Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.OnSamplesReceived
Callback for sample received from service
Action<WitResponseArray> Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.OnEventsReceived
Callback for event json received from service

Member Functions

Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.WitWebSocketTtsRequest
( string textToSpeak,
Dictionary< string, string > voiceSettings,
TTSWitAudioType audioType,
bool useEvents,
string downloadPath )
Generates encoded chunk and applies reference data for all parameters
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleDownload
( WitResponseNode jsonData,
byte [] binaryData )
Handles the download, decode and callbacks for audio & audio event data
Parameters
jsonData
Decoded json data object.
binaryData
Decoded binary data chunk which may be null or empty.
override string Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.ToString ( )
Provides information of all parameters

Object Data

override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleDownloadBegin ( )
Method called for first response handling to mark download begin, setup file strean & perform first response callback on main thread.
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketTtsRequest.HandleComplete ( )
Callback when last chunk has been downloaded
Did you find this page helpful?
Thumbs up icon
Thumbs down icon