# @fonoster/googleasr

> Wrapper for Google ASR

Latest version **0.4.13** (published 2024-03-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @fonoster/googleasr
pnpm add @fonoster/googleasr
yarn add @fonoster/googleasr
bun add @fonoster/googleasr
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.13 |
| Published | 2024-03-16 |
| First published | 2021-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8168 |
| Author | Pedro Sanders |
| Maintainers | fonoster-oss |

## Links

- npm: https://www.npmjs.com/package/@fonoster/googleasr
- Repository: https://github.com/fonoster/fonoster
- Homepage: https://github.com/fonoster/fonoster#readme
- Issues: https://github.com/fonoster/fonoster/issues
- npm.io page: https://npm.io/package/@fonoster/googleasr

## Dependencies (5)

- [bson-objectid](https://npm.io/package/bson-objectid.md) ^2.0.2
- [@fonoster/common](https://npm.io/package/@fonoster/common.md) ^0.4.13
- [@fonoster/logger](https://npm.io/package/@fonoster/logger.md) ^0.4.13
- [node-record-lpcm16](https://npm.io/package/node-record-lpcm16.md) ^1.0.1
- [@google-cloud/speech](https://npm.io/package/@google-cloud/speech.md) ^5.4.0

## Recent versions

- 0.4.13 (latest) — 2024-03-16
- 0.5.5 (next) — 2024-04-13
- 0.5.4 — 2024-04-13
- 0.5.1 — 2024-03-30
- 0.5.0 — 2024-03-28
- 0.4.22 — 2024-03-18
- 0.4.20 — 2024-03-17
- 0.4.19 — 2024-03-17
- 0.4.18 — 2024-03-17
- 0.4.17 — 2024-03-17
- 0.4.15 — 2024-03-16
- 0.4.14 — 2024-03-16
- 0.4.12 — 2024-03-15
- 0.4.10 — 2023-12-12
- 0.4.9 — 2023-12-12
- … 81 more at https://npm.io/package/@fonoster/googleasr/versions

## README

Voice application plugin that accurately convert speech into text using an API powered by Google’s AI technologies.

## Installation

```bash
npm install @fonoster/googleasr
```

or

```bash
yarn add @fonoster/googleasr
```

## Usage

```javascript
const { VoiceServer } = require("@fonoster/voice");
const GoogleASR = require("@fonoster/googleasr");
const voiceServer = new VoiceServer({ base: '/voiceapp' });

// Set the server to use the speech APIS
const speechConfig = { keyFilename: "./google.json" };
voiceServer.use(new GoogleASR(speechConfig));

voiceServer.listen(async(req, res) => {
  console.log(req);
  await res.answer();
  // To use this verb you MUST have a TTS plugin
  const speech = await res.gather();

  console.log("User input: " + speech");
  await res.hangup();
});
```

---
_Source: https://npm.io/package/@fonoster/googleasr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
