1.3.4 • Published 10 days ago

simplest-speech-recognition v1.3.4

Weekly downloads
-
License
ISC
Repository
github
Last release
10 days ago

simplest-speech-recognition

A simple, single-file library for integrating speech recognition in Node.js applications using Google Cloud Speech-to-Text.

Installation

Before installing, ensure you have a Google Cloud project set up with the Speech API enabled and you have generated your credentials JSON file.

npm install simplest-speech-recognition

Usage

To use simplest-speech-recognition, first set your Google Cloud credentials:

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials-file.json"

Then, you can start recognizing speech with:

const { recognizeSpeech } = require('simplest-speech-recognition');

recognizeSpeech();

The library listens to the microphone input and logs the recognized text to the console.

Dependencies

  • @google-cloud/speech: For speech recognition.
  • node-record-lpcm16: For recording audio from the microphone.