Socket
Socket
Sign inDemoInstall

google-speech-from-buffer

Package Overview
Dependencies
217
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    google-speech-from-buffer

Wrapper for Google Speech API designed to pass in a buffer and return the recognized text.


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

google-speech-from-buffer

Wrapper for Google Speech API designed to pass in a buffer and return the recognized text.

Google Service Account key

To use Google Speech APIs you must have your api turned on with billing enabled. Walking through the quick start and running example code is the best way to make sure this is set up properly

https://cloud.google.com/speech/docs/getting-started

Once you have competed this, you can create your Service Account Key JSON file default credentials with the appropriate access here:

https://console.cloud.google.com/apis/credentials

Once you save your JSON file to disk, you then must export it so your application can use it.

export GOOGLE_APPLICATION_CREDENTIALS=/whereEver/yourKeyFile.json

Usage

const Speech = require('google-speech-from-buffer');

let speech = new Speech({
  sampleRateHertz: 16000,  // default
  encoding: 'LINEAR16',    // default
  languageCode: 'en-US',   // default
  }
);

speech.recognize(buffer)
  .then((statement) => {
    console.log(statement);
  })
  .catch((error) => {
    console.log(error);
  });

Keywords

FAQs

Last updated on 17 Aug 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc