WitWebSocketSpeechRequest
(
endpoint
, parameters
, requestId
, clientUserId
, endWithFullTranscription
)
|
Constructor for request that posts binary audio data
Signature
Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.WitWebSocketSpeechRequest(string endpoint, Dictionary< string, string > parameters, string requestId=null, string clientUserId=null, bool endWithFullTranscription=false) Parameters endpoint: stringÂ
The endpoint to be used for the request
parameters: Dictionary< string, string >Â
All additional data required for the request
requestId: stringÂ
A unique id to be used for the request
clientUserId: stringendWithFullTranscription: bool |
IsReadyForInput
: bool
[Get] |
Callback when the server is ready to upload audio
Signature
bool Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.IsReadyForInput |
OnReadyForInput
: Action |
Callback action when ready for input is toggled on
Signature
Action Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.OnReadyForInput |
CloseAudioStream
()
|
Stop sending audio data
Signature
virtual void Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.CloseAudioStream() Returns void |
HandleDownload
(
jsonString
, jsonData
, binaryData
)
|
Called multiple times as partial responses are received. Determines if ready for input and if so, performs the appropriate callback following the application of data.
Signature
override void Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.HandleDownload(string jsonString, WitResponseNode jsonData, byte[] binaryData) Parameters jsonString: stringÂ
Raw json string.
binaryData: byte []Â
Decoded binary data chunk which should be null or empty.
Returns override void |
SendAudioData
(
buffer
, offset
, length
)
|
Public method for sending binary audio data
Signature
void Meta.Voice.Net.WebSockets.Requests.WitWebSocketSpeechRequest.SendAudioData(byte[] buffer, int offset, int length) Parameters buffer: byte []Â
The buffer used for uploading data
offset: intÂ
The starting offset of the buffer selection
length: intÂ
The length of the buffer to be used
Returns void |