PHPackages                             di-space/yandex-stt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. di-space/yandex-stt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

di-space/yandex-stt
===================

PHP Yandex SpeechKit

1.0.2(6y ago)093MITPHPPHP &gt;=7.2

Since Aug 24Pushed 6y ago2 watchersCompare

[ Source](https://github.com/di-space/yandex-stt)[ Packagist](https://packagist.org/packages/di-space/yandex-stt)[ RSS](/packages/di-space-yandex-stt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (9)Used By (0)

О пакете?
---------

[](#о-пакете)

Пакет реализовывает распознание речи из коротких аудио-файлов через сервис Yandex SpeechKit для PHP.

Ограничения накладываемые Яндексом

- Максимальный размер файла — 1 МБ
- Максимальная длительность — 30 секунд
- Максимальное количество аудиоканалов — 1

ВНИМАНИЕ! Сервис Yandex SpeechKit платный! Подробнее о тарифах можно ознакомиться [на этой странице](https://cloud.yandex.ru/docs/speechkit/pricing#rules-stt-short)

Установка
---------

[](#установка)

**Composer**

Добавить зависимость через Сomposer

```
   composer require di-space/yandex-stt
```

Использование
-------------

[](#использование)

Для начала вам нужно создать аккаунт в Яндекс Облаке и получить ваш IAM-TOKEN

Подробнее о вариантах получении тоукена можно узнать [в документации SpeechKit](https://cloud.yandex.ru/docs/speechkit/concepts/auth)

В случае, если вы будете передавать пользовательский, а не сервисный тоукен - вам так же потребуется Ваш Идентификатор Каталога(folderID)

### Упрощённый вариант

[](#упрощённый-вариант)

Импортировать YandexSTT

```
   use DiSpace\YandexSTT\YandexSTT;
```

Для удобства ввода дополнительных параметров можно импортировать интерфейс SpeechParamsInterface

```
   use DiSpace\YandexSTT\Request\SpeechParamsInterface;
```

Создание запроса из пути к аудио-файлу. В результате вернётся строка с распознаным текстом. Внимание, если не задавать дополнительных параметров, то ожидаемый формат файла [OggOpus](https://wiki.xiph.org/OggOpus)

```
   YandexSTT::getTextByAudioFilePath('', '');
```

Дополнительный параметры передаются в виде массива

```
    YandexSTT::getTextByAudioFilePath('', '', [
        'format' => SpeechRequestInterface::FORMAT_OGG,
        'lang' => SpeechRequestInterface::LANG_RU
    ]);
```

##### Доступные параметры

[](#доступные-параметры)

`format` - Формат файла. Варианты **SpeechRequestInterface::FORMAT\_OGG** или **SpeechRequestInterface::FORMAT\_LPCM**

`lang` - Язык. Варианты **SpeechRequestInterface::LANG\_RU**, **SpeechRequestInterface::LANG\_EN** и **SpeechRequestInterface::LANG\_TR**

---

Если ваш тоукен получен для пользовательского, а не сервисного аккаунта, то вам нужно передать четвёртым параметром ваш идентификатор каталога(folderID).

```
   YandexSTT::getTextByAudioFilePath('', '', [], '');
```

---

Так же можно передать содержимое аудио-файла напрямую с помощью метода getTextByAudioDirect. Параметры аналогичный getTextByAudioFilePath

```
   YandexSTT::getTextByAudioDirect('', '', [], ['folderId']);
```

### Продвинутый вариант использования

[](#продвинутый-вариант-использования)

```
Документация будет добавлена позже...

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~26 days

Recently: every ~46 days

Total

8

Last Release

2266d ago

Major Versions

0.1.5 → 1.0.02020-02-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/1005528b447448587e67306ef6c7a4bf55aeecb5c5018d763975387696b4e219?d=identicon)[di-space](/maintainers/di-space)

---

Top Contributors

[![dispaceteam](https://avatars.githubusercontent.com/u/57710798?v=4)](https://github.com/dispaceteam "dispaceteam (14 commits)")[![di-space](https://avatars.githubusercontent.com/u/37057066?v=4)](https://github.com/di-space "di-space (6 commits)")

---

Tags

phpphp-libraryphp7speech-recognitionspeech-to-textspeechkityandex

### Embed Badge

![Health badge](/badges/di-space-yandex-stt/health.svg)

```
[![Health](https://phpackages.com/badges/di-space-yandex-stt/health.svg)](https://phpackages.com/packages/di-space-yandex-stt)
```

###  Alternatives

[open-southeners/laravel-companion-apps

Extend your Laravel applications with companions apps (Android, iOS, PWA...)

233.9k](/packages/open-southeners-laravel-companion-apps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
