title: Getting Exception from HRESULT: 0x8004503A in Speechlib
body: <p>I have create a application for text to speech using Speechlib SpVoice. it is working fine with windows application.</p>
  
  <p>But when i Create windows service using same code . It give me this error</p>
  
  <blockquote>
    <p>System.Runtime.InteropServices.COMException (0x8004503A): Exception
    from HRESULT: 0x8004503A    at SpeechLib.ISpeechVoice.Speak</p>
  </blockquote>
  
  <p>this is my code</p>
  
  <pre><code> public partial class LEDPlayService : ServiceBase
      {
          static int MessageID = 0;
          static SpeechLib.SpVoice VoiceObj = new SpeechLib.SpVoice();
          static System.Timers.Timer myTimer = new System.Timers.Timer();
          protected override void OnStart(string[] args)
           {
  
              myTimer.Elapsed += new ElapsedEventHandler(OnElapsedTime);
              //This statement is used to set interval to 1 minute (= 60,000 milliseconds)
              myTimer.Interval = 60* 1000;
              // enabling the timer
              myTimer.Enabled = true; ;
              myTimer.AutoReset = false;
          }
  
          private static void OnElapsedTime(object source, ElapsedEventArgs e)
          {
              ((System.Timers.Timer)source).Stop();
              myTimer.Enabled = false; ;
              bool result =PlayAudio("Hello prithvi");
              ((System.Timers.Timer)source).Start();
              myTimer.Enabled = true;
  
              // TraceService(""+DateTime.Now.TimeOfDay);
          }
  
          public static bool PlayAudio(string text)
          {
            bool res = false;
              try
              {
                  VoiceObj.Speak(text, SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault);
                  res = true;
              }
              catch(Exception e)
              {
                  TraceService("error in sound........."+e.InnerException+e.Message+"   "+e.ToString());
                  res = false;
              }
              return res;
          }
  
      }
  </code></pre>
  
  <p>Please help me..</p>