Apr 14, 2017, 12:08:34 PM4/14/17
The SDK for Windows Server speech v11 has a .SetInputToDefaultAudioDevice, but obviously a telephony app needs to listen to any of the audio devices associated with TAPI line devices to do speech recognition. There is a .SetInputToAudioStream and .SetInputToMemoryStream. I tried many ways and could not get it to work. Here is something that got me close, but it gives me a COM error trying to set an spMMAudioIn to a system.io.stream object.
Dim sre As New SpeechRecognitionEngine
Dim fmt As New SpeechAudioFormatInfo(8000, AudioBitsPerSample.Sixteen, AudioChannel.Mono)
Dim audiosource As ISpeechMMSysAudio
audiosource = New SpMMAudioIn
audiosource.DeviceId = etLine1.WaveRecordID 'set audio input to audio device Id
I thought of trying to use Directsound to get the device ID. Can anyone help.