diff --git a/c2c.http b/c2c.http index f9f80982fdbef09404ee639700924a9c2be8d307..571332af0fd70064e66e57e751cad925eaa5f689 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 9c816b027b1c16a3703144a5274c181494aad2f1..03a35b6b816e17e4c9d55e40ed1d48c63dd41987 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") //}