Skip to content

Commit 4e5dbfd

Browse files
author
Qi Ding
committed
docs: improve clarity, consistency, and tone in speech quickstart
1 parent 20af9ae commit 4e5dbfd

File tree

17 files changed

+77
-77
lines changed

17 files changed

+77
-77
lines changed

articles/ai-services/speech-service/includes/common/environment-variables-resourcekey-endpoint.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- --- -->
1+
---
22
author: eric-urban
33
ms.service: azure-ai-speech
44
ms.topic: include
@@ -13,13 +13,13 @@ You need to authenticate your application to access Azure AI services. This arti
1313
To set the environment variables for your Speech resource key and region, open a console window, and follow the instructions for your operating system and development environment.
1414

1515
- To set the `SPEECH_KEY` environment variable, replace *your-key* with one of the keys for your resource.
16-
- To set the `END_POINT` environment variable, replace *your-end-point* with one of the regions for your resource.
16+
- To set the `ENDPOINT` environment variable, replace *your-endpoint* with one of the regions for your resource.
1717

1818
#### [Windows](#tab/windows)
1919

2020
```console
2121
setx SPEECH_KEY your-key
22-
setx END_POINT your-end-point
22+
setx ENDPOINT your-endpoint
2323
```
2424

2525
> [!NOTE]
@@ -35,7 +35,7 @@ Edit your *.bashrc* file, and add the environment variables:
3535

3636
```bash
3737
export SPEECH_KEY=your-key
38-
export END_POINT=your-end-point
38+
export ENDPOINT=your-endpoint
3939
```
4040

4141
After you add the environment variables, run `source ~/.bashrc` from your console window to make the changes effective.
@@ -48,7 +48,7 @@ Edit your *.bash_profile* file, and add the environment variables:
4848

4949
```bash
5050
export SPEECH_KEY=your-key
51-
export END_POINT=your-end-point
51+
export ENDPOINT=your-endpoint
5252
```
5353

5454
After you add the environment variables, run `source ~/.bash_profile` from your console window to make the changes effective.
@@ -62,7 +62,7 @@ For iOS and macOS development, you set the environment variables in Xcode. For e
6262
1. Under **Environment Variables** select the plus (+) sign to add a new environment variable.
6363
1. Enter `SPEECH_KEY` for the **Name** and enter your Speech resource key for the **Value**.
6464

65-
To set the environment variable for your Speech resource region, follow the same steps. Set `END_POINT` to the endpoint of your resource. For example, `https://YourServiceRegion.api.cognitive.microsoft.com`.
65+
To set the environment variable for your Speech resource region, follow the same steps. Set `ENDPOINT` to the endpoint of your resource. For example, `https://YourServiceRegion.api.cognitive.microsoft.com`.
6666

6767

6868

articles/ai-services/speech-service/includes/quickstarts/speech-to-text-basics/cpp.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ Follow these steps to create a console application and install the Speech SDK.
5151
5252
int main()
5353
{
54-
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
54+
// This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
5555
auto speechKey = GetEnvironmentVariable("SPEECH_KEY");
56-
auto endPoint = GetEnvironmentVariable("END_POINT");
56+
auto endpoint = GetEnvironmentVariable("ENDPOINT");
5757
58-
if ((size(speechKey) == 0) || (size(endPoint) == 0)) {
59-
std::cout << "Please set both SPEECH_KEY and END_POINT environment variables." << std::endl;
58+
if ((size(speechKey) == 0) || (size(endpoint) == 0)) {
59+
std::cout << "Please set both SPEECH_KEY and ENDPOINT environment variables." << std::endl;
6060
return -1;
6161
}
6262
63-
auto speechConfig = SpeechConfig::FromEndpoint(speechKey, endPoint);
63+
auto speechConfig = SpeechConfig::FromEndpoint(speechKey, endpoint);
6464
6565
speechConfig->SetSpeechRecognitionLanguage("en-US");
6666
@@ -113,10 +113,10 @@ Follow these steps to create a console application and install the Speech SDK.
113113

114114
1. To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.md). For example, use `es-ES` for Spanish (Spain). If you don't specify a language, the default is `en-US`. For details about how to identify one of multiple languages that might be spoken, see [Language identification](~/articles/ai-services/speech-service/language-identification.md).
115115

116-
1. [Build and run](/cpp/build/vscpp-step-2-build) your new console application to start speech recognition from a microphone.
116+
1. To start speech recognition from a microphone, [Build and run](/cpp/build/vscpp-step-2-build) your new console application.
117117

118118
> [!IMPORTANT]
119-
> Make sure that you set the `SPEECH_KEY` and `END_POINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
119+
> Make sure that you set the `SPEECH_KEY` and `ENDPOINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
120120
121121
1. Speak into your microphone when prompted. What you speak should appear as text:
122122

articles/ai-services/speech-service/includes/quickstarts/speech-to-text-basics/csharp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Follow these steps to create a console application and install the Speech SDK.
5454

5555
class Program
5656
{
57-
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
57+
// This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
5858
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
59-
static string endPoint = Environment.GetEnvironmentVariable("END_POINT");
59+
static string endpoint = Environment.GetEnvironmentVariable("ENDPOINT");
6060

6161
static void OutputSpeechRecognitionResult(SpeechRecognitionResult speechRecognitionResult)
6262
{
@@ -84,7 +84,7 @@ Follow these steps to create a console application and install the Speech SDK.
8484

8585
async static Task Main(string[] args)
8686
{
87-
var speechConfig = SpeechConfig.FromEndpoint(speechKey, endPoint);
87+
var speechConfig = SpeechConfig.FromEndpoint(speechKey, endpoint);
8888
speechConfig.SpeechRecognitionLanguage = "en-US";
8989

9090
using var audioConfig = AudioConfig.FromDefaultMicrophoneInput();
@@ -106,7 +106,7 @@ Follow these steps to create a console application and install the Speech SDK.
106106
```
107107

108108
> [!IMPORTANT]
109-
> Make sure that you set the `SPEECH_KEY` and `END_POINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
109+
> Make sure that you set the `SPEECH_KEY` and `ENDPOINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
110110
111111
1. Speak into your microphone when prompted. What you speak should appear as text:
112112

articles/ai-services/speech-service/includes/quickstarts/speech-to-text-basics/java.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ Follow these steps to create a console application for speech recognition.
7575
import java.util.concurrent.Future;
7676

7777
public class SpeechRecognition {
78-
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
78+
// This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
7979
private static String speechKey = System.getenv("SPEECH_KEY");
80-
private static String endPoint = System.getenv("END_POINT");
80+
private static String endpoint = System.getenv("ENDPOINT");
8181

8282
public static void main(String[] args) throws InterruptedException, ExecutionException {
83-
SpeechConfig speechConfig = SpeechConfig.fromEndpoint(speechKey, endPoint);
83+
SpeechConfig speechConfig = SpeechConfig.fromEndpoint(speechKey, endpoint);
8484
speechConfig.setSpeechRecognitionLanguage("en-US");
8585
recognizeFromMicrophone(speechConfig);
8686
}
@@ -125,7 +125,7 @@ Follow these steps to create a console application for speech recognition.
125125
```
126126

127127
> [!IMPORTANT]
128-
> Make sure that you set the `SPEECH_KEY` and `END_POINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
128+
> Make sure that you set the `SPEECH_KEY` and `ENDPOINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
129129
130130
1. Speak into your microphone when prompted. What you speak should appear as text:
131131

articles/ai-services/speech-service/includes/quickstarts/speech-to-text-basics/python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Follow these steps to create a console application.
4949
import azure.cognitiveservices.speech as speechsdk
5050

5151
def recognize_from_microphone():
52-
# This example requires environment variables named "SPEECH_KEY" and "END_POINT"
52+
# This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
5353
# Replace with your own subscription key and endpoint, the endpoint is like : "https://YourServiceRegion.api.cognitive.microsoft.com"
54-
speech_config = speechsdk.SpeechConfig(subscription=os.environ.get('SPEECH_KEY'), endpoint=os.environ.get('END_POINT'))
54+
speech_config = speechsdk.SpeechConfig(subscription=os.environ.get('SPEECH_KEY'), endpoint=os.environ.get('ENDPOINT'))
5555
speech_config.speech_recognition_language="en-US"
5656

5757
audio_config = speechsdk.audio.AudioConfig(use_default_microphone=True)
@@ -83,7 +83,7 @@ Follow these steps to create a console application.
8383
```
8484

8585
> [!IMPORTANT]
86-
> Make sure that you set the `SPEECH_KEY` and `END_POINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
86+
> Make sure that you set the `SPEECH_KEY` and `ENDPOINT` [environment variables](#set-environment-variables). If you don't set these variables, the sample fails with an error message.
8787
8888
1. Speak into your microphone when prompted. What you speak should appear as text:
8989

articles/ai-services/speech-service/includes/quickstarts/speech-translation-basics/cpp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Follow these steps to create a new console application and install the Speech SD
4747
{
4848
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
4949
auto speechKey = GetEnvironmentVariable("SPEECH_KEY");
50-
auto endPoint = GetEnvironmentVariable("END_POINT");
50+
auto endpoint = GetEnvironmentVariable("END_POINT");
5151
52-
auto speechTranslationConfig = SpeechTranslationConfig::FromEndpoint(speechKey, endPoint);
52+
auto speechTranslationConfig = SpeechTranslationConfig::FromEndpoint(speechKey, endpoint);
5353
speechTranslationConfig->SetSpeechRecognitionLanguage("en-US");
5454
speechTranslationConfig->AddTargetLanguage("it");
5555
@@ -107,9 +107,9 @@ Follow these steps to create a new console application and install the Speech SD
107107
```
108108
109109
1. To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=stt#supported-languages). Specify the full locale with a dash (`-`) separator. For example, `es-ES` for Spanish (Spain). The default language is `en-US` if you don't specify a language. For details about how to identify one of multiple languages that might be spoken, see [language identification](~/articles/ai-services/speech-service/language-identification.md).
110-
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
110+
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions, you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
111111
112-
[Build and run](/cpp/build/vscpp-step-2-build) your new console application to start speech recognition from a microphone.
112+
To start speech recognition from a microphone, [Build and run](/cpp/build/vscpp-step-2-build) your new console application.
113113
114114
Speak into your microphone when prompted. What you speak should be output as translated text in the target language:
115115
@@ -120,7 +120,7 @@ Translated into 'it': Sono entusiasta di provare la traduzione vocale.
120120
```
121121

122122
## Remarks
123-
Now that you've completed the quickstart, here are some additional considerations:
123+
After completing the quickstart, here are some more considerations:
124124

125125
- This example uses the `RecognizeOnceAsync` operation to transcribe utterances of up to 30 seconds, or until silence is detected. For information about continuous recognition for longer audio, including multi-lingual conversations, see [How to translate speech](~/articles/ai-services/speech-service/how-to-translate-speech.md).
126126
- To recognize speech from an audio file, use `FromWavFileInput` instead of `FromDefaultMicrophoneInput`:

articles/ai-services/speech-service/includes/quickstarts/speech-translation-basics/csharp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ Follow these steps to create a new console application and install the Speech SD
4545
4646
class Program
4747
{
48-
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
48+
// This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
4949
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
50-
static string endPoint = Environment.GetEnvironmentVariable("END_POINT");
50+
static string endpoint = Environment.GetEnvironmentVariable("ENDPOINT");
5151
5252
static void OutputSpeechRecognitionResult(TranslationRecognitionResult translationRecognitionResult)
5353
{
@@ -79,7 +79,7 @@ Follow these steps to create a new console application and install the Speech SD
7979
8080
async static Task Main(string[] args)
8181
{
82-
var speechTranslationConfig = SpeechTranslationConfig.FromEndpoint(speechKey, endPoint);
82+
var speechTranslationConfig = SpeechTranslationConfig.FromEndpoint(speechKey, endpoint);
8383
speechTranslationConfig.SpeechRecognitionLanguage = "en-US";
8484
speechTranslationConfig.AddTargetLanguage("it");
8585
@@ -94,7 +94,7 @@ Follow these steps to create a new console application and install the Speech SD
9494
```
9595
9696
1. To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=stt#supported-languages). Specify the full locale with a dash (`-`) separator. For example, `es-ES` for Spanish (Spain). The default language is `en-US` if you don't specify a language. For details about how to identify one of multiple languages that might be spoken, see [language identification](~/articles/ai-services/speech-service/language-identification.md).
97-
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
97+
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions, you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
9898
9999
Run your new console application to start speech recognition from a microphone:
100100
@@ -111,7 +111,7 @@ TRANSLATED into 'it': Sono entusiasta di provare la traduzione vocale.
111111
```
112112

113113
## Remarks
114-
Now that you've completed the quickstart, here are some additional considerations:
114+
After completing the quickstart, here are some more considerations:
115115

116116
- This example uses the `RecognizeOnceAsync` operation to transcribe utterances of up to 30 seconds, or until silence is detected. For information about continuous recognition for longer audio, including multi-lingual conversations, see [How to translate speech](~/articles/ai-services/speech-service/how-to-translate-speech.md).
117117
- To recognize speech from an audio file, use `FromWavFileInput` instead of `FromDefaultMicrophoneInput`:

articles/ai-services/speech-service/includes/quickstarts/speech-translation-basics/java.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ Follow these steps to create a new console application for speech recognition.
7474
import java.util.Map;
7575

7676
public class SpeechTranslation {
77-
// This example requires environment variables named "SPEECH_KEY" and "END_POINT"
77+
// This example requires environment variables named "SPEECH_KEY" and "ENDPOINT"
7878
private static String speechKey = System.getenv("SPEECH_KEY");
79-
private static String endPoint = System.getenv("END_POINT");
79+
private static String endpoint = System.getenv("ENDPOINT");
8080

8181
public static void main(String[] args) throws InterruptedException, ExecutionException {
82-
SpeechTranslationConfig speechTranslationConfig = SpeechTranslationConfig.fromEndpoint(speechKey, endPoint);
82+
SpeechTranslationConfig speechTranslationConfig = SpeechTranslationConfig.fromEndpoint(speechKey, endpoint);
8383
speechTranslationConfig.setSpeechRecognitionLanguage("en-US");
8484

8585
String[] toLanguages = { "it" };
@@ -124,7 +124,7 @@ Follow these steps to create a new console application for speech recognition.
124124
```
125125

126126
1. To change the speech recognition language, replace `en-US` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=stt#supported-languages). Specify the full locale with a dash (`-`) separator. For example, `es-ES` for Spanish (Spain). The default language is `en-US` if you don't specify a language. For details about how to identify one of multiple languages that might be spoken, see [language identification](~/articles/ai-services/speech-service/language-identification.md).
127-
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
127+
1. To change the translation target language, replace `it` with another [supported language](~/articles/ai-services/speech-service/language-support.md?tabs=speech-translation#supported-languages). With few exceptions, you only specify the language code that precedes the locale dash (`-`) separator. For example, use `es` for Spanish (Spain) instead of `es-ES`. The default language is `en` if you don't specify a language.
128128

129129
Run your new console application to start speech recognition from a microphone:
130130

@@ -142,7 +142,7 @@ Translated into 'it': Sono entusiasta di provare la traduzione vocale.
142142
```
143143

144144
## Remarks
145-
Now that you've completed the quickstart, here are some additional considerations:
145+
After completing the quickstart, here are some more considerations:
146146

147147
- This example uses the `RecognizeOnceAsync` operation to transcribe utterances of up to 30 seconds, or until silence is detected. For information about continuous recognition for longer audio, including multi-lingual conversations, see [How to translate speech](~/articles/ai-services/speech-service/how-to-translate-speech.md).
148148
- To recognize speech from an audio file, use `fromWavFileInput` instead of `fromDefaultMicrophoneInput`:

0 commit comments

Comments
 (0)