Skip to content

Commit 253d601

Browse files
authored
update recognize speech methods to read speechlanguage (Azure#36953)
1 parent 56ec358 commit 253d601

File tree

1 file changed

+10
-0
lines changed
  • sdk/communication/Azure.Communication.CallAutomation/src

1 file changed

+10
-0
lines changed

sdk/communication/Azure.Communication.CallAutomation/src/CallMedia.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,11 @@ private static RecognizeRequestInternal CreateRecognizeRequest(CallMediaRecogniz
455455
SpeechOptions = speechConfigurations
456456
};
457457

458+
if (!String.IsNullOrEmpty(recognizeSpeechOptions.SpeechLanguage))
459+
{
460+
recognizeConfigurationsInternal.SpeechLanguage = recognizeSpeechOptions.SpeechLanguage;
461+
}
462+
458463
RecognizeRequestInternal request = new RecognizeRequestInternal(recognizeSpeechOptions.InputType, recognizeConfigurationsInternal);
459464

460465
request.PlayPrompt = TranslatePlaySourceToInternal(recognizeSpeechOptions.Prompt);
@@ -485,6 +490,11 @@ private static RecognizeRequestInternal CreateRecognizeRequest(CallMediaRecogniz
485490
DtmfOptions = dtmfConfigurations,
486491
};
487492

493+
if (!String.IsNullOrEmpty(recognizeSpeechOrDtmfOptions.SpeechLanguage))
494+
{
495+
recognizeConfigurationsInternal.SpeechLanguage = recognizeSpeechOrDtmfOptions.SpeechLanguage;
496+
}
497+
488498
RecognizeRequestInternal request = new RecognizeRequestInternal(recognizeSpeechOrDtmfOptions.InputType, recognizeConfigurationsInternal);
489499

490500
request.PlayPrompt = TranslatePlaySourceToInternal(recognizeSpeechOrDtmfOptions.Prompt);

0 commit comments

Comments
 (0)