Configuration[Get] The configuration to be used for the request | |
WebSocketAdapter[Get] The script used to transmit data | |
AudioInput[Get] The audio buffer used for audio based requests | |
string | Endpoint[Get] Endpoint to be used |
AudioRequestOption[Get] Whether request is used for transcribing only | |
AudioEncoding[Get] Audio encoding used for audio requests | |
bool | IsInputStreamReady[Get] Whether or not the audio stream is ready |
Action | OnInputStreamReady[Get] Callback when socket connection is ready to send data |
WebSocketRequest[Get] Web socket request being performed |
override bool | DecodeRawResponses[Get] Web socket client decodes responses prior to raw response callback for request id lookup. |
static WitSocketRequest | GetMessageRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, WitRequestOptions options, VoiceServiceRequestEvents events ) Return web socket message request initialized with required data |
static WitSocketRequest | GetSpeechRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) Return web socket speech request initialized with required data to generate an audio request. |
static WitSocketRequest | GetExternalRequest ( WitWebSocketMessageRequest webSocketRequest, WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, WitRequestOptions options, VoiceServiceRequestEvents events ) Return web socket request initialized on an external client but handled locally. |
static WitSocketRequest | GetTranscribeRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) Return web socket transcribe request initialized with required data to generate a short audio request. |
static WitSocketRequest | GetDictationRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) Return web socket dictation request initialized with required data to generate a long form audio request. |
override void | SetState ( VoiceRequestState newState ) Ignore state changes unless setup |
override string | GetSendError ( ) Get send error options |
override void | HandleSend ( ) Begins uploading data |
override void | HandleCancel ( ) Handle cancellation |
override string | Error returned if audio cannot be activated |
override void | Activates audio and calls activated callback once complete |
override void | Deactivates audio asap and calls deactivated callback once complete |
void | Public method for sending binary audio data |
WitConfiguration Meta.WitAi.Requests.WitSocketRequest.Configuration |
---|
The configuration to be used for the request |
WitWebSocketAdapter Meta.WitAi.Requests.WitSocketRequest.WebSocketAdapter |
---|
The script used to transmit data |
AudioBuffer Meta.WitAi.Requests.WitSocketRequest.AudioInput |
---|
The audio buffer used for audio based requests |
string Meta.WitAi.Requests.WitSocketRequest.Endpoint |
---|
Endpoint to be used |
WitAudioRequestOption Meta.WitAi.Requests.WitSocketRequest.AudioRequestOption |
---|
Whether request is used for transcribing only |
AudioEncoding Meta.WitAi.Requests.WitSocketRequest.AudioEncoding |
---|
Audio encoding used for audio requests |
bool Meta.WitAi.Requests.WitSocketRequest.IsInputStreamReady |
---|
Whether or not the audio stream is ready |
Action Meta.WitAi.Requests.WitSocketRequest.OnInputStreamReady |
---|
Callback when socket connection is ready to send data |
WitWebSocketMessageRequest Meta.WitAi.Requests.WitSocketRequest.WebSocketRequest |
---|
Web socket request being performed |
override bool Meta.WitAi.Requests.WitSocketRequest.DecodeRawResponses |
---|
Web socket client decodes responses prior to raw response callback for request id lookup. |
static WitSocketRequest Meta.WitAi.Requests.WitSocketRequest.GetMessageRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, WitRequestOptions options, VoiceServiceRequestEvents events ) |
---|
Return web socket message request initialized with required data Parameters configuration Configuration to be used when authenticating web socket client. webSocketAdapterAdapter used to communicate with web socket client. optionsOptional parameter for web request options. eventsOptional parameter for request event callbacks. Returns |
static WitSocketRequest Meta.WitAi.Requests.WitSocketRequest.GetSpeechRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) |
---|
Return web socket speech request initialized with required data to generate an audio request. Parameters configuration Configuration to be used when authenticating web socket client. webSocketAdapterAdapter used to communicate with web socket client. audioBufferAudio input buffer used to obtain audio data optionsOptional parameter for web request options. eventsOptional parameter for request event callbacks. Returns |
static WitSocketRequest Meta.WitAi.Requests.WitSocketRequest.GetExternalRequest ( WitWebSocketMessageRequest webSocketRequest, WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, WitRequestOptions options, VoiceServiceRequestEvents events ) |
---|
Return web socket request initialized on an external client but handled locally. Parameters webSocketRequest The externally generated web socket request. configurationConfiguration to be used when authenticating web socket client. webSocketAdapterAdapter used to communicate with web socket client. audioBufferAudio input buffer used to obtain audio data optionsOptional parameter for web request options. eventsOptional parameter for request event callbacks. |
static WitSocketRequest Meta.WitAi.Requests.WitSocketRequest.GetTranscribeRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) |
---|
Return web socket transcribe request initialized with required data to generate a short audio request. Parameters configuration Configuration to be used when authenticating web socket client. webSocketAdapterAdapter used to communicate with web socket client. audioBufferAudio input buffer used to obtain audio data optionsOptional parameter for web request options. eventsOptional parameter for request event callbacks. |
static WitSocketRequest Meta.WitAi.Requests.WitSocketRequest.GetDictationRequest ( WitConfiguration configuration, WitWebSocketAdapter webSocketAdapter, AudioBuffer audioBuffer, WitRequestOptions options, VoiceServiceRequestEvents events ) |
---|
Return web socket dictation request initialized with required data to generate a long form audio request. Parameters configuration Configuration to be used when authenticating web socket client. webSocketAdapterAdapter used to communicate with web socket client. audioBufferAudio input buffer used to obtain audio data optionsOptional parameter for web request options. eventsOptional parameter for request event callbacks. |
override void Meta.WitAi.Requests.WitSocketRequest.SetState ( VoiceRequestState newState ) |
---|
Ignore state changes unless setup |
override string Meta.WitAi.Requests.WitSocketRequest.GetSendError ( ) |
---|
Get send error options |
override void Meta.WitAi.Requests.WitSocketRequest.HandleSend ( ) |
---|
Begins uploading data Parameters onSendComplete Callback that handles send completion |
override void Meta.WitAi.Requests.WitSocketRequest.HandleCancel ( ) |
---|
Handle cancellation |
override string Meta.WitAi.Requests.WitSocketRequest.GetActivateAudioError ( ) |
---|
Error returned if audio cannot be activated |
override void Meta.WitAi.Requests.WitSocketRequest.HandleAudioActivation ( ) |
---|
Activates audio and calls activated callback once complete |
override void Meta.WitAi.Requests.WitSocketRequest.HandleAudioDeactivation ( ) |
---|
Deactivates audio asap and calls deactivated callback once complete |
void Meta.WitAi.Requests.WitSocketRequest.Write ( byte [] buffer, int offset, int length ) |
---|
Public method for sending binary audio data Parameters buffer The buffer used for uploading data offsetThe starting offset of the buffer selection lengthThe length of the buffer to be used |