From 296dcdb61368f9be3bd6daa9df030b5d06de7e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=96=87=E9=9D=99?= <1319697849@qq.com> Date: Thu, 19 Jun 2025 08:50:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9F=B3=E4=B9=90=E5=85=9C?= =?UTF-8?q?=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c2c.http | 12 ++++++------ service/speechNlu/domain.go | 6 +++++- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/c2c.http b/c2c.http index f9f8098..571332a 100644 --- a/c2c.http +++ b/c2c.http @@ -5,19 +5,19 @@ Content-Type: application/json "ip": "14.215.222.17", "mac": "ece154a865eb", "mid": "11011", - "query":"哈哈", + "query":"你喜欢吃零食吗", "requestId": "123456111" } ### -POST http://localhost:13302/semantic/unisoundc2c/speech-nlu-parse +POST http://172.28.54.27:13302/semantic/unisoundc2c/speech-nlu-parse Content-Type: application/json { "ip": "14.215.222.17", "mac": "ece154a865eb", "mid": "11011", - "query":"天使的翅膀", + "query":"谁是你爸", "requestId": "123456111" } @@ -38,7 +38,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": "谁是你爸" }, "postProc": {} } @@ -57,7 +57,7 @@ Content-Type: application/json }, "nluRet": { "asr_recongize": "", - "text": "播放歌曲大菠萝" + "text": "谁是你爸" } }, "version": "v0" @@ -79,7 +79,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 9c816b0..03a35b6 100644 --- a/service/speechNlu/domain.go +++ b/service/speechNlu/domain.go @@ -835,7 +835,11 @@ func musicDomain(params *model.SpeechDomainParams) []byte { } //result.ResponseText = "以下音乐由网易云提供:" //params.SpeechWsResp.Dm.Nlg } - result.ResponseText = list.GetData().GetResponseText() + if list.GetData().GetResponseText() == "" { + return replyWithChat("网络不稳定,请稍后再试", "doudi") + } else { + result.ResponseText = list.GetData().GetResponseText() + } //else { // return replyWithChat("抱歉,因版本限制或非会员,暂时无法播放", "doudi") //} -- GitLab