none
System.speech RRS feed

  • Question

  • Hi All,

    I am using system.speech on my code, The process not ends after speak the builder, website process not ends and shown the messages which written on the page

    Windows8 OS, Let me know where I did the mistake

    My code is :

     SpeechSynthesizer synth = new SpeechSynthesizer();
                PromptBuilder builder = new PromptBuilder();

                builder.StartSentence();
                builder.AppendText("This is a prompt building example.");
                builder.EndSentence();
                synth.SetOutputToWaveFile(@"e:\\test.wav", new SpeechAudioFormatInfo(32000, AudioBitsPerSample.Sixteen, AudioChannel.Mono));
                synth.Speak(builder);

    Friday, March 13, 2015 1:36 PM

Answers

  • Hello,

    >>Does it need any SDK installation for system.speech?

    The System.Speech is an assembley of .NET Framework, if you want to use it, you just need to make sure you install the .NET Framework.

    >> Voice is working fine, but the application not ends the process, its on under processing, if I evaluate system.speech

    It seems that the application is hung from your description, please check this blog to debug it:

    http://blogs.msdn.com/b/tess/archive/2006/10/16/net-hang-debugging-walkthrough.aspx

    >>And I can checked both system.speech and microsoft.speech, cannot able to set an object reference error on that

    Be confused about “cannot able to set an object reference error on that”, is it an exception? If so, please provide a detail information.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 19, 2015 10:14 AM
    Moderator

All replies

  • Hello Charulatha,

    Please have a try to set out to the default device as below to configure the audio output.:

    SpeechSynthesizer synth = new SpeechSynthesizer();
    
                    PromptBuilder builder = new PromptBuilder();
    
                    builder.StartSentence();
    
                    builder.AppendText("This is a prompt building example.");
    
                    builder.EndSentence();
    
                    synth.SetOutputToWaveFile(@"D:\BMX\Project\2015\CLRs\CLR3\bin\Debug\test.wav", new SpeechAudioFormatInfo(32000, AudioBitsPerSample.Sixteen, AudioChannel.Mono));
    
                    synth.SetOutputToDefaultAudioDevice();
    
                    synth.Speak(builder);
    

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 16, 2015 9:16 AM
    Moderator
  • Hi Fred,

    Thanks for your reply!

    I used by SetOutputToDefaultAudioDevice, its not working. Is it possible to use both system.speech synthesizer and microsoft.speech synthesizer in the same application

    Tuesday, March 17, 2015 1:02 PM
  • Hello Charulatha,

    >> I used by SetOutputToDefaultAudioDevice, its not working

    It is confused that it does not work on your side. Do you have a try to speak the builder directly as:

    SpeechSynthesizer synth = new SpeechSynthesizer();
    
    PromptBuilder builder = new PromptBuilder();
    
    builder.StartSentence();
    
    builder.AppendText("This is a prompt building example.");
    
    builder.EndSentence();
    
    synth.Speak(builder);
    

    Or

    SpeechSynthesizer synth = new SpeechSynthesizer();
    
    synth.Speak(“This is a prompt building example”);
    

    I am wondering if it is caused by the machine environment since it could work on my side.

    >> Is it possible to use both system.speech synthesizer and microsoft.speech synthesizer in the same application

    I am not very sure since I do have the Microsoft Speech Platform SKD, you could have a try if you have installed it.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, March 18, 2015 8:18 AM
    Moderator
  • Hi,

    Does it need any SDK installation for system.speech?

    Voice is working fine, but the application not ends the process, its on under processing, if I evaluate system.speech

    And I can checked both system.speech and microsoft.speech, cannot able to set an object reference error on that

    Let me know any suggestions please!

    Regards

    Charulatha Suryakumar

    Wednesday, March 18, 2015 10:02 AM
  • Hello,

    >>Does it need any SDK installation for system.speech?

    The System.Speech is an assembley of .NET Framework, if you want to use it, you just need to make sure you install the .NET Framework.

    >> Voice is working fine, but the application not ends the process, its on under processing, if I evaluate system.speech

    It seems that the application is hung from your description, please check this blog to debug it:

    http://blogs.msdn.com/b/tess/archive/2006/10/16/net-hang-debugging-walkthrough.aspx

    >>And I can checked both system.speech and microsoft.speech, cannot able to set an object reference error on that

    Be confused about “cannot able to set an object reference error on that”, is it an exception? If so, please provide a detail information.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 19, 2015 10:14 AM
    Moderator
  • Hi Fred,

    Its working if not configured in IIS. If i run via IIS, its not working am using II6.

    TTS engines are present in my system

    And additionally one more clarification, Is there a way to assign TTS engine voice in Microsoft.Speech selectVoice?

    Please let me know


    Friday, March 20, 2015 1:14 PM
  • Hello,

    >> Its working if not configured in IIS. If i run via IIS, its not working am using II6.

    It seems to be related with IIS configuration, you could confirm it on IIS forum to check if IIS 6 supports it:

    http://forums.iis.net/

    >>Is there a way to assign TTS engine voice in Microsoft.Speech selectVoice?

    The System.Speech api has the SelectVoice Method which could selects a specific voice by name, and for the Microsoft.Speech, it also provides a same named method: https://msdn.microsoft.com/en-us/library/microsoft.speech.synthesis.speechsynthesizer.selectvoice.aspx?f=255&MSPPError=-2147217396, I think you could use this method to assign TTS engine voice.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 24, 2015 6:25 AM
    Moderator
  • Hi Fred,

    Thanks for your supports

    I used application pool - local system for system speech synthesizer can run  via IIS.

    And yes same methods for synthesizer of both desktop and server engine Its working now!

    Monday, March 30, 2015 10:19 AM