Ejemplo n.º 1
0
        public static void BackAnswers(string sessionId, string deviceId, string questions, string actionId, string req, string url)
        {
            //语义槽为空的情况下,只返回
            SoundBodyResult bodyResult = new SoundBodyResult()
            {
                sessionId = sessionId,
                deviceId  = deviceId,
                questions = questions,
                actionId  = actionId,
                req       = req,
                url       = url,//只有2014和2011返回的req走百度语音合成
                blwakeup  = "0"
            };

            HsfWebSocket.ResponseSoundBodyResult(bodyResult);
            //释放当前session
            SessionDispose(sessionId);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 拼装返回音响的Json串,并返回
 /// </summary>
 public static bool NlpControlerRequestMsg(SoundBodyResult _SoundPassiveRequest)
 {
     log.Info($"智能家居app向音响发起请求: {_SoundPassiveRequest.req}");
     return(HsfWebSocket.ResponseSoundToRequest(_SoundPassiveRequest));
 }