SpeechVoiceSpeakFlags SpFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync; SpVoice Voice = new SpVoice(); Voice.Speak("The time is bla bla bla", SpFlags); Voice.WaitUntilDone(Timeout.Infinite);
Note: the Interop.SpeechLib.dll file was obtained from the
C:\Program Files\Microsoft Speech SDK 5.1\Samples\CSharp\SimpleTTS\obj directory after downloading
the Microsoft Speech SDK 5.1 from Microsoft. The SDK is huge, but it has extra voices and more sample programs. You can download the whole speech SDK from the links below.