- Home /
Question by
sinmay · Feb 13, 2018 at 07:18 PM ·
audioaudiosourceaudioclipmicrophonewebservice
How to record audio in chunks and send through websocket?
I am building an application using unity where I am using the Bing STT for speech recognition. I am using the websocket protocol to talk to the server which is defined here. The protocol requires to send audio data in chunks (of < 8192 bytes) and then the server responds with the hypothesis of the speech.
As of right now I am using Microphone.Start to start recording and then Microphone.End to stop recording and then sending the whole audio data.
I am not able to figure out how can I get chunks of audio data, while the user is speaking, and then asynchronously send it to the server for speech recognition.
Comment