Commit 6bc22f77 authored by 赵文静's avatar 赵文静

修改问题

parent 5ca41ec9
...@@ -14,7 +14,7 @@ Content-Type: application/json ...@@ -14,7 +14,7 @@ Content-Type: application/json
"trafficParameter": "mode=childxxx;macWifi=28b77c218ed1;mid=10f05;vender=7e000025;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;" "trafficParameter": "mode=childxxx;macWifi=28b77c218ed1;mid=10f05;vender=7e000025;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;"
}, },
"nluRet": { "nluRet": {
"text": "暂停闹钟" "text": "城春草木深下一句"
}, },
"postProc": {} "postProc": {}
} }
...@@ -33,7 +33,7 @@ Content-Type: application/json ...@@ -33,7 +33,7 @@ Content-Type: application/json
}, },
"nluRet": { "nluRet": {
"asr_recongize": "", "asr_recongize": "",
"text": "城春草木深下一句" "text": "春望的释义"
} }
}, },
"version": "v0" "version": "v0"
......
...@@ -244,24 +244,34 @@ func ancientpoemDomain(params *model.SpeechDomainParams) []byte { ...@@ -244,24 +244,34 @@ func ancientpoemDomain(params *model.SpeechDomainParams) []byte {
res.Header.Semantic.Domain = "ancient_poem" res.Header.Semantic.Domain = "ancient_poem"
res.Header.Semantic.Intent = "search_tangshi" res.Header.Semantic.Intent = "search_tangshi"
var content string
if params.SpeechWsResp.Dm.IntentName == "查询诗词释义" { if params.SpeechWsResp.Dm.IntentName == "查询诗词释义" {
res.Header.Semantic.Intent = "search_ancientpoem_meaning" res.Header.Semantic.Intent = "search_ancientpoem_meaning"
if params.SpeechWsResp.Dm.Widget.Extra.ContentTranslation == "" { //如果返回列表,整机是播放content里的消息 if params.SpeechWsResp.Dm.Widget.Extra.ContentTranslation == "" { //如果返回列表,整机是播放content里的消息
content = params.SpeechWsResp.Dm.Nlg
} else { } else {
res.ListItems = append(res.ListItems, map[string]interface{}{ content = params.SpeechWsResp.Dm.Widget.Extra.ContentTranslation
"content": params.SpeechWsResp.Dm.Widget.Extra.ContentTranslation,
"title": params.SpeechWsResp.Dm.Widget.Extra.Title,
"type": "TEXT", //原来是 TEXT,看看是否能播放
"url": "",
"mediaId": "",
})
} }
res.ListItems = append(res.ListItems, map[string]interface{}{
"content": content,
"title": params.SpeechWsResp.Dm.Widget.Extra.Title,
"type": "TEXT", //原来是 TEXT,看看是否能播放
"url": "",
"mediaId": "",
})
res.Header.Semantic.SkillId = res.Header.Semantic.Domain + "." + res.Header.Semantic.Intent res.Header.Semantic.SkillId = res.Header.Semantic.Domain + "." + res.Header.Semantic.Intent
return Marshal(params, res) return Marshal(params, res)
} else if params.SpeechWsResp.Dm.IntentName == "查询诗句" { } else if params.SpeechWsResp.Dm.IntentName == "查询诗句" {
res.Header.Semantic.Intent = "search_ancientpoem_chains" res.Header.Semantic.Intent = "search_ancientpoem_chains"
res.Header.Semantic.SkillId = res.Header.Semantic.Domain + "." + res.Header.Semantic.Intent res.Header.Semantic.SkillId = res.Header.Semantic.Domain + "." + res.Header.Semantic.Intent
res.ListItems = append(res.ListItems, map[string]interface{}{
"content": params.SpeechWsResp.Dm.Nlg,
"title": params.SpeechWsResp.Dm.Widget.Extra.Title,
"type": "TEXT", //原来是 TEXT,看看是否能播放
"url": "",
"mediaId": "",
})
return Marshal(params, res) return Marshal(params, res)
} }
......
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