Skip to main content

Google Cloud Speech API client library

Project description

Cloud Speech API: Converts audio to text by applying powerful neural network models.

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project.

  2. Enable billing for your project.

  3. Enable the Cloud Speech API.

  4. Setup Authentication.

Installation

Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.

With virtualenv, it’s possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.

Mac/Linux

pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-speech

Windows

pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-speech

Preview

SpeechClient

from google.cloud import speech_v1
from google.cloud.speech_v1 import enums

client = speech_v1.SpeechClient()

encoding = enums.RecognitionConfig.AudioEncoding.FLAC
sample_rate_hertz = 44100
language_code = 'en-US'
config = {'encoding': encoding, 'sample_rate_hertz': sample_rate_hertz, 'language_code': language_code}
uri = 'gs://bucket_name/file_name.flac'
audio = {'uri': uri}

response = client.recognize(config, audio)

Next Steps

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

google-cloud-speech-0.36.0.tar.gz (48.9 kB view details)

Uploaded Source

Built Distribution

google_cloud_speech-0.36.0-py2.py3-none-any.whl (55.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file google-cloud-speech-0.36.0.tar.gz.

File metadata

  • Download URL: google-cloud-speech-0.36.0.tar.gz
  • Upload date:
  • Size: 48.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.0

File hashes

Hashes for google-cloud-speech-0.36.0.tar.gz
Algorithm Hash digest
SHA256 6e756ad9e699545877d20bb536b9b8db4589b632177835275c11885cdc6651ca
MD5 152655f5b9c22cbd2e5018a67b68384d
BLAKE2b-256 38601ac4939efb0f62df4901b6a3e9777faa904233a49a70504588fd152eb513

See more details on using hashes here.

Provenance

File details

Details for the file google_cloud_speech-0.36.0-py2.py3-none-any.whl.

File metadata

  • Download URL: google_cloud_speech-0.36.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 55.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.0

File hashes

Hashes for google_cloud_speech-0.36.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 da844937095c2d626fec804a49da3be5286fd3f6d04f3f65d0824752d708e845
MD5 ff3d711dbda0fc61b780352a072881b5
BLAKE2b-256 9aa449b8e7b6b89facc17e554abe6aa401e01e076b64f79745e666460a8d5bd6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page