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
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-25 21:33:31 UTC
README
百度语音合成
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('您好,世界');