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/includes/quickstarts/from-microphone/go/go.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,10 +21,6 @@ Before you get started:
21
21
> *[Setup your development environment and create an empty project](../../../../quickstarts/setup-platform.md)
22
22
> * Make sure that you have access to a microphone for audio capture
23
23
24
-
## Support and updates
25
-
26
-
Updates to the Speech SDK Go package are distributed via
27
-
28
24
## Setup your environment
29
25
30
26
Update the go.mod file with the latest SDK version by adding this line
@@ -101,8 +97,21 @@ func main() {
101
97
}
102
98
```
103
99
100
+
Replace the `YOUR_SUBSCRIPTION_KEY` and `YOUR_SUBSCRIPTIONKEY_REGION` values with actual values from the Speech resource.
101
+
102
+
- Navigate to the Azure portal, and open the Speech resource
103
+
- Under the **Keys** on the left, there are two available subscription keys
104
+
- Use either one as the `YOUR_SUBSCRIPTION_KEY` value replacement
105
+
- Under the **Overview** on the left, note the region and map it to the region identifier
106
+
- Use the Region identifier as the `YOUR_SUBSCRIPTIONKEY_REGION` value replacement, for example: `"westus"`for**West US**
107
+
108
+
## Code explanation
109
+
The Speech subscription key and region are required to create a speech configuration object. The configuration object is needed to instantiate a speech recognizer object.
110
+
111
+
The recognizer instance exposes multiple ways to recognize speech. In this example, speech is continuously recognized. This functionality lets the Speech service know that you're sending many phrases for recognition, and when the program terminates to stop recognizing speech. As results are yielded, the code will write them to the console.
112
+
104
113
## Build and run
105
-
You're now set up to build your project and test your custom voice assistant using the Speech service.
114
+
You're now set up to build your project and testspeech recognition using the Speech service.
106
115
1. Build your project, e.g. **"go build"**
107
116
2. Run the module and speak a phrase or sentence into your device's microphone. Your speech is transmitted to the Speech service and transcribed to text, which appears in the output.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/includes/quickstarts/voice-assistants/go/go.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,10 +25,6 @@ Before you get started:
25
25
> [!NOTE]
26
26
> Please refer to [the list of supported regions for voice assistants](~/articles/cognitive-services/speech-service/regions.md#voice-assistants) and ensure your resources are deployed in one of those regions.
27
27
28
-
## Support and updates
29
-
30
-
Updates to the Speech SDK Go package are distributed via
31
-
32
28
## Setup your environment
33
29
34
30
Update the go.mod file with the latest SDK version by adding this line
@@ -39,7 +35,7 @@ require (
39
35
```
40
36
41
37
## Start with some boilerplate code
42
-
1.Replace the contents of your source file (e.g. `quickstart.go`) with the below, which includes:
38
+
Replace the contents of your source file (e.g. `quickstart.go`) with the below, which includes:
43
39
44
40
- "main" package definition
45
41
- importing the necessary modules from the Speech SDK
@@ -101,18 +97,25 @@ func main() {
101
97
}
102
98
```
103
99
104
-
2. Update these fields at the top of the functionwith your bot subscription information
105
-
```sh
106
-
subscription := "YOUR_SUBSCRIPTION_KEY"
107
-
region := "YOUR_BOT_REGION"
108
-
```
100
+
Replace the `YOUR_SUBSCRIPTION_KEY` and `YOUR_BOT_REGION` values with actual values from the Speech resource.
101
+
102
+
- Navigate to the Azure portal, and open the Speech resource
103
+
- Under the **Keys** on the left, there are two available subscription keys
104
+
- Use either one as the `YOUR_SUBSCRIPTION_KEY` value replacement
105
+
- Under the **Overview** on the left, note the region and map it to the region identifier
106
+
- Use the Region identifier as the `YOUR_BOT_REGION` value replacement, for example: `"westus"`for**West US**
109
107
110
108
> [!NOTE]
111
109
> Please refer to [the list of supported regions forvoice assistants](~/articles/cognitive-services/speech-service/regions.md#voice-assistants) and ensure your resources are deployedin one of those regions.
112
110
113
111
> [!NOTE]
114
112
> For information on configuring your bot, see the Bot Framework documentation for [the Direct Line Speech channel](https://docs.microsoft.com/azure/bot-service/bot-service-channel-connect-directlinespeech).
115
113
114
+
## Code explanation
115
+
The Speech subscription key and region are required to create a speech configuration object. The configuration object is needed to instantiate a speech recognizer object.
116
+
117
+
The recognizer instance exposes multiple ways to recognize speech. In this example, speech is continuously recognized. This functionality lets the Speech service know that you're sending many phrases for recognition, and when the program terminates to stop recognizing speech. As results are yielded, the code will write them to the console.
118
+
116
119
## Build and run
117
120
You're now set up to build your project and test your custom voice assistant using the Speech service.
0 commit comments