Beispiel #1
0
        public void OnXFCardDictateEvent(string ask, string answer)
        {
            if (XFCardDictateEvent != null)
            {
                XFQuestionEventArgs obj = new XFQuestionEventArgs();
                obj.Ask    = ask;
                obj.Answer = answer;

                XFCardDictateEvent(this, obj);
            }
        }
Beispiel #2
0
        void XfJsonResolver_XFCardDictateEvent(object sender, XFQuestionEventArgs args)
        {
            if (string.IsNullOrEmpty(args.Ask))
            {
                return;
            }

            //显示问话
            ShowUserText(args.Ask);

            //保存用户的问话
            MainService.TaskService.Request(TaskActionType.Voice, args.Ask);
        }
Beispiel #3
0
        void XfJsonResolver_XFCardQuestionEvent(object sender, XFQuestionEventArgs args)
        {
            if (string.IsNullOrEmpty(args.Answer))
            {
                return;
            }

            //判断是否需要使用本地问答库
            if (IsUseLocalQuestion(args.Ask))
            {
                return;
            }
            else
            {
                //显示讯飞的回答
                ShowMachineText(args.Answer);
            }
        }