diff --git a/CHANGELOG.md b/CHANGELOG.md index ad75bcbfff66ac2ef93865c4c97ae62b7faf734a..6db64cf412ab54ad020c4846464f3fb30a62a697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Changed - 补充诗词解析兜底 - 暂停闹钟直接返回解析给整机处理 +- 补充闹钟兜底回复为第三方回复 ## [0.0.1-beta] - 2025.5.13 ### Changed diff --git a/c2c.http b/c2c.http index 9166f91a96cfaa3451f86f4b66067924a55961e1..69f82dbf9a8dc28c9b494c37bcec71962aa0294b 100644 --- a/c2c.http +++ b/c2c.http @@ -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;" }, "nluRet": { - "text": "城春草木深下一句" + "text": "设一个昨天5点的闹钟" }, "postProc": {} } @@ -33,7 +33,7 @@ Content-Type: application/json }, "nluRet": { "asr_recongize": "", - "text": "春望的释义" + "text": "设置一个昨天5点的闹钟" } }, "version": "v0" @@ -55,7 +55,7 @@ Content-Type: application/json "trafficParameter": "mode=childxx;macWifi=ece154a73d38;mid=11011;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": { - "text": "后天天气" + "text": "设置一个昨天5点的闹钟" }, "postProc": {} } diff --git a/service/speechNlu/domain.go b/service/speechNlu/domain.go index d05bb4f0a99185618354703fcfe69316a2022e9d..1361b33b0d3a4acb02ba5877727a96eba5ffa5fd 100644 --- a/service/speechNlu/domain.go +++ b/service/speechNlu/domain.go @@ -447,6 +447,9 @@ func alarmDomain(params *model.SpeechDomainParams) []byte { } if !params.CheckDm() || !params.CheckCommandParam() { + if result.ResponseText != "" { + return Marshal(params, &result) + } return replyWithChat(error_reply, "doudi") } api := params.SpeechWsResp.Dm.Command.Api @@ -1074,7 +1077,7 @@ func Marshal(params *model.SpeechDomainParams, res *model.ResponseBody) []byte { res.Header.Semantic.Domain = "chat" } if res.Header.Semantic.Intent == "" { - res.Header.Semantic.Domain = "chat" + res.Header.Semantic.Intent = "chat" } resByte, err := json.Marshal(res) if err != nil {