我可以改變速率和音量,但音調是沒有辦法..... 有沒有什麼辦法可以改變它?如何在Visual Basic中設置音高?
這是代碼:
private void ButtonSpeak_Click(object sender, RoutedEventArgs e)
{
if (comboVoice.SelectedItem != null)
synthesizer.SelectVoice(comboVoice.SelectedItem.ToString());
synthesizer.Volume = Convert.ToInt32(sliderVolume.Value);
synthesizer.Rate = Convert.ToInt32(sliderRate.Value);
switch (synthesizer.State)
{
//if synthesizer is ready
case SynthesizerState.Ready:
synthesizer.SpeakAsync(ConvertRichTextBoxContentsToString());
ButtonSpeak.Content = "Pause";
break;
//if synthesizer is paused
case SynthesizerState.Paused:
synthesizer.Resume();
ButtonSpeak.Content = "Pause";
break;
//if synthesizer is speaking
case SynthesizerState.Speaking:
synthesizer.Pause();
ButtonSpeak.Content = "Resume";
break;
}
}
非常感謝您的幫助!
幾乎沒有語音實現實際上支持它。聽起來像一個花栗鼠只是不被認爲是一個有用的功能。 –