# 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.

```bash
npm install simplest-speech-recognition
```

## Usage

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

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

Then, you can start recognizing speech with:

```javascript
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.
