// SpeechLib 使用SpeechLib.SpVoice voice = new SpVoiceClass();
            SpeechLib.SpeechVoiceSpeakFlags sVSFDefault = SpeechVoiceSpeakFlags.SVSFDefault;
            voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0);
            string sContent = @"本月王菲与李亚鹏突爆离婚,日前有香港媒体报道指王菲因潜心修佛,看淡尘世七情六欲,毅然与李亚鹏斩断8年夫妻情丝。据报道,在前日起先后有好友及有缘人表示,收到早前王菲亲手抄写的佛经作为中秋节礼物。其中一位网友谓:“收到了王菲亲书亲印的经书。精美无比,心生欢喜。”";
            voice.Speak(sContent, sVSFDefault);以上代码在WinForm或ConsoleApplication中可以正常运行并可以朗读上面的文字,可是在windows 服务中,却不能播发此声音。
服务中代码如下:System.Timers.Timer tmrJob = new Timer();        public Service1()
        {
            InitializeComponent();            // 
            this.tmrJob.Interval = 1000 * 30;
            this.tmrJob.AutoReset = true;
            this.tmrJob.Elapsed += new ElapsedEventHandler(tmrJob_Elapsed);
        }        private void tmrJob_Elapsed(object sender, ElapsedEventArgs e)
        {
            SpeechLib.SpVoice voice = new SpVoiceClass();
            SpeechLib.SpeechVoiceSpeakFlags sVSFDefault = SpeechVoiceSpeakFlags.SVSFDefault;
            voice.Voice = voice.GetVoices(string.Empty, string.Empty).Item(0);
            string sContent = @"本月王菲与李亚鹏突爆离婚,日前有香港媒体报道指王菲因潜心修佛,看淡尘世七情六欲,毅然与李亚鹏斩断8年夫妻情丝。据报道,在前日起先后有好友及有缘人表示,收到早前王菲亲手抄写的佛经作为中秋节礼物。其中一位网友谓:“收到了王菲亲书亲印的经书。精美无比,心生欢喜。”";
            voice.Speak(sContent, sVSFDefault);
        }        protected override void OnStart(string[] args)
        {
            this.tmrJob.Start();
        }        protected override void OnStop()
        {
            this.tmrJob.Stop();
        }执行这句代码voice.Speak(sContent, sVSFDefault); 出现异常,COMException。