Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Streaming microphone input to Google Speech API

I have looked into Google Cloud Speech API and got streaming my microphone working on a Node server.

I was then wondering what would be best practice for streaming my microphone from a web frontend? Is it sending an audiostream from getUserMedia to the Node server and pipe it to the API with the Node API client? Or is is simply saving the voice input to a file that I then transmit to the API?

The intent is to "transcribe" instructions (one or two sentences long) and send the result to another API.

like image 540
Adam Byström Avatar asked Nov 08 '22 00:11

Adam Byström


1 Answers

I'm aware this question is over a year old and the OP has probably either found an answer or given up, but I spent long enough trying in vain to google this before I figured it out that I wanted to help anyone following in my footsteps: I wrote up a tutorial for basically this exact situation here.

like image 85
Amber B. Avatar answered Nov 14 '22 22:11

Amber B.