public class DataRecognitionClient extends ConversationBase
Modifier and Type | Method and Description |
---|---|
void |
endAudio()
Notify the server that client is done sending audio buffers to the Speech Recognition Service.
|
void |
finalize()
Should only be called when client is ready to break the connection with the Speech Recognition Server.
|
void |
sendAudio(byte[] buffer,
int actualAudioBytesInBuffer)
Send buffers of audio to the Speech Recognition Service.
|
void |
sendAudioFormat(SpeechAudioFormat audioFormat)
If you are not sending up a audio file in wave format, and instead you have just
raw data, then before sending up any audio data, you must first send up an
SpeechAudioFormat descriptor to describe the layout and format of your raw audio data.
|
audioStart, audioStop
public void sendAudioFormat(SpeechAudioFormat audioFormat)
audioFormat
- Audio features that describe the encoding and sampling rate of the audio.public void sendAudio(byte[] buffer, int actualAudioBytesInBuffer)
buffer
- The data bytes of audio to send to the ServeractualAudioBytesInBuffer
- The buffer size is allowed to be larger than the actual audio data in the buffer, so
this parameter states the size of the actual data in the buffer.public void endAudio()
public void finalize() throws java.lang.Throwable
finalize
in class ConversationBase
java.lang.Throwable