protected virtual IObservable <string> Listen(bool completeOnEndOfSpeech) => Observable.Create <string>(ob => { NSError error = null; var audioEngine = new AVAudioEngine(); var speechRecognizer = new NSSpeechRecognizer(); speechRecognizer.Delegate = new NSSpeechRecognizerDelegate(); return(() => { }); });
public IObservable <string> ContinuousDictation() => Observable.Create <string>(ob => { var speech = new NSSpeechRecognizer(); speech.Commands = new[] { "", "" }; speech.Delegate = this; speech.StartListening(); var sub = this.speechSubj.Subscribe( ob.OnNext, ob.OnError, ob.OnCompleted ); return(() => { speech.StopListening(); sub.Dispose(); }); });
public override void DidRecognizeCommand(NSSpeechRecognizer sender, string command) { }