File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
articles/cognitive-services/Speech-Service/includes
quickstarts/text-to-speech-basics Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -288,13 +288,13 @@ public class SpeechSynthesis {
288
288
// Synthesize the SSML
289
289
System . out. println(" SSML to synthesize:" );
290
290
System . out. println(ssml);
291
- SpeechSynthesisResult speechRecognitionResult = speechSynthesizer. SpeakSsmlAsync (ssml). get();
291
+ SpeechSynthesisResult speechSynthesisResult = speechSynthesizer. SpeakSsmlAsync (ssml). get();
292
292
293
- if (speechRecognitionResult . getReason() == ResultReason . SynthesizingAudioCompleted ) {
293
+ if (speechSynthesisResult . getReason() == ResultReason . SynthesizingAudioCompleted ) {
294
294
System . out. println(" SynthesizingAudioCompleted result" );
295
295
}
296
- else if (speechRecognitionResult . getReason() == ResultReason . Canceled ) {
297
- SpeechSynthesisCancellationDetails cancellation = SpeechSynthesisCancellationDetails . fromResult(speechRecognitionResult );
296
+ else if (speechSynthesisResult . getReason() == ResultReason . Canceled ) {
297
+ SpeechSynthesisCancellationDetails cancellation = SpeechSynthesisCancellationDetails . fromResult(speechSynthesisResult );
298
298
System . out. println(" CANCELED: Reason=" + cancellation. getReason());
299
299
300
300
if (cancellation. getReason() == CancellationReason . Error ) {
Original file line number Diff line number Diff line change @@ -104,13 +104,13 @@ Follow these steps to create a new console application for speech recognition.
104
104
return;
105
105
}
106
106
107
- SpeechSynthesisResult speechRecognitionResult = speechSynthesizer.SpeakTextAsync(text).get();
107
+ SpeechSynthesisResult speechSynthesisResult = speechSynthesizer.SpeakTextAsync(text).get();
108
108
109
- if (speechRecognitionResult .getReason() == ResultReason.SynthesizingAudioCompleted) {
109
+ if (speechSynthesisResult .getReason() == ResultReason.SynthesizingAudioCompleted) {
110
110
System.out.println("Speech synthesized to speaker for text [" + text + "]");
111
111
}
112
- else if (speechRecognitionResult .getReason() == ResultReason.Canceled) {
113
- SpeechSynthesisCancellationDetails cancellation = SpeechSynthesisCancellationDetails.fromResult(speechRecognitionResult );
112
+ else if (speechSynthesisResult .getReason() == ResultReason.Canceled) {
113
+ SpeechSynthesisCancellationDetails cancellation = SpeechSynthesisCancellationDetails.fromResult(speechSynthesisResult );
114
114
System.out.println("CANCELED: Reason=" + cancellation.getReason());
115
115
116
116
if (cancellation.getReason() == CancellationReason.Error) {
You can’t perform that action at this time.
0 commit comments