Example #1
0
 public void Start(ListenContext listenCtx, SpeechRecognitionEngine sre)
 {
     _listenCtx = listenCtx;
     using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(Resources.RecogPlay)))
         sre.LoadGrammar(new Grammar(memoryStream));
     var gb = new GrammarBuilder { Culture = new CultureInfo("en-US") };
     gb.Append(_choices);
     sre.LoadGrammar(new Grammar(gb));
     _lastKnownGood = null;
 }
Example #2
0
 public void Start(ListenContext listenCtx, SpeechRecognitionEngine sre)
 {
     _listenCtx = listenCtx;
     using (var s = (!File.Exists(_localPath) ? (Stream)new MemoryStream(Encoding.ASCII.GetBytes(Resources.RecogIdle)) : File.OpenRead(_localPath)))
     {
         var g = new Grammar(s);
         sre.LoadGrammar(g);
         Name = "XBOX";
     }
 }
Example #3
0
 public void Start(ListenContext listenCtx, SpeechRecognitionEngine sre)
 {
     _listenCtx = listenCtx;
     using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(Resources.RecogCommand)))
         sre.LoadGrammar(new Grammar(memoryStream));
 }
Example #4
0
 public void Start(ListenContext ctx, SpeechRecognitionEngine sre)
 {
     throw new System.NotImplementedException();
 }
Example #5
0
 public Listen(ListenContext listenCtx)
 {
     _listenCtx = listenCtx;
 }