1. 程式人生 > >C# 自然語言處理1-識別文字到語音

C# 自然語言處理1-識別文字到語音

1. 引入System.Speech.dll2. 實現:

 static void Main(string[] args)
        {
            SpeechSynthesizer synthesizer = new SpeechSynthesizer();
            synthesizer.Volume = 100;  // 0...100
            synthesizer.Rate = -3;     // -10...10

            // Synchronous
            synthesizer.Speak("Hello , Microsoft");

            // Asynchronous
            //synthesizer.SpeakAsync("Hello World");


            Console.ReadLine();
        }