Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Speech.Synthesis;
- using System.Threading;
- namespace ConsoleApplication19 {
- class Program {
- // This is a dumb loop being the basis of the simplest service...
- static void Main(string[] args) {
- var synth = new SpeechSynthesizer();
- var limit = 1000;
- // Configure the audio output.
- synth.SetOutputToDefaultAudioDevice();
- const string stringToSay = "This example demonstrates a basic use of Speech Synthesizer";
- do {
- synth.Speak(stringToSay);
- limit--;
- Thread.Sleep(10000);
- } while (limit > 0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement