{
"appKey":"",
"salt":"", // 隨機值
"curtime":"", // 時間戳
"signType":"v3", // 僅支持v3
"sign":"", // 生成方式見demo,q取topic字段
"topic": "Introduce yourself to a friend at school" // 用戶指定的話題關鍵詞,語種限制英文,長度限制 < 500,單詞數(shù)限制 < 100
}
響應結果
{
"code": "0",
"msg": "SUCCESS",
"data": {
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 任務id
"scene": {
"mainTask": "Introduce yourself and get to know your new friend", // 主任務:對話目標
"emoji": "??",
"subTasks": [ // 子任務列表
"1. Tell your friend your name and where you are from",
"2. Ask your friend about her hobbies and interests",
"3. Talk about your favorite subject in school",
"4. Ask your friend if she has any advice for navigating the school"
],
"botGender": "Female", // 系統(tǒng)性別, 取值范圍: Male 男性; Female 女性;
"botRole": "Friend", // 系統(tǒng)角色
"userRole": "New student", // 用戶角色
"content": "First day of school" // 場景內(nèi)容
}
}
}
{
"appKey":"",
"salt":"", // 隨機值
"curtime":"", // 時間戳
"signType":"v3", // 僅支持v3
"sign":"", // 生成方式見demo, q取taskId
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 場景生成接口返回的任務id
"scene": { // 生成場景接口返回的 scene 字段
"mainTask": "Introduce yourself and get to know your new friend",
"emoji": "??",
"subTasks": [
"1. Tell your friend your name and where you are from",
"2. Ask your friend about her hobbies and interests",
"3. Talk about your favorite subject in school",
"4. Ask your friend if she has any advice for navigating the school"
],
"botGender": "Female",
"botRole": "Friend",
"userRole": "New student",
"content": "First day of school"
},
"userLevel": "0", // 用戶等級:0表示1-3年級小學生;1表示4-6年級小學生;2表示初中學生;3表示高中學生;
"history": [ // 對話歷史,講話人字段:系統(tǒng)與用戶必須交替出現(xiàn),第一句話的講話人必須是系統(tǒng),獲取系統(tǒng)說的第一句話時,history傳空數(shù)組
]
}
響應結果
{
"code": "0",
"msg": "SUCCESS",
"data": {
"endCode": 0, //結束碼:0-未結束; 1-結束;
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 任務id
"resultArr": [
{
"result": [ // 系統(tǒng)回話
"Hi there! My name is Sarah, and I'm from New York. What's your name and where are you from?"
],
"score": 0, // 對話接口不關注此字段
"achievement": [], // 對話接口不關注此字段
"index": -1 // 對話接口不關注此字段
}
]
}
}
{
"appKey":"",
"salt":"", // 隨機值
"curtime":"", // 時間戳
"signType":"v3", // 僅支持v3
"sign":"", // 生成方式見demo, q取taskId
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 場景生成接口返回的任務id
"scene": { // 生成場景接口返回的 scene 字段
"mainTask": "Introduce yourself and get to know your new friend",
"emoji": "??",
"subTasks": [
"1. Tell your friend your name and where you are from",
"2. Ask your friend about her hobbies and interests",
"3. Talk about your favorite subject in school",
"4. Ask your friend if she has any advice for navigating the school"
],
"botGender": "Female",
"botRole": "Friend",
"userRole": "New student",
"content": "First day of school"
},
"userLevel": "0", // 用戶等級:0表示1-3年級小學生;1表示4-6年級小學生;2表示初中學生;3表示高中學生;
"history": [ // 對話歷史,講話人字段:系統(tǒng)與用戶必須交替出現(xiàn)
{
"speaker":"System", // 講話人:系統(tǒng),第一句話的講話人必須是系統(tǒng)
"content":"Hi there! My name is Sarah, and I'm from New York. What's your name and where are you from?" // 講話內(nèi)容, 語種限制英文
},
{
"speaker":"User", // 講話人:用戶
"content":"Hello, I'm Echo, I come from China. Nice to meet you. Do you have any hobbies?" // 講話內(nèi)容, 語種限制英文,單詞數(shù)限制80
}
],
"indexArr": [ // 請求系統(tǒng)生成推薦表達例句的索引(對應history數(shù)組),取值為 0 - history.length, 如果取值 = history.length,則會生成對話歷史的下一句話, 目前該數(shù)組中僅支持一個值
"1"
],
"count": "1" // 系統(tǒng)生成推薦表達例句的數(shù)量,取值 1 - 3,存在指定為3但結果不足3句的情況
}
響應結果
{
"code": "0",
"msg": "SUCCESS",
"data": {
"endCode": 0, //結束碼:0-未結束; 1-結束;
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 任務id
"resultArr": [
{
"result": [ // 系統(tǒng)生成的推薦表達例句
"Hi Sarah, my name is Echo, and I'm from China."
],
"score": 0, // 生成推薦接口不關注此字段
"achievement": [], // 生成推薦接口不關注此字段
"index": 0 // 用戶指定的會話歷史中的索引
}
]
}
}
{
"appKey":"",
"salt":"", // 隨機值
"curtime":"", // 時間戳
"signType":"v3", // 僅支持v3
"sign":"", // 生成方式見demo, q取taskId
"taskId": "f52c2df42bc311ee9d19bebd871cbd01", // 場景生成接口返回的任務id
"scene": { // 生成場景接口返回的 scene 字段
"mainTask": "Introduce yourself and get to know your new friend",
"emoji": "??",
"subTasks": [
"1. Tell your friend your name and where you are from",
"2. Ask your friend about her hobbies and interests",
"3. Talk about your favorite subject in school",
"4. Ask your friend if she has any advice for navigating the school"
],
"botGender": "Female",
"botRole": "Friend",
"userRole": "New student",
"content": "First day of school"
},
"userLevel": "0", // 用戶等級:0表示1-3年級小學生;1表示4-6年級小學生;2表示初中學生;3表示高中學生;
"history": [ // 對話歷史,講話人字段:系統(tǒng)與用戶必須交替出現(xiàn)
{
"speaker":"System", // 講話人:系統(tǒng),第一句話的講話人必須是系統(tǒng)
"content":"Hi there! My name is Sarah, and I'm from New York. What's your name and where are you from?" // 講話內(nèi)容, 語種限制英文
},
{
"speaker":"User", // 講話人:用戶
"content":"Hello, I'm Echo, I come from China. Nice to meet you. Do you have any hobbies?" // 講話內(nèi)容, 語種限制英文,單詞數(shù)限制80
"voice":"" // 選填字段:音頻的base64編碼, 如果不填,會影響最終的語音評分。音頻格式要求:采樣率16K,單聲道,wav,如格式不符,會影響評分結果。
},
{
"speaker":"System",
"content":"Yes, I love hiking and playing tennis. What about you?"
},
{
"speaker":"User",
"content":"I like singing and running, especially listening to music while running. It's one of my favorite ways to relax. I also like listening to music while reading, so I like Chinese class, how about you?"
}
]
}
響應結果
{
"code": "0",
"msg": "SUCCESS",
"data": {
"history": [ // 會話歷史, 僅評價用戶的講話內(nèi)容
{
"index": "1",
"speaker": "User",
"content": "Hello, I'm Echo, I come from China. Nice to meet you. Do you have any hobbies?",
"needImprove": "false", // 是否需要改進:true 表示需要; false 表示不需要
"paraphrase": null, // 潤色結果,如果content的長度 <30 或者單詞數(shù) <3,會導致無法生成潤色結果。
"suggest": { // 系統(tǒng)建議
"grammar": null, // 語法評價
"voice": { // 語音評價
"overall": "0.000040", // 發(fā)音得分
"words": [
{
"word": "Hello",
"text": "Hello 發(fā)音不清晰, 其中 h、e 發(fā)音不準確"
},
{
"word": "I'm",
"text": "I'm 發(fā)音不清晰, 其中 a?、m 發(fā)音不準確"
}
]
}
}
},
{
"index": "3",
"speaker": "User",
"content": "I like singing and running, especially listening to music while running. It's one of my favorite ways to relax. I also like listening to music while reading, so I like Chinese class, how about you?",
"needImprove": "true",
"paraphrase": [
{
"rawSent": "I like singing and running, especially listening to music while running.", // 原句
"diffs": [ // 操作
{
"text": "I",
"operation": "EQUAL" // 不變
},
{
"text": "like",
"operation": "DELETE" // 刪除
},
{
"text": "love",
"operation": "INSERT" // 插入
},
{
"text": "singing and running, especially listening to music while running.",
"operation": "EQUAL" // 不變
}
]
},
{
"rawSent": "It's one of my favorite ways to relax.",
"diffs": null
},
{
"rawSent": "I also like listening to music while reading, so I like Chinese class, how about you?",
"diffs": [
{
"text": "I also like",
"operation": "EQUAL"
},
{
"text": "listening",
"operation": "DELETE"
},
{
"text": "to listen",
"operation": "INSERT"
},
{
"text": "to music while reading, so I like Chinese",
"operation": "EQUAL"
},
{
"text": "class,",
"operation": "DELETE"
},
{
"text": "lessons,",
"operation": "INSERT"
},
{
"text": "how about you?",
"operation": "EQUAL"
}
]
}
],
"suggest": {
"grammar": {
"advice": "語法結構豐富,語言運用自然流暢,沒有語法錯誤",
"score": "79.7"
},
"voice": null
}
}
],
"scene": { // 場景信息
"emoji": "??",
"name": "First day of school"
},
"summary": { // 報告概要
"grammarScore": "64", // 語法得分
"voiceScore": "0", // 音頻得分
"wordNum": "125", // 單詞數(shù)
"star": "3" // 任務完成評分,1表示完成主要任務,2表示完成主要任務和部分子任務,3表示完成主要任務和全部子任務
}
}
}