Skip to content

Commit a3abc83

Browse files
committed
clarify env vars must be named as shown
1 parent a62fc20 commit a3abc83

File tree

18 files changed

+19
-0
lines changed

18 files changed

+19
-0
lines changed

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ std::string getEnvironmentVariable(const char* name);
205205

206206
int main()
207207
{
208+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
208209
auto speechKey = getEnvironmentVariable("SPEECH_KEY");
209210
auto speechRegion = getEnvironmentVariable("SPEECH_REGION");
210211

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/csharp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ using Microsoft.CognitiveServices.Speech;
196196

197197
class Program
198198
{
199+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
199200
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
200201
static string speechRegion = Environment.GetEnvironmentVariable("SPEECH_REGION");
201202

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/go.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ func wordBoundaryHandler(event speech.SpeechSynthesisWordBoundaryEventArgs) {
407407
}
408408

409409
func main() {
410+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
410411
speechKey := os.Getenv("SPEECH_KEY")
411412
speechRegion := os.Getenv("SPEECH_REGION")
412413

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/java.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ import java.util.Scanner;
214214
import java.util.concurrent.ExecutionException;
215215

216216
public class SpeechSynthesis {
217+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
217218
private static String speechKey = System.getenv("SPEECH_KEY");
218219
private static String speechRegion = System.getenv("SPEECH_REGION");
219220

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/javascript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ Here's an example that shows how to subscribe to events for speech synthesis. Yo
351351
var sdk = require("microsoft-cognitiveservices-speech-sdk");
352352

353353
var audioFile = "YourAudioFile.wav";
354+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
354355
const speechConfig = sdk.SpeechConfig.fromSubscription(process.env.SPEECH_KEY, process.env.SPEECH_REGION);
355356
const audioConfig = sdk.AudioConfig.fromAudioFileOutput(audioFile);
356357

articles/cognitive-services/Speech-Service/includes/how-to/speech-synthesis/python.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def speech_synthesizer_word_boundary_cb(evt: speechsdk.SessionEventArgs):
197197
print('\tTextOffset: {}'.format(evt.text_offset))
198198
print('\tWordLength: {}'.format(evt.word_length))
199199

200+
# This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
200201
speech_config = speechsdk.SpeechConfig(subscription=os.environ.get('SPEECH_KEY'), region=os.environ.get('SPEECH_REGION'))
201202

202203
# Required for WordBoundary event sentences.

articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics/cpp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Follow these steps to create a new console application and install the Speech SD
5050
5151
int main()
5252
{
53+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
5354
auto speechKey = GetEnvironmentVariable("SPEECH_KEY");
5455
auto speechRegion = GetEnvironmentVariable("SPEECH_REGION");
5556

articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics/csharp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Follow these steps to create a new console application and install the Speech SD
5050
5151
class Program
5252
{
53+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
5354
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
5455
static string speechRegion = Environment.GetEnvironmentVariable("SPEECH_REGION");
5556

articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics/go.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Follow these steps to create a new GO module.
7474
}
7575

7676
func main() {
77+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
7778
speechKey := os.Getenv("SPEECH_KEY")
7879
speechRegion := os.Getenv("SPEECH_REGION")
7980

articles/cognitive-services/Speech-Service/includes/quickstarts/speech-to-text-basics/java.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Follow these steps to create a new console application for speech recognition.
8585
import java.util.concurrent.Future;
8686

8787
public class SpeechRecognition {
88+
// This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
8889
private static String speechKey = System.getenv("SPEECH_KEY");
8990
private static String speechRegion = System.getenv("SPEECH_REGION");
9091

0 commit comments

Comments
 (0)