e-yunduan/yii2-aip-speech

百度语音合成

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 2

Open Issues: 0

Type:yii2-extension

v1.0.1 2017-11-22 13:22 UTC

This package is auto-updated.

Last update: 2024-10-25 21:19:37 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

百度语音合成

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist e-yunduan/yii2-aip-speech "*"

or add

"e-yunduan/yii2-aip-speech": "*"

to the require section of your composer.json file.

Usage

配置文件添加组件 :

components => [
     'aipSpeech' => [
        'class' => 'eyunduan\aipSpeech\BaiduSpeech',
        'appId' => 'xxxx', // 百度语音 App ID
        'apiKey' => 'xxxx', // 百度语音 API Key
        'secretKey' => 'xxxxxx', // 百度语音 Secret Key
    ],
]
/** @var \eyunduan\aipSpeech\BaiduSpeech $aipSpeech */
$aipSpeech = \Yii::$app->get('aipSpeech');
$aipSpeech->combine('您好,世界');