首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

Speech.Synthesis疏失

2014-01-09 
Speech.Synthesis出错环境win7 64位 vs2013学习Speech.Synthesis文本朗读,编译没错,运行出错,请大家帮助解

Speech.Synthesis出错
环境win7 64位 vs2013
学习Speech.Synthesis文本朗读,编译没错,运行出错,请大家帮助解决,谢过了。
代码如下:
using System;
using System.Speech.Synthesis;

namespace SampleSynthesis
{
    class Program
    {
        static void Main(string[] args)
        {
            // Initialize a new instance of the SpeechSynthesizer.
            using (SpeechSynthesizer synth = new SpeechSynthesizer())
            {
                // Configure the audio output.               
                synth.SetOutputToDefaultAudioDevice();
                // Speak a string synchronously.
                synth.Speak("What is your favorite color?");
            }

            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
    }
}
[解决办法]
可能是因为64位关系的原因吧,我也试过了,在控制面板内根本就找不到有关语音这一项。还有安装完tts5.1后文件夹的方式与网络上的完全不同。试试改回x86试试看。

热点排行