Open syedtalha opened 2 years ago
To get this working for Cloud Speech required just going through the .proto
files from googleapis [0] and copying across the dependencies manually - nothing more mysterious than that.
Note that this approach to building a gRPC client was only necessary because at the time there was no official Google SDK for the Cloud Speech v1p1beta1 APi. I would much rather have used an official library to avoid having to deal with protobuf directly.
In your case, you could also check android-docs-samples Dialogflow [1] example which looks to be using java-dialogflow [2] to make the gRPC calls. If nothing else it may help you track down where the dependencies are coming from.
Hope that helps.
[0] https://github.com/googleapis/googleapis [1] https://github.com/GoogleCloudPlatform/android-docs-samples/tree/a49dd7157ee56e5ff8d05d29416f44403b241a46/dialogflow [2] https://github.com/googleapis/java-dialogflow
Thanks. I actually ended up using the official library that you share the link for and it saved me a tonne of time. It still needed some integration since the samples were just for a stored audio file, I managed to wire it up with the Android AudioRecord and it works like a charm. The speech gets recognised in near real-time. I'll be open sourcing the whole solution soon.
On Fri, 18 Mar, 2022, 2:38 am Matt Laurie, @.***> wrote:
To get this working for Cloud Speech required just going through the .proto files from googleapis [0] and copying across the dependencies manually - nothing more mysterious than that.
Note that this approach to building a gRPC client was only necessary because at the time there was no official Google SDK for the Cloud Speech v1p1beta1 APi. I would much rather have used an official library to avoid having to deal with protobuf directly.
In your case, you could also check android-docs-samples Dialogflow [1] example which looks to be using java-dialogflow [2] to make the gRPC calls. If nothing else it may help you track down where the dependencies are coming from.
Hope that helps.
[0] https://github.com/googleapis/googleapis [1] https://github.com/GoogleCloudPlatform/android-docs-samples/tree/a49dd7157ee56e5ff8d05d29416f44403b241a46/dialogflow [2] https://github.com/googleapis/java-dialogflow
— Reply to this email directly, view it on GitHub https://github.com/MattLaurie/google-speech-grpc/issues/2#issuecomment-1071497221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATOYADKBRFZ5UFKNLPNB4TVAONL5ANCNFSM5Q6JF22Q . You are receiving this because you authored the thread.Message ID: @.***>
Great, glad it worked out for you.
I spent a lot of time making a solid solution for realtime voice transcription on Android (and other platforms) so when you open source your code I'd be happy to take a look at it if that'd be helpful.
Hi @MattLaurie Building gRPC stubs from existing googleapis is not well documented. So I was thinking if you could give some insight into how you generated the stubs for a particular folder from googleapis. I tried it out, but the protobuf build system for java / android always throws up dependency errors when i build an individual .proto file form the official googleapis repository. Same for folders. I could help in writing the client side logic and wiring it up as a library, but I am stuck at importing the proto files for a particular method.