3
votes

Does Google speech API v2 support audio streaming via web sockets? I found a way to send POST request with audio. However, it would be great if I can write audio and send it via socket in real time.

Note: I use Firefox browser. I know that Google Chrome supports voice recognition from the box, however I'm interested in Firefox and other browsers.

1

1 Answers

0
votes

V2 of the API currently does not support web sockets. The streaming API uses gRPC which would need 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