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; }
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"; } }
public void Start(ListenContext listenCtx, SpeechRecognitionEngine sre) { _listenCtx = listenCtx; using (var memoryStream = new MemoryStream(Encoding.ASCII.GetBytes(Resources.RecogCommand))) sre.LoadGrammar(new Grammar(memoryStream)); }
public void Start(ListenContext ctx, SpeechRecognitionEngine sre) { throw new System.NotImplementedException(); }
public Listen(ListenContext listenCtx) { _listenCtx = listenCtx; }