Exemplo n.º 1
0
        public Boolean SendPattern(string match)
        {
            //  try
            //  {
            //     oRecognizer.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(oRecognizer_SpeechRecognized);
            //oRecognizer.AudioStateChanged += new EventHandler<AudioStateChangedEventArgs>(oRecognizer_StateChanged);
            //   }
            //   catch (Exception ex)
            //   {
            //      Log.Error("Unable to configure oRecognizer", ex);
            //   }

            //   oRecognizer = OSAEGrammar.Load_Direct_Grammar(oRecognizer);
            //   oRecognizer = OSAEGrammar.Load_Voice_Grammars(oRecognizer);
            //  oRecognizer = OSAEGrammar.Load_Text_Only_Grammars(oRecognizer);

            //REPLACE WITH GRAMMAR



            // string patternName = Common.MatchPattern(match,"");
            // if (patternName != "")
            //  {
            OSAEScriptManager.RunScript(match, "", "Rest");
            Log.Debug("Executing Script:  " + match);
            return(true);
            //  }
            //  else
            //return false;
        }
 protected void btnTest_Click(object sender, EventArgs e)
 {
     OSAEScriptManager.ScriptDelete("Test Script");
     OSAEScriptManager.ScriptAdd("Test Script", ddlScriptProcessor.SelectedValue, hdnScript.Value);
     OSAEScriptManager.RunScript("Test Script", txtTestParameter.Text, "WebUI");
 }
 protected void btnTest_Click(object sender, EventArgs e)
 {
     OSAEScriptManager.ScriptDelete("Test Script");
     OSAEScriptManager.ScriptAdd("Test Script", ddlScriptProcessor.SelectedValue, hdnScript.Value);
     OSAEScriptManager.RunScript("Test Script", txtTestParameter.Text, Session["Username"].ToString());
 }