diff --git a/CHANGELOG.md b/CHANGELOG.md index 81f5575878ed242a3843905f584f5cc40989babf..cf23fc7c3ed7059ff4b162c5bad5a8935a753c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - 修改闹钟兜底回复不播报的问题 - 修改音乐技能 - 修改新闻title +- 修改sessionId记录 +- 修改播控 ## [0.0.1-beta.2] - 2025.5.29 ### Changed diff --git a/c2c.http b/c2c.http index 5c70dbde660cec902f923b60411bbab8d00d45e8..fc53364d4f405779283873c7e00c637bc2ebb8c8 100644 --- a/c2c.http +++ b/c2c.http @@ -33,7 +33,7 @@ Content-Type: application/json }, "nluRet": { "asr_recongize": "", - "text": "播放周杰伦的音乐" + "text": "暂停播放" } }, "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": "计算五加三" }, "postProc": {} } diff --git a/service/speechNlu/domain.go b/service/speechNlu/domain.go index 6f06dda4aadd62e8709ea3a113c2cfe4125bb2e1..3b34bb90e5777935a72ba9b3fb32367f906e98dc 100644 --- a/service/speechNlu/domain.go +++ b/service/speechNlu/domain.go @@ -764,24 +764,23 @@ func globalCtrlDomain(params *model.SpeechDomainParams) []byte { func playCtrlDomain(params *model.SpeechDomainParams) []byte { query := params.SpeechWsResp.Dm.Input - if !params.CheckDmParam() { + if !params.CheckDmCommand() { return replyWithChat(error_reply, "doudi") } else { - if params.SpeechWsResp.Dm.Param.Operate != "" { - switch params.SpeechWsResp.Dm.Param.Operate { - case "暂停": + if params.SpeechWsResp.Dm.Command.Api != "" { + switch params.SpeechWsResp.Dm.Command.Api { + case "DUI.MediaController.Pause": return transformGreeProtocolReply(query, "PlayControl", "control_pause", nil) - case "继续": + case "DUI.MediaController.Play": return transformGreeProtocolReply(query, "PlayControl", "control_resume", nil) - case "停止": + case "DUI.MediaController.Stop": return transformGreeProtocolReply(query, "PlayControl", "control_stop", nil) - } - } else if params.SpeechWsResp.Dm.Param.Number != "" { - switch params.SpeechWsResp.Dm.Param.Number { - case "+1": + case "DUI.MediaController.Next": return transformGreeProtocolReply(query, "PlayControl", "control_next", nil) - case "-1": + case "DUI.MediaController.Prev": return transformGreeProtocolReply(query, "PlayControl", "control_previous", nil) + default: + return replyWithChat(error_reply, "doudi") } } }