Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@google-cloud/speech

Package Overview
Dependencies
Maintainers
4
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/speech

Cloud Speech Client Library for Node.js

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.1K
decreased by-81.79%
Maintainers
4
Weekly downloads
 
Created
Source

Google Cloud Platform logo

Google Cloud Speech API: Node.js Samples

Open in Cloud Shell

The Cloud Speech API enables easy integration of Google speech recognition technologies into developer applications. Send audio and receive a text transcription from the Cloud Speech API service.

Table of Contents

Before you begin

Before running the samples, make sure you've followed the steps in the Before you begin section of the client library's README.

Samples

Speech Recognition

View the source code.

Open in Cloud Shell

Usage: node recognize.js --help

recognize.js <command>

Commands:
  recognize.js sync <filename>           Detects speech in a local audio file.
  recognize.js sync-gcs <gcsUri>         Detects speech in an audio file located in a Google Cloud Storage bucket.
  recognize.js sync-words <filename>     Detects speech in a local audio file with word time offset.
  recognize.js async <filename>          Creates a job to detect speech in a local audio file, and waits for the job to
                                         complete.
  recognize.js async-gcs <gcsUri>        Creates a job to detect speech in an audio file located in a Google Cloud
                                         Storage bucket, and waits for the job to complete.
  recognize.js async-gcs-words <gcsUri>  Creates a job to detect speech  with word time offset in an audio file located
                                         in a Google Cloud Storage bucket, and waits for the job to complete.
  recognize.js stream <filename>         Detects speech in a local audio file by streaming it to the Speech API.
  recognize.js listen                    Detects speech in a microphone input stream. This command requires that you
                                         have SoX installed and available in your $PATH. See
                                         https://www.npmjs.com/package/node-record-lpcm16#dependencies

Options:
  --version              Show version number                                                                   [boolean]
  --encoding, -e                                                                          [string] [default: "LINEAR16"]
  --sampleRateHertz, -r                                                                        [number] [default: 16000]
  --languageCode, -l                                                                         [string] [default: "en-US"]
  --help                 Show help                                                                             [boolean]

Examples:
  node recognize.js sync ./resources/audio.raw -e LINEAR16 -r 16000
  node recognize.js async-gcs gs://gcs-test-data/vr.flac -e FLAC -r 16000
  node recognize.js stream ./resources/audio.raw  -e LINEAR16 -r 16000
  node recognize.js listen

For more information, see https://cloud.google.com/speech/docs

Speech Recognition v1p1beta1

View the source code.

Open in Cloud Shell

Usage: node recognize.v1p1beta1.js --help

recognize.v1p1beta1.js <command>

Commands:
  recognize.v1p1beta1.js sync-model <filename> <model>    Detects speech in a local audio file using provided model.
  recognize.v1p1beta1.js sync-model-gcs <gcsUri> <model>  Detects speech in an audio file located in a Google Cloud
                                                          Storage bucket using provided model.

Options:
  --version              Show version number                                                                   [boolean]
  --encoding, -e                                                                          [string] [default: "LINEAR16"]
  --sampleRateHertz, -r                                                                        [number] [default: 16000]
  --languageCode, -l                                                                         [string] [default: "en-US"]
  --help                 Show help                                                                             [boolean]

Examples:
  node recognize.v1p1beta1.js sync-model ./resources/Google_Gnome.wav video -e LINEAR16 -r 16000
  node recognize.v1p1beta1.js sync-model-gcs gs://gcs-test-data/Google_Gnome.wav phone_call -e FLAC -r 16000

For more information, see https://cloud.google.com/speech/docs

betaFeatures v1p1beta1

View the source code.

Open in Cloud Shell

Usage: node betaFeatures.js --help

betaFeatures.js <command>

Commands:
  betaFeatures.js sync-model <filename> <model>    Detects speech in a local audio file using provided model.
  betaFeatures.js sync-model-gcs <gcsUri> <model>  Detects speech in an audio file located in a Google Cloud
                                                          Storage bucket using provided model.

Options:
  --version              Show version number                                                                   [boolean]
  --encoding, -e                                                                          [string] [default: "LINEAR16"]
  --sampleRateHertz, -r                                                                        [number] [default: 16000]
  --languageCode, -l                                                                         [string] [default: "en-US"]
  --help                 Show help                                                                             [boolean]

Examples:
  node betaFeatures.js sync-model ./resources/Google_Gnome.wav video -e LINEAR16 -r 16000
  node betaFeatures.js sync-model-gcs gs://gcs-test-data/Google_Gnome.wav phone_call -e FLAC -r 16000

For more information, see https://cloud.google.com/speech/docs

Keywords

FAQs

Package last updated on 12 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc