I'm trying to use the Google Speech API Streaming recognition using browser mic data but im receiving "audio_content too long" response.
I'm sending the data to server like this with WebSockets:
var left = e.inputBuffer.getChannelData(0);
converted = convertFloat32ToInt16(left)
ws.send(converted);
Previously i sent the sample_rate.
And in the server (Python - Tornado):
yield cloud_speech.StreamingRecognizeRequest(audio_content=data)
data is websocket on_message received data.
Error:
E0907 11:06:54.917320718 14891 chttp2_transport.c:1810] close_transport: {"created":"@1473246414.916153833","description":"Secure read failed","file":"src/core/lib/security/transport/secure_endpoint.c","file_line":157,"referenced_errors":[{"created":"@1483156814.912117880","description":"FD shutdown","file":"src/core/lib/iomgr/ev_poll_posix.c","file_line":427}]}
Server error: Audio data is being streamed too fast. Please stream audio data approximately at real time.
Thank you very much.