simplest-speech-recognition
v1.3.4
Published
A simple, single-file library for integrating speech recognition in Node.js applications.
Downloads
15
Maintainers
Readme
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.