PHPackages                             jormin/baidu-speech - 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. [API Development](/categories/api)
4. /
5. jormin/baidu-speech

ActiveLibrary[API Development](/categories/api)

jormin/baidu-speech
===================

百度语音Api集成

v1.0.2(8y ago)0328↓100%MITPHPPHP ^5.6 || ^7.0

Since Jan 4Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jormin/baidu-speech)[ Packagist](https://packagist.org/packages/jormin/baidu-speech)[ Docs](https://github.com/jormin/baidu-speech)[ RSS](/packages/jormin-baidu-speech/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

集成了 [百度AI](http://ai.baidu.com/) 官方的Api接口。

安装
--

[](#安装)

1. 安装包文件

    ```
    $ composer require jormin/baidu-speech
    ```

说明
--

[](#说明)

1. 返回结果说明

    接口返回数据已经经过打包处理，为数组格式，包含三个字段:

    参数类型说明可为空successbool是否成功NmsgString结果说明Ndataarray百度语音接口返回数据，字段详细见 [百度官方文档](https://cloud.baidu.com/doc/SPEECH/TTS-Online-PHP-SDK.html).Y

使用
--

[](#使用)

1. 语音识别

    ```
       $baiduSpeech = new Jormin\BaiduSpeech\BaiduSpeech($appID, $apiKey, $secretKey);
       $baiduSpeech->recognize($filePath, $url, $callback, $userID, $format, $rate, $lan);
    ```

    接口字段：

    参数类型说明可为空filePathString语音文件本地路径，该字段和url字段二选一，优先使用此项YurlString语音文件URL路径，该字段和filePath字段二选一YcallbackString回调地址YuserIDString用户唯一标识YformatString语音文件格式，可选值 \['pcm', 'wav', 'opus', 'speex', 'amr'\]，默认为wavYrateInteger采样率，可选值 \[8000, 16000\]，默认为16000YlanString语言，可选值 \['zh', 'ct', 'en'\]，默认为zhY
2. 语音合成

    ```
       $baiduSpeech = new Jormin\BaiduSpeech\BaiduSpeech($appID, $apiKey, $secretKey);
       $baiduSpeech->combine($storagePath, $text, $userID, $lan, $speed, $pitch, $volume, $person);
    ```

    接口字段：

    参数类型说明可为空storagePathString文件存储路径，需是绝对路径NtextString合成的文本NuserIDString用户唯一标识YlanString语言，可选值 \['zh'\]，默认为zhYspeedInteger语速，取值0-9，默认为5中语速YpitchInteger音调，取值0-9，默认为5中语调YvolumeInteger音量，取值0-15，默认为5中音量YpersonInteger发音人选择, 0为女声，1为男声，3为情感合成-度逍遥，4为情感合成-度丫丫，默认为普通女Y

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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 ~1 days

Total

3

Last Release

3044d ago

### Community

Maintainers

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

---

Top Contributors

[![jormin](https://avatars.githubusercontent.com/u/5519318?v=4)](https://github.com/jormin "jormin (7 commits)")

---

Tags

Jormin

### Embed Badge

![Health badge](/badges/jormin-baidu-speech/health.svg)

```
[![Health](https://phpackages.com/badges/jormin-baidu-speech/health.svg)](https://phpackages.com/packages/jormin-baidu-speech)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

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