I am trying to use Direct Line Speech (DLS) in my custom voice app. The Voice app has access to the real-time audio streams which I want to (pcm encoded) it directly to Dire
I believe your answer lies in the Microsoft.CognitiveServices.Speech.Audio.AudioConfig class. Have a look at this line in the Direct Line Speech client:
this.connector = new DialogServiceConnector(config, AudioConfig.FromDefaultMicrophoneInput());
AudioConfig
provides many options besides FromDefaultMicrophoneInput
. I suspect you'll want to use one of the three FromStreamInput overloads. If you do that then ListenOnceAsync
will use your stream instead of the microphone.