public async Task CreateTranslationRecognizer() { if (recognized != null) { await recognized.StopContinuousRecognitionAsync(); await recognized.StopKeywordRecognitionAsync(); } recognized = new TranslationRecognizer(speechConfiguration); recognized.Recognizing += OnSpeechRecognizing; recognized.SessionStarted += OnSessionStarted; recognized.SessionStopped += OnSessionStopped; recognized.Recognized += OnRecognized; recognized.Synthesizing += OnSynthesizing; recognized.Canceled += OnCanceled; }