Sign in to follow this  
Followers 0
Him

problem with text to speech

9 posts in this topic

#1 ·  Posted (edited)

I found this script in this forum but $oSp.LanguageID = DEC(0409) don't work.

The full script is:

$Text = InputBox("Text", "Type text to say", "")

$oSp = ObjCreate("SAPI.SpVoice")

$oSp.LanguageID = DEC(0409) ;hex 0409 is english...

$oSp.Speak($Text)

I get the message:

the requested action with that object has failed

but it works when:

$Text = InputBox("Text", "Type text to say", "")

$oSp = ObjCreate("SAPI.SpVoice")

$oSp.Speak($Text)

Anybody can help? I want to use $oSp.LanguageID = DEC(408) ;hex 408 is greek...

Edited by HereticSeal

[size="1"][font="Tahoma"]On the internet, nobody knows you're a dog.[/font][/size]

Share this post


Link to post
Share on other sites



help anyone?

[size="1"][font="Tahoma"]On the internet, nobody knows you're a dog.[/font][/size]

Share this post


Link to post
Share on other sites

Try this:

$oSp.LanguageID = 0x0409 ;hex 0409 is english...

not tested, only idea.

Unfortunately it doesn't work too

[size="1"][font="Tahoma"]On the internet, nobody knows you're a dog.[/font][/size]

Share this post


Link to post
Share on other sites

Dec(0x0409)oÝ÷ Ù­º¹ìã{­«az»aj}tßwè®Ø^zx%Èejx.jºÚ"µÍÙÐÞ
    ÌÎNÉÌÎNËXÊ
JJ


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Dec(0x0409)oÝ÷ Ù­º¹ìã{­«az»aj}tßwè®Ø^zx%Èejx.jºÚ"µÍÙÐÞ
    ÌÎNÉÌÎNËXÊ
JJ
Well, it doesn't work either.

I think that something's wrong with the command:

$oSp.LanguageID = Dec(0x0409)

Any ideas?


[size="1"][font="Tahoma"]On the internet, nobody knows you're a dog.[/font][/size]

Share this post


Link to post
Share on other sites

You use Dec for strings like Dec("0x0409")

Just use LanguageID = 1033.

Share this post


Link to post
Share on other sites

What is the link to MSDN to find info about SAPI engine?

Can anyone tell me how to change the language?

It doesn't work. Try it yourself to get an idea.

Without that 'languageID' part the script runs exellent.

On the other hand, with that 'languageID' part working, it would be better...

Happy xmas...


[size="1"][font="Tahoma"]On the internet, nobody knows you're a dog.[/font][/size]

Share this post


Link to post
Share on other sites

Well, it doesn't work either.

I think that something's wrong with the command:

$oSp.LanguageID = Dec(0x0409)

Any ideas?

I didn't say it would work, I was pointing that out to Zedna, in fact, I said it was wrong.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0