Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Speech.Synthesis;
- namespace ConsoleApplication19 {
- class Program {
- static void Main(string[] args) {
- var synth = new SpeechSynthesizer();
- // Configure the audio output.
- synth.SetOutputToDefaultAudioDevice();
- char keyStroke;
- do {
- // Speak a string.
- synth.Speak("This example demonstrates a basic use of Speech Synthesizer");
- Console.WriteLine();
- Console.WriteLine("Press lower case [x] to exit." );
- var x = Console.ReadKey();
- keyStroke = x.KeyChar;
- } while (keyStroke != 'x');
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement