Esempio n. 1
0
 public LoopbackRecognizer(string key, string region)
 {
     this.capture    = new WasapiLoopbackCapture();
     this.stream     = new WaveCaptureStream(this.capture);
     this.recognizer = new AzureSpeechRecognizer(key, region, this.stream);
     this.recognizer.SpeechPredicted  += (snd, evt) => this.SpeechPredicted?.Invoke(snd, evt);
     this.recognizer.SpeechRecognized += (snd, evt) => this.SpeechRecognized?.Invoke(snd, evt);
 }
Esempio n. 2
0
 public LoopbackRecognizer()
 {
     this.capture    = new WasapiLoopbackCapture();
     this.stream     = new WaveCaptureStream(this.capture);
     this.recognizer = new LocalSpeechRecognizer(this.stream);
     this.recognizer.SpeechPredicted  += (snd, evt) => this.SpeechPredicted?.Invoke(snd, evt);
     this.recognizer.SpeechRecognized += (snd, evt) => this.SpeechRecognized?.Invoke(snd, evt);
 }