Commit c1833d42 authored by Tt's avatar Tt

fix(SSAPP2501): 检查录音问题ID匹配并更新测试数据分数

parent ec2255ab
...@@ -808,6 +808,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -808,6 +808,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 获取最后一次录音数据 // 获取最后一次录音数据
const lastVoice = Game.getIns().player.getLastVoice(); const lastVoice = Game.getIns().player.getLastVoice();
if (lastVoice.questionId != this.touchData.id) {
this.onFireFail();
return;
}
// 如果有录音数据,则使用其分数 // 如果有录音数据,则使用其分数
if (lastVoice && lastVoice.result) { if (lastVoice && lastVoice.result) {
const score = lastVoice.result.overall; const score = lastVoice.result.overall;
...@@ -965,7 +969,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -965,7 +969,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
"fluency": 84, "fluency": 84,
"integrity": 100, "integrity": 100,
"kernel_version": "3.7.1", "kernel_version": "3.7.1",
"overall": 11, "overall": 21,
"pronunciation": 88, "pronunciation": 88,
"resource_version": "2.3.11", "resource_version": "2.3.11",
"rhythm": 46, "rhythm": 46,
...@@ -1025,44 +1029,6 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -1025,44 +1029,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}, },
"tokenId": "632be7a73327935c2b000005" "tokenId": "632be7a73327935c2b000005"
} }
testData = {
"audioUrl": "http://staging-teach.cdn.ireadabc.com/oxford_voice/b24a6c27b9ff2557/1754926351482.mp3",
"eof": 1,
"file": "/storage/emulated/0/Android/data/com.example.oxford/cache/shengtong/gradeVoice.mp3",
"result": {
"duration": "2.350",
"fluency": 0,
"integrity": 0,
"kernel_version": "3.7.1",
"overall": 0,
"pronunciation": 0,
"resource_version": "2.3.12",
"rhythm": 0,
"sentences": [
{
"beginIndex": 0,
"details": [
{
"charType": 0,
"end": 0,
"overall": 0,
"prominence": 0,
"start": 0,
"word": "hat"
}
],
"end": 0,
"endIndex": 0,
"overall": 0,
"sentence": "hat",
"start": 0
}
],
"speed": 0
},
"tokenId": "689a0d0c332793307e000004",
"questionId": 5
}
if (!courseware) { if (!courseware) {
await this.recrodEnd(testData) await this.recrodEnd(testData)
resolve(testData) resolve(testData)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment