Reputation: 1445
I would like to use Googles Speech Recognition API via the streaming method, so I stream my file and get the text in real time back. That is needed so I know when something was said in the audio file. The problem is, that I don't use any of the languages Google provides an SDK for and their documentation doesn't show how to make such a request without their SDKs.
Does someone know how to do it?
Upvotes: 0
Views: 1491
Reputation: 49483
The Streaming support for Google Cloud Speech Recognition API is available only through gRPC, the reason being it is tough or almost impossible to implement streaming with just plain old REST APIs.
Streaming Speech Recognition allows you to stream audio to the Cloud Speech API and receive a stream speech recognition results in real time as the audio is processed. See also the audio limits for streaming speech recognition requests. Streaming speech recognition is available via gRPC only.
Having said that the Cloud Speech API Client library is available in the following languages and covers a decent spectrum of common developer languages.
- C#
- Go
- Java
- Node.JS
- PHP
- Python
- Ruby
Since you haven't mentioned the language you're using, and if you do use a language other than one from the above list, you could very well look into the client library source code (for a different language) and how it uses gRPC to do the streaming and implement it in the language you're using.
Again the only limitation now is a language which gRPC has support for. Compared to the above list, gRPC has support for C++ and Objective C. So if you are using one of them, this could very well be a viable option albeit with a lot of digging into the client library codebase.
I do agree that having support for C++ and/or ObjectiveC in the google client libraries will be really useful for developers.
UPDATE: On a quick search, I found this github repo which has few samples on how to call the Google Cloud Speech API using C++ (still not sure if that is the language you're using though).
Upvotes: 1