# yandex-alice-client

> Yandex Alice JS client

Latest version **0.3.1** (published 2023-01-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install yandex-alice-client
pnpm add yandex-alice-client
yarn add yandex-alice-client
bun add yandex-alice-client
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2023-01-31 |
| First published | 2023-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.20.0 |
| Dependencies | 2 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | TheEVolk |
| Maintainers | theevolk |
| Keywords | yandex, alice, iot, tts |

## Links

- npm: https://www.npmjs.com/package/yandex-alice-client
- Repository: https://github.com/theevolk/yandex-alice-client
- Homepage: https://github.com/theevolk/yandex-alice-client#readme
- Issues: https://github.com/theevolk/yandex-alice-client/issues
- npm.io page: https://npm.io/package/yandex-alice-client

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.12.0
- [uuid](https://npm.io/package/uuid.md) ^9.0.0

## Recent versions

- 0.3.1 (latest) — 2023-01-31
- 0.3.0 — 2023-01-31
- 0.2.3 — 2023-01-30
- 0.2.2 — 2023-01-30
- 0.2.1 — 2023-01-30
- 0.2.0 — 2023-01-30
- 0.1.5 — 2023-01-29
- 0.1.4 — 2023-01-29
- 0.1.2 — 2023-01-29
- 0.1.1 — 2023-01-29
- 0.1.0 — 2023-01-29

## README

# yandex-alice-client
![Downloads](https://img.shields.io/npm/dm/yandex-alice-client.svg)

Клиент для отправки запросов Яндекс Алисе и получения от неё ответов.

## Преимущества
* Минимальное количество зависимостей 💭
* Поддержка TypeScript типизации 🪑
* Удобный и простой API 🚀
* TTS 📣

## Как использовать
```js
import YandexAliceClient from 'yandex-alice-client';
import { writeFile } from 'node:fs/promises';

const client = new YandexAliceClient();
await client.connect();

const { response } = await client.sendText('hello world');
console.log(response.card.text);

// Alice with TTS
const { audio } = await client.sendText('hello world', { isTTS: true });
console.log(audio); // buffer (audio/opus)

await writeFile('response.opus', audio);

// TTS
const audio = await client.sendText('что за чудеса происходят?', { voice: 'levitan' });
console.log(audio); // buffer (audio/opus)
await writeFile('response.opus', audio);

// close client connection
await client.close();
```

## Contribute
Предлагайте свой функционал в issues или добавляйте свой код самостоятельно, после чего создайте PR, а мы её обязательно рассмотрим.

## RoadMap
Это не совсем план, скорее то, что мы хотели бы видеть:
* Привести код и репозиторий в порядок, добавить eslint и workflow
* Добавить функции умного устройства, убавить/прибавить громкость, включить что-то и т.д.
* Привязка к аккаунту и отправка запросов от настоящей колонки
* sendAudio или streamAudio чтобы отправлять голосовые команды

Пусть это будет некое виртуальное yandexio, точнее его часть, что общается с Алисой.

> С любовью к Яндекс ❤️

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