async Task SpeakTextAsync(string text, MediaElement mediaElement) { //TODO: ARS use link below to stop async tasks //https://stackoverflow.com/questions/15614991/simply-stop-an-async-method //if(TgsRepeats.IsOn) //{ // BtnStopPauseRepeatMediaOutAsync.Visibility = Visibility.Visible; // BtnRepeatMediaOutAsync.Visibility = Visibility.Collapsed; // stpStatus.Visibility = Visibility.Visible; //} // IRandomAccessStream stream = await this.SynthesizeTextToSpeechAsync(text); IRandomAccessStream stream = await SynthesizeTextToSpeechAsync(text); await mediaElement.PlayStreamAsync1(stream, true); }