Google Speech API v2 with sockets

Does Google Speech API v2 support streaming audio over websockets? I found a way to send a POST request with audio. However, it would be great if I could write audio and send it over the socket in real time.

Note. I am using Firefox browser. I know Google Chrome supports voice recognition out of the box, however I'm interested in Firefox and other browsers.

+3


source to share


1 answer


The V2 API does not currently support websockets. The streaming API uses gRPC, which requires a translation layer to work with websockets.

https://cloud.google.com/speech/reference/rpc/google.cloud.speech.v1beta1#google.cloud.speech.v1beta1.Speech.StreamingRecognize



IBM Bluemix does support websockets, check out this sample project to see it in use: https://github.com/triceam/IBMWatson-QA-Speech/blob/master/config/socket.js

0


source







All Articles