e-yunduan / yii2-aip-speech
百度语音合成
    v1.0.1
    2017-11-22 13:22 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-25 21:12:14 UTC
README
百度语音合成
安装
安装此扩展的首选方式是通过 Composer。
运行以下命令之一
php composer.phar require --prefer-dist e-yunduan/yii2-aip-speech "*"
或
"e-yunduan/yii2-aip-speech": "*"
将其添加到您的 composer.json 文件的 require 部分中。
用法
配置文件添加组件
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('您好,世界');