Connect a bot to Direct Line Speech
APPLIES TO: SDK v4
This article describes how to connect a bot to the Direct Line Speech channel. Use this channel to allow users to interact with a bot via voice.
Once you've built your bot, onboarding it with Direct Line Speech will enable low-latency, high reliability connection with client applications using the Speech SDK. These connections are optimized for voice in and voice out conversational experiences. For more information on Direct Line Speech and how to build client applications, visit the custom voice-first virtual assistant page.
- An Azure account. If you don't already have one, create a free account before you begin.
- An existing bot published to Azure.
- A Speech cognitive service resource. You can either create a new Speech resource in Azure or use an existing one.
Add the Direct Line Speech channel
- In the Azure portal, select the Azure Bot resource.
- Under Settings, select the Channels pane. Then select Direct Line Speech.
- Add your Speech resource to the Direct Line Speech channel by entering the values on the page. Select the links under each field for more information.
- Select Apply to confirm your channel selection. This adds the Direct Line Speech channel to your bot.
Enable the Bot Framework Protocol Streaming Extensions
With the Direct Line Speech channel connected to your bot, you now need to enable Bot Framework Protocol Streaming Extensions support for optimal, low-latency interaction.
- Under Settings select Configuration.
- Select Enable Streaming Endpoint. Then select Apply.
- Now go to the bot's app service.
- In the App Service instance, under the Settings category, select Configuration.
- Select the General settings tab. Then set Web sockets to On.
- Select Save at the top of the configuration page.
The Bot Framework Protocol Streaming Extensions are now enabled for your bot. You're now ready to update your bot code and integrate Streaming Extensions support to an existing bot project.
If you followed all the steps, you can now talk to the bot using the client application downloadable at Windows Voice Assistant Client. For more information see Voice-enable your bot using the Speech SDK.
Adding protocol support to your bot
The following step is only needed for bots built before the the v4.8 SDK release.
With the Direct Line Speech channel connected and support for the Bot Framework Protocol Streaming Extensions enabled, all that's left is to add code to your bot to support the optimized communication. Follow the instructions on adding Streaming Extensions support to your bot to ensure full compatibility with Direct Line Speech.
Submit and view feedback for