nuwangtechnology / baidu_ai
百度语音Api
dev-master
2019-03-26 06:55 UTC
Requires
- php: ^7.0
- ext-curl: *
- ext-json: *
Requires (Dev)
- swoft/swoole-ide-helper: ^4.2
This package is auto-updated.
Last update: 2024-09-26 19:04:39 UTC
README
集成了百度AI官方的Api接口。
安装
-
安装包文件
$ composer require nufangtechnology/baidu_ai
说明
-
返回结果说明
接口返回数据已经经过打包处理,为数组格式,包含三个字段
使用
-
语音识别
$baiduSpeech = new NufangTechnology\Baidu_AI\BaiduSpeech($appID, $apiKey, $secretKey); $baiduSpeech->recognize($filePath, $url, $callback, $userID, $format, $rate, $lan);
接口字段:
-
语音合成
$baiduSpeech = new NufangTechnology\Baidu_AI\BaiduSpeech($appID, $apiKey, $secretKey); $baiduSpeech->combine($storagePath, $text, $userID, $lan, $speed, $pitch, $volume, $person);
接口字段:
许可证
MIT许可证 (MIT)。更多信息请参阅许可证文件。