Search code examples
c#speechspeech-synthesispost-processing

C# System.speech.synthesis post processing


Is there any way to apply post processing effects(change speed, pitch, volume) of the output from system.speech.synthesis in C#. To be more clear I am calling system.speech.synthesis.SpeechSynthisizer.Speak(String); and I want to edit the output. Thank you for your help.


Solution

  • you can change the volume and rate using the property Volume and Rate

            static void Main(string[] args)
            {
                SpeechSynthesizer synthesizer = new SpeechSynthesizer();
                synthesizer.Volume = 100;  // 0...100
                synthesizer.Rate = -2;     // -10...10
    
                // Synchronous
                synthesizer.Speak("Hello World");
    
                // Asynchronous
                synthesizer.SpeakAsync("Hello World");
            }