# yandex-recognizer

> Node JS interface to Yandex speech recognition service

Latest version **0.3.0** (published 2016-06-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install yandex-recognizer
pnpm add yandex-recognizer
yarn add yandex-recognizer
bun add yandex-recognizer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2016-06-18 |
| First published | 2016-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yandex & Jungle Software |
| Maintainers | airgraph |
| Keywords | speech-recognition |

## Links

- npm: https://www.npmjs.com/package/yandex-recognizer
- npm.io page: https://npm.io/package/yandex-recognizer

## Dependencies (2)

- [node-uuid](https://npm.io/package/node-uuid.md) ~1.4.7
- [websocket](https://npm.io/package/websocket.md) ~1.0.22

## Recent versions

- 0.3.0 (latest) — 2016-06-18
- 0.2.4 — 2016-05-09
- 0.2.3 — 2016-03-26
- 0.2.2 — 2016-03-24
- 0.2.1 — 2016-02-15
- 0.2.0 — 2016-02-14
- 0.1.2 — 2016-02-11
- 0.1.1 — 2016-02-05
- 0.1.0 — 2016-02-05
- 0.0.5 — 2016-02-03
- 0.0.4 — 2016-02-03
- 0.0.3 — 2016-01-31
- 0.0.2 — 2016-01-31
- 0.0.1 — 2016-01-31

## README

# yandex-recognizer
Node JS interface to yandex speech recognition service

## Questions and Bug Reports
* mailing list: Victor.Vazin@gmail.com

## Installation
Install the yandex-recognizer and it's dependencies by executing
the following `NPM` command.
```
npm install yandex-recognizer --save
```
## Troubleshooting
The yandex-recognizer depends on several other packages. These are.

* node-uuid
* websocket

Ensure, that your user has write permission to wherever the node modules
are being installed.

QuickStart
==========
Add require to your app:
```
var yandex = require('yandex-recognizer');
```
Create service:
```
var service = yandex.Recognizer(config);
```
`config` object must define at least 5 properties:
```
config = {

	onConnect: function(sessionId, code),
	onResult: function(data),
	onError: function(e),
	onClose: function(e),
	apikey: 'YOUR-OWN-YANDEX-API-KEY'

}

// All other properties will be set by default (see source code for all available).
```
Connect service to your app:
```
service.connect();
```
`onConnect(sessionId, code)` method will launched in case of successfull connect. Here you send sound data for recognition:
```
service.send(db, cbLength);

// db (typeof Buffer) - your sound file data.
// cbLength (typeof Number) - length of chunk buffer.
```
`onResult(data)` method receive recognized text and some other data.

`onError(e)` method receive error massages.

`onClose(e)` method receive close massage.

## Limitations
Input audio file format may be now only: 

* Sample Encoding: 16-bit Signed Integer PCM, Sample Rate: 16000, 1 Channel.

## Next Steps
* [yandex-recognizer documentation](https://github.com/AirGraph/yandex-recognizer)
* [node example](https://github.com/AirGraph/yandex-recognizer/tree/master/example)
* [ajax cgi](https://www.npmjs.com/package/ysr-cgi)

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