Speech API with browser data

95 views
Skip to first unread message

john.sco...@gmail.com

unread,
Sep 7, 2016, 12:56:56 PM9/7/16
to grpc.io

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):

encoding='LINEAR16'

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.

Carl Mastrangelo

unread,
Sep 13, 2016, 7:09:02 PM9/13/16
to grpc.io
Where does gRPC fit in?   You may need to forward this to a different mailing list.

Eric Anderson

unread,
Sep 16, 2016, 11:22:59 PM9/16/16
to john.sco...@gmail.com, grpc.io
For Google service-specific issues, please start a question on Stack Overflow. In this case it seems you should tag it with google-speech-api.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/5a28a259-116b-4f0f-b642-d9cdbee5c52e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages