3
votes

I'm struggling to find out examples about real time continuous speech recognition with Google Cloud Speech API. My requirement is to use the Mic and detect the speech and transcribe them while the user is speaking.

I know their REST API do not have this support so I looked into grpc examples, including the examples they provided. But they all seems like examples where user can upload a audio and detect speech.

I'm on Java and Google grpc supports java as well. Anyone came across a good example which shows how to do this recognition continuously via Mic?

1
how are u getting the audio stream from the mic to your service layer? github.com/GoogleCloudPlatform/java-docs-samples/tree/master/… should work. find a proj matches ur client-side.. As comment, the continuous streaming dependencies include grpc / proto-buffers .... much heavier stack compared to the REST u mention... do u really need the continuous streaming . if yes be prepped for some extra time with the build env and the dependencies dragged in with grpc/PBufs.... be very careful changing ANY grpc and or protoBuffer versions from what u find in a sample such as the link - Robert Rowntree
best sample ive seen of continuous streaming is an android proj.... github.com/yurifariasg/android-google-speech-sample .. dont mean to confuse .. choose one or the other git proj and dont mix them.. IMO u hava choice on where the gRpc client goes... right with the microphone via native client .... OR , following network IO on the audio stream, from your java services layer... up to u - Robert Rowntree

1 Answers

0
votes

There is an example of performing streaming speech recognition on an audio stream received from a microphone, namely on the "Performing Streaming Speech Recognition" documentation page, in the "Performing Streaming Speech Recognition on an Audio Stream" sub-chapter. The C++ tab should offer a code example most similar to Java.