PHPackages                             zloesabo/speechkit-php - 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. zloesabo/speechkit-php

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

zloesabo/speechkit-php
======================

Yandex SpeechKit for PHP

2.0.0(10y ago)81.3k1[1 issues](https://github.com/ZloeSabo/speechkit-php/issues)MITPHPPHP &gt;=5.4.0

Since Jul 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/ZloeSabo/speechkit-php)[ Packagist](https://packagist.org/packages/zloesabo/speechkit-php)[ RSS](/packages/zloesabo-speechkit-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

speechkit-php
=============

[](#speechkit-php)

[![Build Status](https://camo.githubusercontent.com/41c78aed9ee6b21f453a92a07017971739419552701ea7b965e2548425d56f90/68747470733a2f2f7472617669732d63692e6f72672f5a6c6f655361626f2f7370656563686b69742d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ZloeSabo/speechkit-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e596de19359c0fb6fdbd9d0dcd46fef2533d296f950c635d74557ca365cd3135/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5a6c6f655361626f2f7370656563686b69742d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ZloeSabo/speechkit-php/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/dd540f264606e3c116ab26d578425304331052c431ea9a287745a3b97c1996ef/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5a6c6f655361626f2f7370656563686b69742d7068702f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ZloeSabo/speechkit-php/?branch=master)

[Yandex SpeechKit](https://tech.yandex.com/speechkit/) PHP library.

Installation
------------

[](#installation)

SpeechKit uses Composer, please checkout the [composer website](http://getcomposer.org) for more information.

Add SpeechKit in your composer.json and you can go ahead:

```
composer require zloesabo/speechkit-php
```

> SpeechKit follows the PSR-4 convention names for its classes, which means you can easily integrate `SpeechKit` classes loading in your own autoloader.

For users of old version
------------------------

[](#for-users-of-old-version)

Usage of previous version is strongly discouraged as it lacked concept and testing. However, if you sure you want to use previous version of library, require it with `composer require zloesabo/speechkit-php:~1.0`

Usage
-----

[](#usage)

### Simple

[](#simple)

```
// Include dependencies installed with composer
require 'vendor/autoload.php';

use SpeechKit\Response\HypothesesList;
use SpeechKit\Response\Hypothesis;
use SpeechKit\Speech\SpeechContent;
use SpeechKit\SpeechKit;

$key = 'your-key-here';

$speechKit = new SpeechKit($key);

//It can be any type of stream. File, string, instance of StreamInterface, etc.
$source = fopen(__DIR__.'/some/path/to/file.mp3', 'r');

$speech = new SpeechContent($source);

//Defaults will be used: mp3, general topic, russian language
/** @var HypothesesList $result */
$result = $speechKit->recognize($speech);

/** @var Hypothesis $hyphotesis */
foreach ($result as $hyphotesis) {
    echo sprintf(
        'Confidence: %.2f Content: %s',
        $hyphotesis->getConfidence(),
        $hyphotesis->getContent()
    ), PHP_EOL;
}
```

### Advanced

[](#advanced)

```
require 'vendor/autoload.php';

use SpeechKit\Client\Curl;
use SpeechKit\Response\HypothesesList;
use SpeechKit\Response\Hypothesis;
use SpeechKit\ResponseParser\SimpleXML;
use SpeechKit\Speech\SpeechContent;
use SpeechKit\Speech\SpeechContentInterface;
use SpeechKit\SpeechKit;
use SpeechKit\Uploader\Uploader;
use SpeechKit\Uploader\UrlGenerator;

$key = 'your-key-here';

$urlGenerator = new UrlGenerator($key);

//You could use any type of client which implements ClientInterface
$client = new Curl();
$uploader = new Uploader($urlGenerator, $client);

//You could use any type of parser which implements ResponseParserInterface
$responseParser = new SimpleXML();

$speechKit = new SpeechKit($key, $uploader, $responseParser);

$source = fopen(__DIR__.'/some/path/to/file.mp3', 'r');
$speech = new SpeechContent($source);

//These settings are default, so you can skip setting them
$speech->setContentType(SpeechContentInterface::CONTENT_MP3);
$speech->setTopic(SpeechContentInterface::TOPIC_GENERAL);
$speech->setLang(SpeechContentInterface::LANG_RU);
$speech->setUuid(bin2hex(openssl_random_pseudo_bytes(16)));

/** @var HypothesesList $result */
$result = $speechKit->recognize($speech);

/** @var Hypothesis $hyphotesis */
foreach ($result as $hyphotesis) {
    echo sprintf(
        'Confidence: %.2f Content: %s',
        $hyphotesis->getConfidence(),
        $hyphotesis->getContent()
    ), PHP_EOL;
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~93 days

Total

4

Last Release

3672d ago

Major Versions

0.1.0 → 1.02015-07-24

1.x-dev → 2.0.02016-04-28

PHP version history (2 changes)0.1.0PHP &gt;=5.3.2

2.0.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a6699356a626b181cddefbd8c27fdbd9a76f243a7ea28049f5fe8ae0733572aa?d=identicon)[ZloeSabo](/maintainers/ZloeSabo)

---

Top Contributors

[![ZloeSabo](https://avatars.githubusercontent.com/u/520199?v=4)](https://github.com/ZloeSabo "ZloeSabo (2 commits)")

---

Tags

yandexspeechkit

### Embed Badge

![Health badge](/badges/zloesabo-speechkit-php/health.svg)

```
[![Health](https://phpackages.com/badges/zloesabo-speechkit-php/health.svg)](https://phpackages.com/packages/zloesabo-speechkit-php)
```

###  Alternatives

[arcanedev/seo-helper

SEO Helper is a framework agnostic package that provides tools &amp; helpers for SEO (Laravel supported).

332467.0k4](/packages/arcanedev-seo-helper)[bukashk0zzz/yml-generator

YML (Yandex Market Language) file generator

116186.3k](/packages/bukashk0zzz-yml-generator)[hcodes/server_yametrika

Server-side tracking of visitors using Yandex.Metrica

7220.2k](/packages/hcodes-server-yametrika)[alexusmai/yandex-metrika

Laravel - Yandex Metrika

4436.7k](/packages/alexusmai-yandex-metrika)[pastuhov/yii2-yml-catalog

YML (Yandex Market Language) generator.

2116.7k](/packages/pastuhov-yii2-yml-catalog)

PHPackages © 2026

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