IDataRecognitionClientSendAudio Method |
Send buffers of audio to the Speech Recognition Service.Note for wave files, you can just send
data from the file right to the server. The audio must be PCM, mono, 16-bit sample, with
sample rate of 8000 Hz or 16000 Hz. In the case you are not an audio file in wave format,
and instead you have just raw data(for example audio coming over bluetooth), then before
sending up any audio data with this method, you must first send up an SpeechAudioFormat descriptor
to describe the layout and format of your raw audio data via DataRecognitionClient's sendAudioFormat()
method. This work is queued onto a background worker.
Namespace: Microsoft.CognitiveServices.SpeechRecognitionAssembly: SpeechClient (in SpeechClient.dll) Version: 0.0.0.0
Syntax void SendAudio(
byte[] buffer,
int actualAudioBytesInBuffer
)
Sub SendAudio (
buffer As Byte(),
actualAudioBytesInBuffer As Integer
)
void SendAudio(
array<unsigned char>^ buffer,
int actualAudioBytesInBuffer
)
abstract SendAudio :
buffer : byte[] *
actualAudioBytesInBuffer : int -> unit
Parameters
- buffer
- Type: Byte
The byte buffer to send to the Speech Recognition Service - actualAudioBytesInBuffer
- Type: Int32
The number of bytes in the buffer representing actual audio data
See Also