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

WitWebSocketSpeechRequest Class

Performs a request that transmits raw audio samples to a web service, downloads and encodes responses.

Properties

Callback when the server is ready to upload audio

Events

Callback action when ready for input is toggled on

Member Functions

Constructor for request that posts binary audio data
Parameters
endpoint
The endpoint to be used for the request
parameters
All additional data required for the request
requestId
A unique id to be used for the request
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.
Parameters
jsonString
Raw json string.
jsonData
Decoded json data object.
binaryData
Decoded binary data chunk which should be null or empty.
Public method for sending binary audio data
Parameters
buffer
The buffer used for uploading data
offset
The starting offset of the buffer selection
length
The length of the buffer to be used
Stop sending audio data
Did you find this page helpful?
Thumbs up icon
Thumbs down icon