none
Speach Synthesis producing different behavior on different version of windows. Text to speech built in. RRS feed

  • Question

  • I've wrote a few programs in visual C#, and all 3 use the Speech.Synthesis library. and all have the basic same function.  I was installing the programs on my Daughter's computer yesterday, and testing them to make sure everything was okay.  When I ran my Multiplycation program, when it got to the part of saying the multiplicand times the multiplier it put the "(" in the speech.  On all the other machines, and windows it skips over the "(" and just says "times".  Below is the function:

     private void Sayproblems()
            {
                SpeechSynthesizer synth = new SpeechSynthesizer();
                synth.SetOutputToDefaultAudioDevice();
                Prompt myproblem = new Prompt(Convert.ToString(multiplicand + "(Times)" + multiplier));
                synth.SpeakAsync(myproblem);
            }

    With out the "(" ")" it will just spell out the "T I M E S", so they have to be there.  I guess it's something to do with the version of the text to speech built in to the windows. 

    Any idea whats going on here?

    Thanks in advance,

    Slow Joe




    • Edited by Slow Joe Tuesday, March 1, 2016 7:08 PM
    Monday, February 29, 2016 6:12 PM

Answers

  • Kristin, I finely got around to testing the other 2 computer OS's. The way I'd coded it for XP did not work, the Windows 10, and the Vista machine started pronouncing the "parentheses", so I did some more fiddeling around.  I finally got both of them to say "Times", instead of  "T I M E S" by assigning the text property of the invisible Textbox to "(Times)", and then it worked.

    Here is the edited function:

    private void Sayproblems()
            {
                SpeechSynthesizer synth = new SpeechSynthesizer();
                synth.SetOutputToDefaultAudioDevice();
                Prompt myproblem = new Prompt(Convert.ToString(multiplicand + (tbTimes.Text) + multplier));
                synth.SpeakAsync(myproblem);
            }

    This function works on XP, with the Text property just having the text value set to "Times" without the quotes, as opposed to "(Times)" with the quotes.

    Thanks for you interest, Still don't know what I've learned, but at least it works on all three OS's now.

    Slow Joe (Dave)



    • Edited by Slow Joe Wednesday, March 2, 2016 4:58 PM
    • Proposed as answer by Kristin Xie Friday, March 4, 2016 7:35 AM
    • Marked as answer by Slow Joe Friday, March 4, 2016 8:23 AM
    Wednesday, March 2, 2016 4:58 PM

All replies

  • Well I found a work around for the above problem.  I just made a invisible Textbox and set the value to "times" and used it in the expression.  Works fine on that machine.  Still don't know why only that Windows XP machine read it different than, windows vista, windows 10 and so on..

    If anyone has a clue,  please feel free to let me know

    Slow Joe



    • Edited by Slow Joe Tuesday, March 1, 2016 12:37 AM
    Tuesday, March 1, 2016 12:37 AM
  • Hi Slow,

    >>Still don't know why only that Windows XP machine read it different than, windows vista, windows 10 and so on..

    Do you mean only windows XP is different with vista, win10 about text to Speech?

    If yes, I wonder there is some compatible issue in windows XP. As far as I know, MapPoint supports TTS and includes a speech engine that is compatible with the Windows XP and Windows Vista operating systems. And Windows XP comes with Speech API 5.1, the default is the only support English.

    You can try and make a test as following

    To determine whether TTS is working properly in Windows Vista or Windows XP:    
    1. In Control Panel, open Text to Speech (if you use Windows Vista) or Speech (if you use Windows XP).

    2. Click Preview Voice.

    Best regards,

    Kristin


    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 1, 2016 8:23 AM
  • Kristin, thanks for the reply. 

    I did that yesterday when I was still trying to figure out why that machine (XP) spoke it different than the others.  I went to Control Panel and brought up the Text To Speech, and typed in my own text, I even typed in "(times)" with the parentheses but it did not say "left parentheses Times right parentheses"  Weird! 

    In both Windows 10, and Vista the above function works fine, and it speaks Example ( 8 times 11) etc, but on XP it says "8 left parentheses Times 11 right parentheses".  Using the invisible textbox fixed it, but I've been busy on other things, and have not compiled it to test on Win 10, or Vista, I'll get back when I get that done..

    Again Thanks for your reply,

    Slow Joe (Dave)



    • Edited by Slow Joe Tuesday, March 1, 2016 7:18 PM
    Tuesday, March 1, 2016 7:18 PM
  • @Slow Joe (Dave)

    Thanks for your testing, I am waiting for your results.


    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 2, 2016 7:43 AM
  • Kristin, I finely got around to testing the other 2 computer OS's. The way I'd coded it for XP did not work, the Windows 10, and the Vista machine started pronouncing the "parentheses", so I did some more fiddeling around.  I finally got both of them to say "Times", instead of  "T I M E S" by assigning the text property of the invisible Textbox to "(Times)", and then it worked.

    Here is the edited function:

    private void Sayproblems()
            {
                SpeechSynthesizer synth = new SpeechSynthesizer();
                synth.SetOutputToDefaultAudioDevice();
                Prompt myproblem = new Prompt(Convert.ToString(multiplicand + (tbTimes.Text) + multplier));
                synth.SpeakAsync(myproblem);
            }

    This function works on XP, with the Text property just having the text value set to "Times" without the quotes, as opposed to "(Times)" with the quotes.

    Thanks for you interest, Still don't know what I've learned, but at least it works on all three OS's now.

    Slow Joe (Dave)



    • Edited by Slow Joe Wednesday, March 2, 2016 4:58 PM
    • Proposed as answer by Kristin Xie Friday, March 4, 2016 7:35 AM
    • Marked as answer by Slow Joe Friday, March 4, 2016 8:23 AM
    Wednesday, March 2, 2016 4:58 PM
  • Hi Slow Joe,

    Glad to hear you've worked it out and thanks for sharing your solution here. It could be helpful for  someone who has the same issue.

    By the way, please remember to help close this thread by marking helpful reply as an answer.

    Best regards,

    Kristin


    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.

    Friday, March 4, 2016 7:37 AM
  • Kristin, thanks for all the input. Just also wanted to let you know I tried to participate in your above link "Click HERE to participate the survey." , but said that page didn't exist.

    Just wanted to let you know.

    Slow Joe, Dave



    • Edited by Slow Joe Friday, March 4, 2016 10:31 PM
    Friday, March 4, 2016 10:31 PM