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);
205
205
206
206
int main()
207
207
{
208
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
208
209
auto speechKey = getEnvironmentVariable("SPEECH_KEY");
209
210
auto speechRegion = getEnvironmentVariable("SPEECH_REGION");
210
211
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ using Microsoft.CognitiveServices.Speech;
196
196
197
197
class Program
198
198
{
199
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
199
200
static string speechKey = Environment .GetEnvironmentVariable (" SPEECH_KEY" );
200
201
static string speechRegion = Environment .GetEnvironmentVariable (" SPEECH_REGION" );
201
202
Original file line number Diff line number Diff line change @@ -407,6 +407,7 @@ func wordBoundaryHandler(event speech.SpeechSynthesisWordBoundaryEventArgs) {
407
407
}
408
408
409
409
func main () {
410
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
410
411
speechKey := os.Getenv (" SPEECH_KEY" )
411
412
speechRegion := os.Getenv (" SPEECH_REGION" )
412
413
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ import java.util.Scanner;
214
214
import java.util.concurrent.ExecutionException ;
215
215
216
216
public class SpeechSynthesis {
217
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
217
218
private static String speechKey = System . getenv(" SPEECH_KEY" );
218
219
private static String speechRegion = System . getenv(" SPEECH_REGION" );
219
220
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
351
351
var sdk = require (" microsoft-cognitiveservices-speech-sdk" );
352
352
353
353
var audioFile = " YourAudioFile.wav" ;
354
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
354
355
const speechConfig = sdk .SpeechConfig .fromSubscription (process .env .SPEECH_KEY , process .env .SPEECH_REGION );
355
356
const audioConfig = sdk .AudioConfig .fromAudioFileOutput (audioFile);
356
357
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ def speech_synthesizer_word_boundary_cb(evt: speechsdk.SessionEventArgs):
197
197
print (' \t TextOffset: {} ' .format(evt.text_offset))
198
198
print (' \t WordLength: {} ' .format(evt.word_length))
199
199
200
+ # This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
200
201
speech_config = speechsdk.SpeechConfig(subscription = os.environ.get(' SPEECH_KEY' ), region = os.environ.get(' SPEECH_REGION' ))
201
202
202
203
# 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
50
50
51
51
int main()
52
52
{
53
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
53
54
auto speechKey = GetEnvironmentVariable("SPEECH_KEY");
54
55
auto speechRegion = GetEnvironmentVariable("SPEECH_REGION");
55
56
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
50
50
51
51
class Program
52
52
{
53
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
53
54
static string speechKey = Environment.GetEnvironmentVariable("SPEECH_KEY");
54
55
static string speechRegion = Environment.GetEnvironmentVariable("SPEECH_REGION");
55
56
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ Follow these steps to create a new GO module.
74
74
}
75
75
76
76
func main () {
77
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
77
78
speechKey := os.Getenv (" SPEECH_KEY" )
78
79
speechRegion := os.Getenv (" SPEECH_REGION" )
79
80
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.
85
85
import java.util.concurrent.Future;
86
86
87
87
public class SpeechRecognition {
88
+ // This example requires environment variables named "SPEECH_KEY" and "SPEECH_REGION"
88
89
private static String speechKey = System.getenv("SPEECH_KEY");
89
90
private static String speechRegion = System.getenv("SPEECH_REGION");
90
91
You can’t perform that action at this time.
0 commit comments