I am working on a program that includes speech synthesis. A few weeks ago I wrote an introductory
using (SpeechSynthesizer s = new SpeechSynthesizer())
{
s.SetOutputToWaveFile("file.wav");
s.Speak(textBox1.Text);
}
program. Everything went perfectly. I crossed out the “synthesis of synthetic speech” from my task list and moved on to other parts of the project.
Now I am writing a real program and trying to use the same basic block of code. However, now it does not work on a call s.SetOutputToWaveFile. It throws a PlatformNotSupportedException with the following message: "The system does not have a voice installed on the system or not in the current security setting."
I'm on 32-bit Vista. As far as I can tell, both programs have the same compiler settings. Please note that this is a Winforms application, not ASP.Net or something partially trusted. I stopped the source program in another instance of Visual Studio and it still works fine.
Any ideas?
Edit, 11/9/09:
I added generosity, and now even this program:
static void Main(string[] args)
{
using (SpeechSynthesizer ss = new SpeechSynthesizer())
{
ss.Speak("Hello There");
}
}
fails. I suppose there is some permission or something that I need to install, but I can not find it. My other program, the initial, basic program that does the same thing as this new one, still works.
source
share