Ruby Client for Google Cloud Speech API (Alpha)
Google Cloud Speech API: Google Cloud Speech API.
In order to use this library, you first need to go through the following steps:
- Select or create a Cloud Platform project.
- Enable billing for your project.
- Enable the Google Cloud Speech API.
- Setup Authentication.
$ gem install google-cloud-speech
require "google/cloud/speech"
speech_client = Google::Cloud::Speech.new
language_code = "en-US"
sample_rate_hertz = 44100
encoding = :FLAC
config = {
language_code: language_code,
sample_rate_hertz: sample_rate_hertz,
encoding: encoding
}
uri = "gs://gapic-toolkit/hello.flac"
audio = { uri: uri }
response = speech_client.recognize(config, audio)
- Read the Client Library Documentation for Google Cloud Speech API to see other available methods on the client.
- Read the Google Cloud Speech API Product documentation to learn more about the product and see How-to Guides.
- View this repository's main README to see the full list of Cloud APIs that we cover.