Skip to content
百度语音合成
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
README.md
composer.json

README.md

baidu ai speech for Yii2

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('您好,世界');
You can’t perform that action at this time.