SpeechRecognitionEngine如何检测来自非默认麦克风的输入?

时间:2019-05-13 02:35:56

标签: c# .net speech-recognition

我正在使用SpeechRecognizationEngine获取用户的声音并更改为文本。当前的SpeechRecognitionEngine是SetInputToDefaultAudioDevice()。我想将其更改为任何非默认麦克风。

_recognizer = new SpeechRecognitionEngine();
  _recognizer.LoadGrammar(new DictationGrammar());
 _recognizer.SpeechRecognized += _recognizeSpeechAndWriteToConsole_SpeechRecognized; // if speech is recognized, call the specified method
  _recognizer.SpeechRecognitionRejected += _recognizeSpeechAndWriteToConsole_SpeechRecognitionRejected; // if recognized speech is rejected, call the specified method

 _recognizer.SetInputToDefaultAudioDevice(); // set the input to the default audio device

有什么办法可以做到这一点?

0 个答案:

没有答案