Sample code for sending mic audio from webpage to Google Cloud Speech to Text API using the Google SDK for .Net
Stream audio from mic to Google Speech to Text proxied through a backend
Send full audio file from web page to backend to Google STT
- Successfully achieved the
Second prize
(branch_Record-in-browser-before-sending-all | index.html)
- Capture audio and buffer in page
- Send WAV from web page to backend via POST
- Send WAV from backend to Google STT
- Handle the responses and send back via websocket.
- Working on
First prize
(branch_Record-in-browser-before-sending-all | mediaStreamRecorder.html)
- Capturing audio in 1 sec intervals
- Sending WAV chunks to backend via POST
- Save chucks to disk and ensure are playable WAV files for each chunck
- Send each WAV chunk to Google STT
- No response (400 error)
- Received some results on the
GoogleSample.html
tests using web sockets and streaming
- But mostly still 400 errors in the Google Cloud Console for Speech To Text Api
- Achieve
First prize
- Document code and update README
- merge to master
- Answer https://stackoverflow.com/questions/52518467/streaming-audio-buffer-from-a-web-page-to-c-sharp-google-cloud-speech-to-text-sd