跳转至

口语评测

口语评测模块

口语评测模块提供中英文的朗读发音评测,支持中英文的字、词、句, 并返回准确度、流畅度、完整度、声韵调型等多维度评分。

口语评测调用

接口使用示例


//client为TuringOSClient实例
client.startEAWithRecorder(eaType, true, etInput.getText().toString(), listener);

方法说明

    /**
     *
     * @param type 评测内容类型,限定为EaRequestTyptEnum
     * @param enableTts 评测结果文字提示内容是否需要合成TTS音频连接
     * @param word 评测目标内容
     * @param listener TuringOSClientAsrListener
     */
    public void startEAWithRecorder(@EaRequestTyptEnum int type, boolean enableTts, String word, TuringOSClientAsrListener listener)

输入参数说明

参数 类型 是否必须 说明
type {EaRequestConfig.EA_CN_SENTENCE,
EaRequestConfig.EA_CN_WORD,
EaRequestConfig.EA_EN_SENTENCE,
EaRequestConfig.EA_EN_WORD}
评测内容类型
EA_CN_SENTENCE:代表中文句子
EA_CN_WORD:代表中文文字
EA_EN_SENTENCE:代表英文句子
EA_EN_WORD:代表英文单词
enableTts boolean 测结果文字提示内容是否需要合成TTS音频连接
word String 评测内容
asrRequestConfig AsrRequestConfig 参考ASR模块AsrRequestConfig参数说明
listener TuringOSClientAsrListener 参考ASR模块TuringOSClientAsrListener说明

输出参数说明

  • 中文和英文评测烦返回结果详情会有区别;
  • 可以根据测评是中文还是英文使用不同的实体类进行解析;

返回示例

英文单词测评

{
    "code": 20035,
    "tts": "评测完成,你的得分为:79.0",
    "nlp": [
        "http://turing-iot.oss-cn-beijing.aliyuncs.com/tts/tts-e15222a3dbc04360******060c43c3b8-d020b6d538ef43208ee9172aa7c88289.mp3"
    ],
    "token": "923587c17f9847b6bc9761c81ece3dbf",
    "func": {
        "result": {
            "pron": 79,
            "overall": 79,
            "details": [
                {
                    "score": 79,
                    "phone": [
                        {
                            "score": 78,
                            "char": "æ"
                        },
                        {
                            "score": 79,
                            "char": "p"
                        },
                        {
                            "score": 79,
                            "char": "l"
                        }
                    ],
                    "char": "apple",
                    "start": 0,
                    "end": 650
                }
            ]
        },
        "code": 0,
        "refText": "apple"
    },
    "emotion": 0
}

英文句子测评

{
    "code": 20035,
    "tts": "评测完成,你的得分为:88.0",
    "nlp": [
        "http://turing-iot.oss-cn-beijing.aliyuncs.com/tts/tts-e15222a3dbc04360******060c43c3b8-98203e27595942049ae40588bf9379f7.mp3"
    ],
    "token": "923587c17f9847b6bc9761c81ece3dbf",
    "func": {
        "result": {
            "integrity": 100,
            "pron": 87,
            "fluency": 100,
            "overall": 88,
            "details": [
                {
                    "score": 69,
                    "phone": [
                        {
                            "score": 17,
                            "char": "n"
                        },
                        {
                            "score": 98,
                            "char": "aɪ"
                        },
                        {
                            "score": 62,
                            "char": "s"
                        }
                    ],
                    "char": "nice",
                    "start": 0,
                    "end": 480
                },
                {
                    "score": 100,
                    "phone": [
                        {
                            "score": 100,
                            "char": "t"
                        },
                        {
                            "score": 100,
                            "char": "ʊ"
                        }
                    ],
                    "char": "to",
                    "start": 480,
                    "end": 720
                },
                {
                    "score": 99,
                    "phone": [
                        {
                            "score": 100,
                            "char": "m"
                        },
                        {
                            "score": 100,
                            "char": "i"
                        },
                        {
                            "score": 94,
                            "char": "t"
                        }
                    ],
                    "char": "meet",
                    "start": 720,
                    "end": 1100
                },
                {
                    "score": 80,
                    "phone": [
                        {
                            "score": 75,
                            "char": "j"
                        },
                        {
                            "score": 85,
                            "char": "u"
                        }
                    ],
                    "char": "you",
                    "start": 1100,
                    "end": 1550
                }
            ],
            "rhythm": 72,
            "wavetime": 1636
        },
        "code": 0,
        "refText": "nice to meet you"
    },
    "emotion": 0
}

中文汉字测评

{
    "code": 20035,
    "tts": "评测完成,你的得分为:71",
    "nlp": [
        "http://turing-iot.oss-cn-beijing.aliyuncs.com/tts/tts-e15222a3dbc04360******060c43c3b8-49882c92811c46509c981b215e93bd76.mp3"
    ],
    "token": "d24c44e5921347feb9a2d687321edc44",
    "func": {
        "result": {
            "duration": "0.501",
            "pronunciation": 82,
            "tone": 11,
            "words": [
                {
                    "charType": 0,
                    "pinyin": "ni",
                    "tone": "tone3",
                    "scores": {
                        "pronunciation": 82,
                        "tone": 11,
                        "overall": 71
                    },
                    "word": "你",
                    "phonemes": [
                        {
                            "pronunciation": 96,
                            "phoneme": "N",
                            "span": {
                                "start": 12,
                                "end": 23
                            }
                        },
                        {
                            "pronunciation": 71,
                            "phoneme": "I",
                            "span": {
                                "start": 23,
                                "end": 45
                            }
                        }
                    ],
                    "span": {
                        "start": 12,
                        "end": 45
                    }
                }
            ],
            "overall": 71
        },
        "code": 0,
        "refText": "你"
    },
    "emotion": 0
}

中文句子测评

{
    "code": 20035,
    "tts": "评测完成,你的得分为:60",
    "nlp": [
        "http://turing-iot.oss-cn-beijing.aliyuncs.com/tts/tts-e15222a3dbc04360******060c43c3b8-2d27a3cd93a14c62bccf5c34f8801454.mp3"
    ],
    "token": "d24c44e5921347feb9a2d687321edc44",
    "func": {
        "result": {
            "duration": "0.717",
            "integrity": 100,
            "pronunciation": 62,
            "tone": 45,
            "words": [
                {
                    "charType": 0,
                    "pinyin": "ni",
                    "tone": "tone3",
                    "scores": {
                        "pronunciation": 94,
                        "tone": 63,
                        "overall": 94,
                        "prominence": 0
                    },
                    "word": "你",
                    "phonemes": [
                        {
                            "pronunciation": 78,
                            "phoneme": "N",
                            "span": {
                                "start": 12,
                                "end": 22
                            }
                        },
                        {
                            "pronunciation": 100,
                            "phoneme": "I",
                            "span": {
                                "start": 22,
                                "end": 31
                            }
                        }
                    ],
                    "span": {
                        "start": 12,
                        "end": 31
                    }
                },
                {
                    "charType": 0,
                    "pinyin": "hao",
                    "tone": "tone3",
                    "scores": {
                        "pronunciation": 30,
                        "tone": 28,
                        "overall": 30,
                        "prominence": 0
                    },
                    "word": "好",
                    "phonemes": [
                        {
                            "pronunciation": 71,
                            "phoneme": "H",
                            "span": {
                                "start": 31,
                                "end": 38
                            }
                        },
                        {
                            "pronunciation": 4,
                            "phoneme": "AO",
                            "span": {
                                "start": 38,
                                "end": 60
                            }
                        }
                    ],
                    "span": {
                        "start": 31,
                        "end": 60
                    }
                }
            ],
            "fluency": 100,
            "overall": 60,
            "rear_tone": "fall",
            "rhythm": 94,
            "speed": 250
        },
        "code": 0,
        "refText": "你好"
    },
    "emotion": 0   
}

基础字段说明

参数 类型 说明
code int 请求响应Code,具体可参考Code说明
message String 请求响应的消息描述
nlpResponse NlpResponse(Object) 绘本识别返回的内容体

NlpResponse

参数 类型 说明
intent Intent(Object) 绘本识别结果实体内容
results List(Object) 绘本识别的提示语和而播放内容集合

NlpResponse-Intent

参数 类型 说明
code Intent(Object) 此次请求命中的技能Code
口语评测技能Code,固定为1000047
operateState int 绘本识别技能的状态值

与输入参数type的对应
1100:表示此次请求的类型为英文单词;
1101:表示此次请求的类型为英文句子;
1120:表示此次请求的类型为中文汉字;
1121:表示此次请求的类型为中文句子;

NlpResponse-List-Results

参数 类型 说明
groupType int 组类型(普通接入可忽略该参数):
0为独立输出;
大于0时可能包含同组相关内容
resultType String 输出类型:
口语评测技能一般返回text,给出评测结果的文字描述
values Values(Object) 输出内容(必会包含 resultType 对应的 key, 其他会根据具体应用场景进行字段扩充)

NlpResponse-Intent-Parameters

参数 类型 说明
result Result(Object) 评测结果详情
code int 默认为0
refText String 评测内容

英文评测结果说明

NlpResponse-Intent-Parameters-Result

字段 类型 说明
pron Int 发音得分
overall Int 总得分
integrity Int 完成度评分:
单词测评时无该字段
fluency Int 流利度得分:
单词测评时无该字段
rhythm Int 韵律性评分:
单词测评时无该字段
wavetime Int 音频长度:
单词测评时无该字段
details Array[json] 详细的测评信息,具体见details字段说明

NlpResponse-Intent-Parameters-Result-DetailsBean

字段 类型 说明
score int 得分
char String 评测的单词
start int 音频文件处理的开始地址;无需关注
end int 音频文件处理的结束地址;无需关注
phone Phone(Object) 单个字母评测信息,具体见phone字段说明

NlpResponse-Intent-Parameters-Result-DetailsBean-Phone

phone字段说明

字段 类型 说明
score Int 得分
char String 评测的字母

中文评测结果说明

NlpResponse-Intent-Parameters-Result

字段 类型 说明
duration String 音频时长
pronunciation int 发音得分
tone int 声调得分
overall int 总得分
words Words(Object) 详细的测评信息,具体见word字段说明
integrity int 完成度评分:
汉字测评时无该字段
fluency int 流利度得分:
汉字测评时无该字段
rear_tone String 句末语调:
rise:升调
fall:降调
汉字测评时无该字段
rhythm int 韵律性评分:
汉字测评时无该字段
speed int 语速:
汉字测评时无该字段

NlpResponse-Intent-Parameters-Result-Words

字段 类型 说明
charType int 是中文还是符号:
0:中文
1:标点符号
pinyin String 拼音
tone String 发音声调:
tone1:第一声
tone2:第二 声
tone3:第三声
tone4:第四声
tone5:轻声
word String 单字
scores Scores(Object) 得分详情,参考score字段说明
phonemes Phonemes(Object) 音素,参考phoneme字段说明
span Span(Object) 汉字在音轨上的时间范围,参考span字段说明

NlpResponse-Intent-Parameters-Result-Words-Scores

字段 类型 说明
pronunciation int 发音得分
tone int 声调得分
overall int 总得分
prominence int 句子中单词是否重读:
0:非重读
1:重读

NlpResponse-Intent-Parameters-Result-Words-Phonemes

字段 类型 说明
pronunciation int 发音得分
phoneme String 音素
span Span(Object) 汉字在音轨上的时间范围,详细见span字段说明

Span

字段 类型 说明
start Int 单位毫秒,无需关注
end Int 单位毫秒,无需关注