You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/tutorial-voice-enable-your-bot-speech-sdk.md
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,13 @@ title: "Tutorial: Voices enable your bot using Speech SDK - Speech service"
3
3
titleSuffix: Azure Cognitive Services
4
4
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.
5
5
services: cognitive-services
6
-
author: dargilco
6
+
author: IEvangelist
7
7
manager: nitinme
8
8
ms.service: cognitive-services
9
9
ms.subservice: speech-service
10
10
ms.topic: conceptual
11
-
ms.date: 11/05/2019
12
-
ms.author: dcohen
11
+
ms.date: 02/21/2020
12
+
ms.author: dapine
13
13
---
14
14
15
15
# Tutorial: Voice-enable your bot using the Speech SDK
@@ -60,8 +60,7 @@ Here's what you'll need to complete this tutorial:
60
60
61
61
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.
62
62
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. <ahref="https://ms.portal.azure.com/#create/Microsoft.ResourceGroup"target="_blank">Create a resource group <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>
65
64
1. You'll be prompted to provide some information:
66
65
* Set **Subscription** to **Free Trial** (you can also use an existing subscription).
67
66
* 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
82
81
83
82
## Create resources
84
83
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.
86
85
87
86
### Create a Speech service resource
88
87
89
88
Follow these instructions to create a Speech resource:
90
89
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. <ahref="https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesSpeechServices"target="_blank">Create a Speech service resource <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>
94
91
4. You'll be prompted to provide some information:
95
92
* Give your resource a **Name**. We recommend **SpeechEchoBotTutorial-Speech**
96
93
* For **Subscription**, make sure **Free Trial** is selected.
@@ -102,17 +99,15 @@ Follow these instructions to create a Speech resource:
102
99
103
100
At this point, check that your resource group (**SpeechEchoBotTutorial-ResourceGroup**) has a Speech resource:
104
101
105
-
|NAME|TYPE|LOCATION|
102
+
|Name|Type|Location|
106
103
|------|-------|----------|
107
104
| SpeechEchoBotTutorial-Speech | Cognitive Services | West US |
108
105
109
106
### Create an Azure App Service plan
110
107
111
108
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.
112
109
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. <ahref="https://ms.portal.azure.com/#create/Microsoft.AppServicePlanCreate"target="_blank">Create an Azure App Service plan <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>
116
111
4. You'll be prompted to provide some information:
117
112
* Set **Subscription** to **Free Trial** (you can also use an existing subscription).
118
113
* 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
125
120
126
121
At this point, check that your resource group (**SpeechEchoBotTutorial-ResourceGroup**) has two resources:
127
122
128
-
|NAME|TYPE|LOCATION|
123
+
|Name|Type|Location|
129
124
|------|-------|----------|
130
125
| SpeechEchoBotTutorial-AppServicePlan | App Service Plan | West US |
131
126
| 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
152
147
samples\csharp_dotnetcore\02.echo-bot\EchoBot.sln
153
148
```
154
149
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
+
> 
156
154
157
155
### Test the bot sample with the Bot Framework Emulator
158
156
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.
160
158
161
159
1. Install the [Bot Framework Emulator](https://github.com/Microsoft/BotFramework-Emulator/releases/latest) version 4.3.0 or greater
162
160
2. Launch the Bot Framework Emulator and open your bot:
@@ -168,6 +166,8 @@ The [Bot Framework Emulator](https://github.com/microsoft/botframework-emulator)
168
166
```
169
167
and press "Connect".
170
168
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:
@@ -184,7 +184,7 @@ The next step is to deploy the Echo Bot to Azure. There are a few ways to deploy
184
184
185
185
1. In the **Solution Explorer**, right-click the **EchoBot** project and select **Publish...**
186
186
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**.
188
188
1. When the **Create App Service** window appears:
189
189
* 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.
190
190
* 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
202
202
1. Your default browser should open and display a page that reads: "Your bot is ready!".
203
203
1. At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup** in the Azure portal, and confirm there are three resources:
204
204
205
-
|NAME|TYPE|LOCATION|
205
+
|Name|Type|Location|
206
206
|------|-------|----------|
207
207
| EchoBot20190805125647 | App Service | West US |
208
208
| 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
213
213
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:
214
214
215
215
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**.
217
217
3. Select the **General settings** tab.
218
218
4. Locate the toggle for **Web sockets** and set it to **On**.
219
219
5. Click **Save**.
@@ -228,6 +228,8 @@ Now that you've created an Azure App Service to host your bot, the next step is
228
228
> [!NOTE]
229
229
> 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).
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**.
232
234
2. In the search bar type **bot**, after the results appear, select **Bot Channels Registration**.
233
235
3. Click **Create**.
@@ -244,7 +246,7 @@ Now that you've created an Azure App Service to host your bot, the next step is
244
246
245
247
At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup** in the Azure portal. It should now show four resources:
246
248
247
-
|NAME|TYPE|LOCATION|
249
+
|Name|Type|Location|
248
250
|------|-------|----------|
249
251
| EchoBot20190805125647 | App Service | West US |
250
252
| SpeechEchoBotTutorial-AppServicePlan | App Service plan | West US |
@@ -259,13 +261,13 @@ At this point, check your Resource Group **SpeechEchoBotTutorial-ResourceGroup**
259
261
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.
260
262
261
263
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**.
263
265
* Look for **More channels**, locate and click **Direct Line Speech**.
264
266
* Review the text on the page titled **Configure Direct line Speech**, then expand the drop-down menu labeled "Cognitive service account."
265
267
* Select the speech resource you created earlier (e.g., **SpeechEchoBotTutorial-Speech**) from the menu to associate your bot to your speech subscription key.
266
268
* Click **Save**.
267
269
268
-
1. From the left navigation, click **Settings**.
270
+
1. From the **Azure services** navigation, click **Settings**.
269
271
* 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.
270
272
* Click **Save**.
271
273
@@ -427,7 +429,7 @@ Now that you've made the necessary change to the bot, the next step is to republ
427
429
428
430
Ifyou'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**.
429
431
430
-
1. Fromthe [Azureportal](https://portal.azure.com), click on **Resource Groups** from the left navigation.
432
+
1. Fromthe [Azureportal](https://portal.azure.com), click on **Resource Groups** from the **Azure services** navigation.
0 commit comments