How should you comp...
 
Notifications
Clear all

How should you complete the code? To answer, select the appropriate options in the answer area. NOTE:

1 Posts
1 Users
0 Likes
134 Views
(@tsuchiuramanual)
Noble Member
Joined: 2 years ago
Posts: 747
Topic starter  

HOTSPOT

You are developing a service that records lectures given in English (United Kingdom).

You have a method named AppendToTranscriptFile that takes translated text and a language identifier.

You need to develop code that will provide transcripts of the lectures to attendees in their respective language. The supported languages are English, French, Spanish, and German.

How should you complete the code? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Show Answer Hide Answer

Suggested Answer:

Explanation:

Box 1: {"fr", "de", "es"}

A common task of speech translation is to specify target translation languages, at least one is required but multiples are supported. The following code snippet sets both French and German as translation language targets.

static async Task TranslateSpeechAsync()

{

var translationConfig =

SpeechTranslationConfig.FromSubscription(SPEECH__SUBSCRIPTION__KEY, SPEECH__SERVICE__REGION);

translationConfig.SpeechRecognitionLanguage = "it-IT";

// Translate to languages. See, https://aka.ms/speech/sttt-languages

translationConfig.AddTargetLanguage("fr");

translationConfig.AddTargetLanguage("de");

}

Box 2: TranslationRecognizer

After you've created a SpeechTranslationConfig, the next step is to initialize a TranslationRecognizer.

Example code:

static async Task TranslateSpeechAsync()

{

var translationConfig =

SpeechTranslationConfig.FromSubscription(SPEECH__SUBSCRIPTION__KEY, SPEECH__SERVICE__REGION);

var fromLanguage = "en-US";

var toLanguages = new List<string> { "it", "fr", "de" };

translationConfig.SpeechRecognitionLanguage = fromLanguage;

toLanguages.ForEach(translationConfig.AddTargetLanguage);

using var recognizer = new TranslationRecognizer(translationConfig);

}


   
Quote

Latest Microsoft AI-102 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: