Skip to content

Commit 41a8430

Browse files
authored
Merge pull request #105153 from IEvangelist/speechBotTutorial
Speech bot tutorial
2 parents f925af7 + 7b45eb4 commit 41a8430

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed
Loading
Loading

articles/cognitive-services/Speech-Service/tutorial-voice-enable-your-bot-speech-sdk.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ title: "Tutorial: Voices enable your bot using Speech SDK - Speech service"
33
titleSuffix: Azure Cognitive Services
44
description: In this tutorial, you'll create an Echo Bot using Microsoft Bot-Framework, deploy it to Azure, and register it with the Bot-Framework Direct Line Speech channel. Then you'll configure a sample client app for Windows that lets you speak to your bot and hear it respond back to you.
55
services: cognitive-services
6-
author: dargilco
6+
author: IEvangelist
77
manager: nitinme
88
ms.service: cognitive-services
99
ms.subservice: speech-service
1010
ms.topic: conceptual
11-
ms.date: 11/05/2019
12-
ms.author: dcohen
11+
ms.date: 02/21/2020
12+
ms.author: dapine
1313
---
1414

1515
# Tutorial: Voice-enable your bot using the Speech SDK
@@ -60,8 +60,7 @@ Here's what you'll need to complete this tutorial:
6060

6161
The client app that you'll create in this tutorial uses a handful of Azure services. To reduce the round-trip time for responses from your bot, you'll want to make sure that these services are located in the same Azure region. In this section, you'll create a resource group in the **West US** region. This resource group will be used when creating individual resources for the Bot-Framework, the Direct Line Speech channel, and the Speech service.
6262

63-
1. Sign in to the [Azure portal](https://portal.azure.com).
64-
1. From the left navigation, select **Resource groups**. Then click **Add** to add a new resource group.
63+
1. <a href="https://ms.portal.azure.com/#create/Microsoft.ResourceGroup" target="_blank">Create a resource group <span class="docon docon-navigate-external x-hidden-focus"></span></a>
6564
1. You'll be prompted to provide some information:
6665
* Set **Subscription** to **Free Trial** (you can also use an existing subscription).
6766
* Enter a name for your **Resource group**. We recommend **SpeechEchoBotTutorial-ResourceGroup**.
@@ -82,15 +81,13 @@ For more information about regions, see [Azure locations](https://azure.microsof
8281

8382
## Create resources
8483

85-
Now that you have a resource group in the **West US** region, the next step is to create individual resources for each service that you'll use in this tutorial.
84+
Now that you have a resource group in a supported region, the next step is to create individual resources for each service that you'll use in this tutorial.
8685

8786
### Create a Speech service resource
8887

8988
Follow these instructions to create a Speech resource:
9089

91-
1. Go to the [Azure portal](https://portal.azure.com) and select **Create a resource** from the left navigation.
92-
2. In the search bar, type **Speech**.
93-
3. Select **Speech**, then click **Create**.
90+
1. <a href="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices" target="_blank">Create a Speech service resource <span class="docon docon-navigate-external x-hidden-focus"></span></a>
9491
4. You'll be prompted to provide some information:
9592
* Give your resource a **Name**. We recommend **SpeechEchoBotTutorial-Speech**
9693
* For **Subscription**, make sure **Free Trial** is selected.
@@ -102,17 +99,15 @@ Follow these instructions to create a Speech resource:
10299

103100
At this point, check that your resource group (**SpeechEchoBotTutorial-ResourceGroup**) has a Speech resource:
104101

105-
| NAME | TYPE | LOCATION |
102+
| Name | Type | Location |
106103
|------|-------|----------|
107104
| SpeechEchoBotTutorial-Speech | Cognitive Services | West US |
108105

109106
### Create an Azure App Service plan
110107

111108
The next step is to create an App Service Plan. An App Service plan defines a set of compute resources for a web app to run.
112109

113-
1. Go to the [Azure portal](https://portal.azure.com) and select **Create a resource** from the left navigation.
114-
2. In the search bar, type **App Service Plan**. Next, locate and select the **App Service Plan** card from the search results.
115-
3. Click **Create**.
110+
1. <a href="https://ms.portal.azure.com/#create/Microsoft.AppServicePlanCreate" target="_blank">Create an Azure App Service plan <span class="docon docon-navigate-external x-hidden-focus"></span></a>
116111
4. You'll be prompted to provide some information:
117112
* Set **Subscription** to **Free Trial** (you can also use an existing subscription).
118113
* For **Resource group**, select **SpeechEchoBotTutorial-ResourceGroup**.
@@ -125,7 +120,7 @@ The next step is to create an App Service Plan. An App Service plan defines a se
125120

126121
At this point, check that your resource group (**SpeechEchoBotTutorial-ResourceGroup**) has two resources:
127122

128-
| NAME | TYPE | LOCATION |
123+
| Name | Type | Location |
129124
|------|-------|----------|
130125
| SpeechEchoBotTutorial-AppServicePlan | App Service Plan | West US |
131126
| SpeechEchoBotTutorial-Speech | Cognitive Services | West US |
@@ -152,11 +147,14 @@ Now that you've created some resources, let's build a bot. We're going to start
152147
samples\csharp_dotnetcore\02.echo-bot\EchoBot.sln
153148
```
154149

155-
4. After the project is loaded, press `F5` to build and run the project.
150+
4. After the project is loaded, press <kbd>F5</kbd> to build and run the project.
151+
5. A browser should launch and you'll see a screen looking similar to this.
152+
> [!div class="mx-imgBorder"]
153+
> ![echobot-running-on-localhost](media/tutorial-voice-enable-your-bot-speech-sdk/echobot-running-on-localhost.png "EchoBot running on localhost")
156154
157155
### Test the bot sample with the Bot Framework Emulator
158156

159-
The [Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop app that allows bot developers to test and debug their bots locally or remotely through a tunnel. The Emulator supports typed text as the input (not voice). The bot will response with text. Follow these steps to use the Bot Framework Emulator to test your Echo Bot running locally, with text input and text output. After we deploy the bot Azure we will test it with voice input and voice output.
157+
The [Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop app that allows bot developers to test and debug their bots locally or remotely through a tunnel. The Emulator supports typed text as the input (not voice). The bot will response with text. Follow these steps to use the Bot Framework Emulator to test your Echo Bot running locally, with text input and text output. After we deploy the bot to Azure we will test it with voice input and voice output.
160158

161159
1. Install the [Bot Framework Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases/latest) version 4.3.0 or greater
162160
2. Launch the Bot Framework Emulator and open your bot:
@@ -168,6 +166,8 @@ The [Bot Framework Emulator](https://github.com/microsoft/botframework-emulator)
168166
```
169167
and press "Connect".
170168
4. The bot should immediately greet you with "Hello and welcome!" message. Type in any text message and confirm you get a response from the bot.
169+
5. This is what an exchange of communication with an Echo Bot instance might look like:
170+
![bot-framework-emulator](media/tutorial-voice-enable-your-bot-speech-sdk/bot-framework-emulator.png "Bot Framework emulator")
171171

172172
## Deploy your bot to an Azure App Service
173173

@@ -184,7 +184,7 @@ The next step is to deploy the Echo Bot to Azure. There are a few ways to deploy
184184

185185
1. In the **Solution Explorer**, right-click the **EchoBot** project and select **Publish...**
186186
1. A new window titled **Pick a publish target** will open.
187-
1. Select **App Service** from the left navigation, select **Create New**, then click **Publish**.
187+
1. Select **App Service** from the **Azure services** navigation, select **Create New**, then click **Publish**.
188188
1. When the **Create App Service** window appears:
189189
* Click **Add an account**, and sign in with your Azure account credentials. If you're already signed in, select the account you want from the drop-down list.
190190
* For the **App Name**, you'll need to enter a globally unique name for your Bot. This name is used to create a unique bot URL. A default value will be populated including the date and time (For example: "EchoBot20190805125647"). You can use the default name for this tutorial.
@@ -202,7 +202,7 @@ The next step is to deploy the Echo Bot to Azure. There are a few ways to deploy
202202
1. Your default browser should open and display a page that reads: "Your bot is ready!".
203203
1. At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup** in the Azure portal, and confirm there are three resources:
204204

205-
| NAME | TYPE | LOCATION |
205+
| Name | Type | Location |
206206
|------|-------|----------|
207207
| EchoBot20190805125647 | App Service | West US |
208208
| SpeechEchoBotTutorial-AppServicePlan | App Service plan | West US |
@@ -213,7 +213,7 @@ The next step is to deploy the Echo Bot to Azure. There are a few ways to deploy
213213
You'll need to make a small configuration change so that your bot can communicate with the Direct Line Speech channel using web sockets. Follow these steps to enable web sockets:
214214

215215
1. Navigate to the [Azure portal](https://portal.azure.com), and locate your App Service. The resource should be named similar to **EchoBot20190805125647** (your unique app name).
216-
2. In the left navigation, under **Settings**, click **Configuration**.
216+
2. In the **Azure services** navigation, under **Settings**, click **Configuration**.
217217
3. Select the **General settings** tab.
218218
4. Locate the toggle for **Web sockets** and set it to **On**.
219219
5. Click **Save**.
@@ -228,6 +228,8 @@ Now that you've created an Azure App Service to host your bot, the next step is
228228
> [!NOTE]
229229
> If you'd like to learn more about how bots leverage channels, see [Connect a bot to channels](https://docs.microsoft.com/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0).
230230
231+
<!-- https://ms.portal.azure.com/#create/Microsoft.BotServiceConnectivityGalleryPackage -->
232+
231233
1. The first step is to create a new resource for the registration. In the [Azure portal](https://portal.azure.com), click **Create a resource**.
232234
2. In the search bar type **bot**, after the results appear, select **Bot Channels Registration**.
233235
3. Click **Create**.
@@ -244,7 +246,7 @@ Now that you've created an Azure App Service to host your bot, the next step is
244246

245247
At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup** in the Azure portal. It should now show four resources:
246248

247-
| NAME | TYPE | LOCATION |
249+
| Name | Type | Location |
248250
|------|-------|----------|
249251
| EchoBot20190805125647 | App Service | West US |
250252
| SpeechEchoBotTutorial-AppServicePlan | App Service plan | West US |
@@ -259,13 +261,13 @@ At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup**
259261
Now it's time to register your bot with the Direct Line Speech channel. This channel is what's used to create a connection between your echo bot and a client app compiled with the Speech SDK.
260262

261263
1. Locate and open your **SpeechEchoBotTutorial-BotRegistration** resource in the [Azure portal](https://portal.azure.com).
262-
1. From the left navigation, select **Channels**.
264+
1. From the **Azure services** navigation, select **Channels**.
263265
* Look for **More channels**, locate and click **Direct Line Speech**.
264266
* Review the text on the page titled **Configure Direct line Speech**, then expand the drop-down menu labeled "Cognitive service account."
265267
* Select the speech resource you created earlier (e.g., **SpeechEchoBotTutorial-Speech**) from the menu to associate your bot to your speech subscription key.
266268
* Click **Save**.
267269

268-
1. From the left navigation, click **Settings**.
270+
1. From the **Azure services** navigation, click **Settings**.
269271
* Check the box labeled **Enable Streaming Endpoint**. This is needed to enable a communication protocol built on web sockets between your bot and the Direct Line Speech channel.
270272
* Click **Save**.
271273

@@ -427,7 +429,7 @@ Now that you've made the necessary change to the bot, the next step is to republ
427429

428430
If you're not going to continue using the echo-bot deployed in this tutorial, you can remove it and all its associated Azure resources by simply deleting the Azure Resource group **SpeechEchoBotTutorial-ResourceGroup**.
429431

430-
1. From the [Azure portal](https://portal.azure.com), click on **Resource Groups** from the left navigation.
432+
1. From the [Azure portal](https://portal.azure.com), click on **Resource Groups** from the **Azure services** navigation.
431433
2. Find the resource group named: **SpeechEchoBotTutorial-ResourceGroup**. Click the three dots (...).
432434
3. Select **Delete resource group**.
433435

0 commit comments

Comments
 (0)