Commit c48895ee authored by 赵文静's avatar 赵文静

修改播控

parent 27ee0a8a
Pipeline #5405 passed with stage
in 0 seconds
......@@ -6,6 +6,8 @@
- 修改闹钟兜底回复不播报的问题
- 修改音乐技能
- 修改新闻title
- 修改sessionId记录
- 修改播控
## [0.0.1-beta.2] - 2025.5.29
### Changed
......
......@@ -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": {}
}
......
......@@ -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")
}
}
}
......
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