Search code examples
ruby-on-railsrubygoogle-cloud-platformspeech-to-textgoogle-cloud-speech

Gcloud, ruby on rails, speech to text


I am trying to use Google's new speech to text api: https://cloud.google.com/speech/docs/rest-tutorial . They currently have python and node.js examples.

Unfortunately, my application is RoR. I was looking through https://github.com/GoogleCloudPlatform/gcloud-ruby , which is a gem that interacts with google cloud services (but not speech). I was hoping that I could use the two together to come out with a working solution, but my knowledge of how to use API's is limited.

Enough background, my questions are:

  1. Does anyone know if Google is going to put out a Ruby version of the speech to text api? If yes, is there a timeline?
  2. If I am impatient, how would I go about using their current API's. By this I mean, is there a good resource for someone to learn how to use generic API's?

Solution

  • The gcloud-ruby gem now supports google-cloud-speech.

    To address your other questions, there are no language specific versions of the APIs themselves. They are all HTTP APIs (either REST or gRPC), so they can be used from anything that can make HTTP requests. It can be tricky to use them directly though, because of things like how authentication is handled, which is why client libraries exist for different languages.

    If you want to learn more about how to use the REST APIs directly, first take a look at the doc 'Using OAuth 2.0 for Web Server Applications' to find out how to manually authenticate, which has examples for Ruby and raw HTTP/REST.