title: Strange problem with System.Speech Speech Synthesizer
body: <p>I'm working on a program that includes speech synthesis.  A few weeks ago, I wrote the introductory </p>
  
  <pre><code>    using (SpeechSynthesizer s = new SpeechSynthesizer())
      {
          s.SetOutputToWaveFile("file.wav");
          s.Speak(textBox1.Text);
      }
  </code></pre>
  
  <p>program.  It worked just fine.  I crossed off "research speech synthesis" from my task list and moved on to other parts of the project.</p>
  
  <p>Now I'm writing a real program, and trying to use this same basic block of code.  However, it is now failing on the <code>s.SetOutputToWaveFile</code> call.  It throws a PlatformNotSupportedException, with the following message: "No voice installed on the system or none available with the current security setting."</p>
  
  <p>I'm on 32-bit Vista.  As far as I can tell, both programs have the same compiler settings.  Note that this is a Winforms app, and not ASP.Net or anything partially trusted.  I pulled up the original program in another instance of Visual Studio, and it still works just fine.</p>
  
  <p>Any ideas?</p>
  
  <p>Edit, 11/9/09:</p>
  
  <p>I've added a bounty, and now even just this program:</p>
  
  <pre><code>static void Main(string[] args)
  {
      using (SpeechSynthesizer ss = new SpeechSynthesizer())
      {
          ss.Speak("Hello There");
      }
  }
  </code></pre>
  
  <p>fails.  I'm guessing that there's some permission or something that I need to set, but I can't find it.  My other program - the initial, basic program that does exactly the same as this new one, still works.</p>