How to pass real-time audio stream to the Direct Line Speech endpoint?

前端 未结 1 1831
慢半拍i
慢半拍i 2021-01-07 02:27

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

相关标签:
1条回答
  • 2021-01-07 02:57

    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.

    0 讨论(0)
提交回复
热议问题