Esempio n. 1
0
        static void Main(string[] args)
        {
            string input = "start";

            while (input != "exit")
            {
                bot = new HotShotBot();
                Console.Write("You: ");
                input = Console.ReadLine();
                var output = bot.getOutput(input);

                //Console.WriteLine(input);
                Console.WriteLine("Bot: " + output);

                //Make the bot Speak
                SpeechSynthesizer synthesizer = new SpeechSynthesizer();
                synthesizer.Volume = 100;  // 0...100
                synthesizer.Rate   = -2;   // -10...10

                // Synchronous
                synthesizer.Speak(output);

                // Asynchronous
                // synthesizer.SpeakAsync(output);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            string input="start";
            while (input!="exit" )
            {

                bot = new HotShotBot();
                Console.Write("You: ");
                input = Console.ReadLine();
                var output = bot.getOutput(input);

                //Console.WriteLine(input);
                Console.WriteLine("Bot: " + output);

                //Make the bot Speak
                SpeechSynthesizer synthesizer = new SpeechSynthesizer();
                synthesizer.Volume = 100;  // 0...100
                synthesizer.Rate = -2;     // -10...10

                // Synchronous
                synthesizer.Speak(output);

                // Asynchronous
                // synthesizer.SpeakAsync(output);

            }
        }