Forum Discussion
How can I set an audio input device for Speech SDK v.11 recognition?
Take a look at articles under "https://msdn.microsoft.com/en-us/library/dd371428(v=vs.85).aspx" section, especially at
"https://msdn.microsoft.com/en-us/library/dd370819(v=vs.85).aspx". Quote:
InStarting from Windows Vista, the waveOutOpen and waveInOpen functions always
assign the audio streams that they create to the default session — the process-specific session
that is identified by the session GUID value GUID_NULL.
In your case you have to
step 1: enumerate capture audio devices, choose one via waveInOpen function.
step 2: use SetInputToDefaultAudioDevice() method for speech recognition.
that's probably because while modern windows usually detects a few endpoint audio devices on modern hardware, its user who chooses which one he uses at the moment somewhere under "sound etc" control panel item (shown on attached image). guess so, i ain't sure. but you cannot rely on user in your case, aren't you?
try to find an easier (than CRT API) way to set default audio input device. i hope CIM/WMI classes have a method for it.
OK, i'm sure you found a solution monthes ago. But whatever...)
Thanks, we abandoned the project because we could never get it to work. I am actually back on it now and System.Speech, Microsoft.Speech and SAPI (Microsoft Speech Object v11) all have a different issue that makes it impossible for us to get it to work the way we need. One can't change the audio input, another won't let us change the recognizer language, etc. If you have any new information, by all means share it :)