You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
语音评测识别
示例代码
<?php
include './vendor/autoload.php';
// 设置评测参数
$ttsConfig = [
'ent' => 'cn_vip'
//...
];
// 这里的$app_id、$api_key、$api_secret是在开放平台控制台获得
$client = new IFlytek\Xfyun\Speech\IseClient($app_id, $api_key, $api_secret, $ttsConfig);
// 返回识别结果
$content = $client->request('欢迎使用科大讯飞语音能力', './test.pcm');
更详细请参见Demo
合成参数
参数 | 类型 | 必须 | 说明 | 示例 |
---|---|---|---|---|
aue | string | 是 | 音频编码 raw(未压缩的 pcm 格式音频) speex(标准开源speex) |
raw |
speex_size | string | 否 | 标准speex解码帧的大小 当aue=speex时,若传此参数,表明音频格式为标准speex 解码帧大小请参考这里; |
70 |
result_level | string | 否 | 评测结果等级 entirety(默认值) simple |
entirety |
language | string | 是 | 评测语种 en_us(英语) zh_cn(汉语) |
zh_cn |
category | string | 是 | 评测题型 read_syllable(单字朗读,汉语专有) read_word(词语朗读) read_sentence(句子朗读) read_chapter(篇章朗读) |
read_sentence |
extra_ability | string | 否 | 拓展能力 multi_dimension(全维度 ) |
multi_dimension |