library aip-speech
aip speech by baidu, speech recognition
fnf1993/aip-speech
aip speech by baidu, speech recognition
- Friday, September 22, 2017
- by fnf1993
- Repository
- 1 Watchers
- 1 Stars
- 18 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 1 Versions
- 13 % Grown
一、简介
1. 接口名称
接口能力简要描述, (*1)
2. 语音识别
将人类的语音中的词汇内容转换为计算机可读的输入,例如按键、二进制编码或者字符序列, (*2)
二、安装及使用
1. 安装
`composer require fnf_1993/aip-speech`
2.使用
```
$app_id = 'xxx';
$api_key = 'xxxx';
$secret_key = 'xxxx';
$aipSpeech = new AipSpeech($app_id, $api_key, $secret_key);
$path = "0.wav";
// 识别本地文件
$result = $aipSpeech->asr(file_get_contents($path), 'wav', 16000,[
'lan' => 'zh'
]);
// 从URL获取文件识别
$aipSpeech->asr(null, 'pcm', 16000, array(
'url' => 'http://121.40.195.233/res/16k_test.pcm',
'callback' => 'http://xxx.com/receive',
));
var_dump($result);
```
dev-master
9999999-dev
aip speech by baidu, speech recognition
Sources
Download
MIT
The Requires