我在我的应用程序中使用media元素播放由SpeechSynthesizer转换的文本。我想知道我可以使用媒体元素控制语音音高或速率吗?
var synth = new SpeechSynthesizer();
var voice = Windows.Media.SpeechSynthesis.SpeechSynthesizer.DefaultVoice;
synth.Voice = voice;
var text = "AssalamuAlaikum";
var stream = await synth.SynthesizeTextToStreamAsync(text);
var me = new MediaElement();
me.DefaultPlaybackRate = 0.7;
me.SetSource(stream, stream.ContentType);
me.Play();
我希望改变音高或速率以像孩子一样转换语音。