段落
该文档是开发者在产品功能集成阶段 使用的段落(篇章)跟读题型的语音评测技术文档
题型描述
对英文段落进行打分,支持实时反馈功能。
反馈维度包含整体的发音分、准确度、完整度、流利度等。
测评请求参数
字段 | 类型 | 可选 | 说明 |
coreType | string | 必选 | en.pred.score表示英文段落朗读 |
refText | string | 必选 | 评分参考文本, 可以带标点符号, |
attachAudioUrl | int | 可选 | 评测结果中是否返回音频url |
rank | int | 可选 | 评分分制,这个值可以任意设置,最终会根据与100的比例重新计算 |
precision | double | 可选 | 设置打分精度,只支持0.1、0.5或者1,默认值为1(如果设置的值不是0.1或0.5则按1处理) |
symbol | int | 可选 | 如果单词前有多个连续标点,只显示第一个标点;如果单词结尾有多个连续标点,只输出靠近结尾单词最近的三个标点。 只有设置0或1,默认值为0,不开启此功能 |
typeThres | int | 可选 | 打分松紧度(分数越高影响越小):1表示严格,2表示宽松,3表示非常严格,4非常宽松,0为默认值(不启用此功能) |
feedback | int | 可选 | 1:表示开启实时反馈功能(实时反馈当前读的音频对应的文本位置信息) 0:默认值(不启用此功能) |
accent | string | 可选 | "accent":"en" 表示指定英式发音评测 |
参数示例
{
"coreType": "en.pred.score",
"refText": "Learning another language may seem more challenge than it's worth. The advantages of knowing another language, however, make it well worth the hard work. A foreign language is a window into another culture. It expresses the way people in that society think and view the world. To know another language is thus to view life through new lens. Knowing another language also provides access to different ways of dealing with problems common to us all. It is also an advantage in the business world, where multinational partners are becoming more common. Finally, understanding a different language enables you to look at your own culture from a fresh perspective.",
"rank": 100,
"precision": 0.5,
"attachAudioUrl":1
}返回结果示例
{
“applicationId”: “axxx”, //授权评测账号,即用Appkey
"tokenId": "59b0ff9796ddf81da4000001", //用户请求的唯一标识
"recordId": "11e793a4881333c4974ca120320158d", //音频文件的唯一标识
"dtLastResponse": "2021-08-05 16:14:24:21", //云端响应的时间点
"result": { // 评测结果节点
"fluency": 81, //流利度得分
"pron": 77, //发音得分,即准确度得分
"version": "0.0.80.2021.5.28.13:23:19", // 引擎的版本,包含发布时间
"wavetime": 49990, // 音频时长,单位ms
"rank": 100, // 评分分制,请求评分时这个值可以任意设置,最终会根据与100的比例重新计算
"res": "eng.snt.online.1.0", // 资源版本
"delaytime": 81, // 云端从feed音频结束到获取结果的耗时,单位ms
"integrity": 81, // 完整度得分
"overall": 77, // 总分
"systime": 11423, // 评测整个过程的总耗时,单位ms
"pretime": 165, //云端调用Start接口本身耗时,单位ms
"accuracy": 77, //发音得分,即准确度得分
"details": [ //句子得分详情节点
{
"fluency": { //句子流利度反馈节点
"pause": 2, // 停顿次数
"overall": 71, //句子流利度得分
"speed": 2 //句子语速快慢(默认为0,漏读时也为0),0:慢,1:正常,2:快
},
"snt_details": [ //句单词得分详情节点
{
"char": "Learning", //单词文本
"score": 42 //单词发音得分
},
......
{
"char": "worth",
"score": 68
}
],
"score": 57, //句子发音得分
"text": "Learning another language may seem more challenge than it's worth"
},
{
"fluency": {
"pause": 0,
"overall": 87,
"speed": 1
},
"snt_details": [
{
"char": "The",
"score": 94
},
......
{
"char": "language",
"score": 88
}
],
"score": 70,
"text": "The advantages of knowing another language"
}
……
"precision": 1, //请求评分时设置的打分精度,只支持0.1、0.5或者1,默认值为1(如果设置的值不是0.1或0.5则按1处理)
"info": {
"volume": 54, 录音音量,范围(0~180dB)
"clip": 0, 音频声音太高,出现截幅,范围(0~1)。此参数影响评分时,会设置相应的tipId值
"snr": 12.811419, //信噪比,值越高越清晰,范围(0~40dB) 此参数影响评分时,会设置相应的tipId值
"tipId": 10004 音频质量,详情请查看tipid说明表
}
},
"eof": 1, //0表示返回未结束,后续还有其它的返回结果1:表示本次评测所有的返回结束
"params": {
"app": {
"timestamp": "1504772030",
"sig": "d2d96b467ab7b6d110335478516c4f2f3f181687",
“applicationId”: “aXXX”,
"userId": "ssound_text",
"clientId": "000c2933841a"
},
"request": { //请求评分节点
"coreType": "en.pred.score",
"tokenId": "59b0ff9796ddf81da4000001",
"refText": "Learning another language may seem more challenge than it's worth. The advantages of knowing another language, however, make it well worth the hard work. A foreign language is a window into another culture. It expresses the way people in that society think and view the world. To know another language is thus to view life through new lens. Knowing another language also provides access to different ways of dealing with problems common to us all. It is also an advantage in the business world, where multinational partners are becoming more common. Finally, understanding a different language enables you to look at your own culture from a fresh perspective.",
"rank": 100,
"precision": 1
},
"audio": { //请求评分时的音频参数节点
"sampleRate": 16000,
"channel": 1,
"sampleBytes": 2,
"audioType": "ogg"
}
},
"refText": "Learning another language may seem more challenge than it's worth. The advantages of knowing another language, however, make it well worth the hard work. A foreign language is a window into another culture. It expresses the way people in that society think and view the world. To know another language is thus to view life through new lens. Knowing another language also provides access to different ways of dealing with problems common to us all. It is also an advantage in the business world, where multinational partners are becoming more common. Finally, understanding a different language enables you to look at your own culture from a fresh perspective."
}返回结果说明
键 | 类型 | 说明 | 使用建议 |
recordId | string | 音频文件的唯一标识 | 可供参考 |
tokenId | string | 用户请求的唯一标识 | 可供参考 |
applicationId | string | 授权的评测账号,即appkey | 可供参考 |
audioUrl | string | 用户音频地址,在云端默认只保存一个月,建议保存到产品端服务器 | 可供参考 |
dtLastResponse | string | 云端响应的时间点 | 内部参数 |
eof | int | 0表示返回未结束,后续还有其它的返回结果 1:表示本次评测所有的返回结束 | 内部参数 |
refText | string | 传入的评测文本 | 可供参考 |
params | object | ||
- app | object | ||
- - applicationId | string | 授权的评测账号,即Appkey | |
- - userId | string | 自定义字符串,建议一个用户一个userid | |
- - timestamp | string | start时间 | |
- - sig | string | 校验码 | |
- request | object | 参考本节”参数说明” | |
- audio | object | ||
result | object | 评测结果 | |
- version | string | 引擎的版本,包含发布时间 | 内部参数 |
- rank | int | 评分分制 | 内部参数 |
- precision | float | 评分精度 | 内部参数 |
- res | string | 评测本题型时,使用的资源名称 | 内部参数 |
- pretime | int | 云端调用Start接口本身耗时,单位ms | 内部参数 |
- systime | int | 评测整个过程的总耗时,单位ms | 内部参数 |
- delaytime | int | 云端从feed音频结束到获取结果的耗时,单位ms | 内部参数 |
- wavetime | int | 音频时长,单位ms | 可供参考 |
- overall | float | 总分 | 建议字段 |
- pron | float | 发音得分 | 内部参数 |
- integrity | float | 完整度评分 | 建议字段 |
- fluency | float | 流利度评分 | 建议字段 |
- accuracy | float | 发音得分(同pron字段) | 建议字段 |
-realtime_details | array | 实时反馈信息 | |
-- char | string | 单词 | 供参考 |
-- dp_type | int | 0:表示正常读 1:表示漏读或者未读 2:表示重读 | 供参考 |
- details | array | 段落的每个句子得分详情 | 建议字段 |
- - score | float | 句子发音得分 | 建议字段 |
- - text | string | 句子文本 | 可供参考 |
- - fluency | object | 流利度评分(完整度为0时,流利度得分为0) | 建议字段 |
- - - overall | float | 流利度总体得分(0-100) | 建议字段 |
- - - pause | int | 停顿次数 | 可供参考 |
- - - speed | int | 语速快慢(默认为0,漏读时也为0),0:慢,1:正常,2:快 | 可供参考 |
- - snt_details | array | 句子的得分详情 | 可供参考 |
- - - accent | string | 请求参数中配置accent时不返回此字段,否则返回此字段"accent":"ea" | |
- - - char | string | 句子中的每个单词 | 可供参考 |
- - - fake_pron | int | 单词不在词典(集外词),才会输出此字段。如果需要对集外词进行评测,可以通过refText传音标的方式进行评测。 | |
- - - score | int | 句子中的每个单词得分(0-100) | 可供参考 |
- - - is_pause | int | 停顿标记 ; | 可供参考 |
- - - dp_type | int | 单词正常朗读(不输出dp_type字段)、漏读(1)、重复读(2) ; | 可供参考 |
- info | object | ||
- - snr | float | 信噪比,值越高越清晰,范围(0~40dB) 此参数影响评分时,会设置相应的tipId值 | 可供参考 |
- - clip | float | 音频声音太高,出现截幅,范围(0\~1)。 此参数影响评分时,会设置相应的tipId值 | 内部参数 |
- - volume | int | 录音音量,范围(0~180dB) | 可供参考 |
- - tipId | int | 音频质量 | 建议字段 |
评测结果展现建议
维度 | 说明 | 详细 |
overall | 发音总分 | 对整个段落的发音情况进行总体评价 |
pron | 准确度 | 对整个段落的句子发音进行评价 |
integrity | 完整度 | 评测录音内容与待测句子的完整程度,只评测是否读完整 |
fluency.overall | 流利度 | 评测录音是否流利,与朗读的内容无关 |
detials[i].score | 句子得分 | 对句子中每个句子的发音评价。获取之前要进行非空判断 |
details[i] .snt_details[n].dp_type | 单词的增漏读 | 表示单词是否重读/漏读(参考对应题型的返回说明) |
评测失败时的返回结果
如果返回的评测结果中result结构为空,说明评测失败。
通过返回结果可以获取 errId 和 error,产品端可以根据相应错误码做续判断和处理。
错误码
错误码参考:评测错误码