Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/301.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
c#和文本到语音_C#_Text To Speech - Fatal编程技术网

c#和文本到语音

c#和文本到语音,c#,text-to-speech,C#,Text To Speech,使用代码: SpeechSynthesizer synth = new SpeechSynthesizer(); synth.SetOutputToDefaultAudioDevice(); synth.Rate = 0; synth.Speak(Line); 我如何说话并让声音听起来更史诗?这里提供的关于 您可以检查已安装的语音并选择合适的语音 foreach (InstalledVoice voice in synth.GetInstalledVoices()) {

使用代码:

SpeechSynthesizer synth = new SpeechSynthesizer();
synth.SetOutputToDefaultAudioDevice();
synth.Rate = 0;
synth.Speak(Line);

我如何说话并让声音听起来更史诗?

这里提供的关于

您可以检查已安装的语音并选择合适的语音

    foreach (InstalledVoice voice in synth.GetInstalledVoices())
    {
         VoiceInfo info = voice.VoiceInfo;
         Console.WriteLine(" Voice Name: " + info.Name);
    }
设置/更改语音,可能会有所帮助

synthesizer.Volume = 100; // This might helps to change Voice bit lower and upper rates.
synthesizer.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Senior);

注意:这些语音枚举必须安装在您的计算机中。

此处提供的关于

您可以检查已安装的语音并选择合适的语音

    foreach (InstalledVoice voice in synth.GetInstalledVoices())
    {
         VoiceInfo info = voice.VoiceInfo;
         Console.WriteLine(" Voice Name: " + info.Name);
    }
设置/更改语音,可能会有所帮助

synthesizer.Volume = 100; // This might helps to change Voice bit lower and upper rates.
synthesizer.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Senior);

注意:这些语音枚举必须安装在您的计算机中。

例如低音。讲述一个RPG很棒。看看这个:,记住声音是windows的一部分,而不是你的程序。所以你只能使用机器上安装的东西。谢谢伙计。有降低声音的方法吗?我认为你不能改变声音,你只能使用不同的声音。synth.Speak(Line+SpeechBuilder(MorganFreeman,synth.Audio);比如低声。很适合讲述RPG。看看这个:,记住这些声音是windows的一部分,而不是你的程序。所以你只能使用机器上安装的东西。谢谢,伙计。有没有办法降低声音?我认为你不能改变声音,你只能使用不同的声音。synth.Speak(Line+SpeechBuilder(摩根弗里曼,合成音频);