Correct Answers: A and C
Here is the completed code:
<pre>static async Task TranslateSpeechAsync()
{
var translationConfig =
SpeechTranslationConfig.FromSubscription(SPEECH__SUBSCRIPTION__KEY, SPEECH__SERVICE__REGION);
translationConfig.SpeechRecognitionLanguage = "it-IT";
translationConfig.AddTargetLanguage("fr");
}
</pre>Option A is correct because you would use the SpeechRecognitionLanguage property of SpeechTranslationConfig to specify the source language. In this case, the source language is Italian.
Option B is incorrect because the TranslationRecognizer class translates speech into text. It is not a property of translationConfig. Instead, it uses translationConfig as an input parameter.
Option C is correct because the AddTargetLanguage property specifies the target language. In this case, French is the target language.
Option D is incorrect because the objective is to add a target language. The removeTargetLanguage method is used to remove a target language of translation. Hence it is not the correct choice here.
Reference:
To learn more about Speech Translation, use the link given below:
https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-translation?tabs=script%2Cwindowsinstall&pivots=programming-language-csharp