我想知道谁能告诉我,当.NET微软语音合成器说话时,如何基本上调整标签或图像的大小。
目标是在合成器说话时使中间的文本变大变小。因此,当有高音高时,文本更大,而低音高时,文本更小,等等。
有什么方法可以在合成器说话的时候完成这个任务吗?我已经尝试过使用SpeakStarted和SpeakComplted事件来调整文本大小,但它是静态的-它不会随着合成器的说话而改变。
我真的很感谢任何人的帮助。
我是在C# WPF中编程的。
非常感谢。
发布于 2015-07-27 06:44:41
订阅SpeakProgress或StateChanged事件怎么样?SpeakProgress是“在说出提示的单个单词后引发的”,StateChanged提供了“暂停、准备或说话”的选项。https://msdn.microsoft.com/en-us/library/hh362940%28v=office.14%29.aspx
SpeechSynthesizer synth = new SpeechSynthesizer();
// Add a handler for the SpeakProgress event.
synth.SpeakProgress +=
new EventHandler<SpeakProgressEventArgs>(synth_SpeakProgress);
// Write each word and its character position to the console.
static void synth_SpeakProgress(object sender, SpeakProgressEventArgs e)
{
Console.WriteLine("Speak progress: {0} {1}", e.CharacterPosition, e.Text);
}https://stackoverflow.com/questions/31627659
复制相似问题