File tree Expand file tree Collapse file tree 18 files changed +19
-0
lines changed
articles/cognitive-services/Speech-Service/includes Expand file tree Collapse file tree 18 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ std::string getEnvironmentVariable(const char* name);
205205
206206int 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
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ using Microsoft.CognitiveServices.Speech;
196196
197197class 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
Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ func wordBoundaryHandler(event speech.SpeechSynthesisWordBoundaryEventArgs) {
407407}
408408
409409func 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
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ import java.util.Scanner;
214214import java.util.concurrent.ExecutionException ;
215215
216216public 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ def speech_synthesizer_word_boundary_cb(evt: speechsdk.SessionEventArgs):
197197 print (' \t TextOffset: {} ' .format(evt.text_offset))
198198 print (' \t WordLength: {} ' .format(evt.word_length))
199199
200+ # This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
200201speech_config = speechsdk.SpeechConfig(subscription = os.environ.get(' SPEECH_KEY' ), region = os.environ.get(' SPEECH_REGION' ))
201202
202203# Required for WordBoundary event sentences.
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments