System.Speech.Synthesis - Volume not being set at real time


  • Hi ,

    I'm using the SpeechSynthesizer class for reading out text.
    I have a slider control for changing the volume . On Slider's ValueChanged event , i'm setting the Volume property of the Speech Synthesizer (This is while the Synthesizer is speaking out the text), but there is no effect in real time. And takes effect only when i run it the next time .

    System.Speech.Synthesis.SpeechSynthesizer sp = new System.Speech.Synthesis.SpeechSynthesizer();

    void SliderVolume_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)


    speech.Volume = Convert.ToInt16(e.NewValue);


    Please help me resolve this .


    • 편집됨 Abhilasha 2008년 7월 8일 화요일 오전 9:49 Needed to mention the changes are not happening in real time
    • 이동됨 jack 321 2008년 7월 10일 목요일 오전 9:31 Off topic for C# language
    2008년 7월 8일 화요일 오전 9:31

모든 응답

  • I am haveing the same issue in .net 4.0.  In wpf, I even tried to pause, set volume to new valuse and then resume the speech, with no effect.

    Any Ideas?

    2011년 6월 29일 수요일 오후 11:43
  • Try using:

    sp.SpeakAsync("Marry had a little lamb");

    The "Async" allows stop, pause, and volume changes....

    2012년 6월 17일 일요일 오전 1:34