Client libraries

While you can use Speech-to-Text by making direct requests, we provide client libraries for several popular languages. Speech-to-Text client libraries are built on Google Cloud Client Libraries. This common infrastructure provides functionality for API-specific library implementations, but it also provides types and methods that you may use directly when using any Cloud API.

Available client libraries

Speech-to-Text provides client libraries and guides for the following languages:

Python

This page provides reference documentation and related resources for the Speech-to-Text Python client library.

Resource Description
Library reference Speech-to-Text Python library reference
Language guide General guide for using Python with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and Python

Installation

To install the client library:

pip install --upgrade google-cloud-speech

Java

This page provides reference documentation and related resources for the Speech-to-Text Java client library.

Resource Description
Library reference Speech-to-Text Java library reference
Language guide General guide for using Java with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and Java

Installation

To install the client library:

If you are using Maven, add the following to your pom.xml file. For more information about BOMs, see The Google Cloud Platform Libraries BOM.

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>libraries-bom</artifactId>
      <version>16.1.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
  <dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-speech</artifactId>
  </dependency>
</dependencies>

If you are using Gradle, add the following to your dependencies:

compile 'com.google.cloud:google-cloud-speech:1.24.7'

If you are using sbt, add the following to your dependencies:

libraryDependencies += "com.google.cloud" % "google-cloud-speech" % "1.24.7"

If you're using IntelliJ or Eclipse, you can add client libraries to your project using the following IDE plugins:

The plugins provide additional functionality, such as key management for service accounts. Refer to each plugin's documentation for details.

Node.js

This page provides reference documentation and related resources for the Speech-to-Text Node.js client library.

Resource Description
Library reference Speech-to-Text Node.js library reference
Language guide General guide for using Node.js with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and Node.js

Installation

To install the client library:

npm install --save @google-cloud/speech

C#

This page provides reference documentation and related resources for the Speech-to-Text C# client library.

Resource Description
Library reference Speech-to-Text C# library reference
Language guide General guide for using C# with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and C#

Installation

To install the client library:

Install-Package Google.Cloud.Speech.V1 -Pre

Go

This page provides reference documentation and related resources for the Speech-to-Text Go client library.

Resource Description
Library reference Speech-to-Text Go library reference
Language guide General guide for using Go with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and Go

Installation

To install the client library:

go get -u cloud.google.com/go/speech/apiv1

PHP

This page provides reference documentation and related resources for the Speech-to-Text PHP client library.

Resource Description
Library reference Speech-to-Text PHP library reference
Language guide General guide for using PHP with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and PHP

Installation

To install the client library:

composer require google/cloud-speech

Ruby

The Ruby client libraries for Speech-to-Text are currently released as Beta.

This page provides reference documentation and related resources for the Speech-to-Text Ruby client library.

Resource Description
Library reference Speech-to-Text Ruby library reference
Language guide General guide for using Ruby with GCP
GitHub repository Source code and additional documentation for this library
Stack Overflow Questions tagged with Speech-to-Text and Ruby

Installation

To install the client library:

gem install google-cloud-speech

Authentication and access control

The Speech-to-Text quickstart guides provide basic information on authentication and access control. For more detailed information, see the following: