Jump to content

Use AutoIT to change Windows default speech voice?


 Share

Recommended Posts

Hello all,

I have a SAPI 5 speech engine (Neo Speech) that has a software bug.

I start my home automation software (HomeSeer) and Neo Speech works fine.

Inside of HomeSeer is a plugin that needs to also use that Neo Speech voice.

If I toggle the voice under the Windows Control Panel, like from VW Kate 16k to MS Sam and then back to VW Kate 16k, everything works fine.

HomeSeer can trigger scripts, including Auto IT scripts.

Does anyone know how I can toggle the Windows default voice using AutoIT?

The voice names are:

VW Kate 8k

VW Kate 16k

Microsoft Mike

Thanks in advance,

Regards, Bill

Link to comment
Share on other sites

Hello Bill,

I haven't tested this, but I believe you could have a script update the following registry key: HKCU\SOFTWARE\Microsoft\Speech\Voices\DefaultTokenId

To set LH Michael, set the value to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\LHMICHAEL

To set LH Michelle, set the value to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\LHMICHELLE

I don't know what the others would be, but you could open RegEdit or RegMon to determine their values.

Hope this helps.

Zach...

Edited by zfisherdrums
Link to comment
Share on other sites

I'm sorry to hear that. If you're okay with it, may I see the script you are testing with?

Perhaps we can assist you further. I'll understand if you do not wish to share it/drop it.

Zach...

Link to comment
Share on other sites

  • 2 years later...

This should do the trick:

_TalkOBJ("Hello world.")

Func _TalkOBJ($s_text)
    Local $o_speech
    $o_speech = ObjCreate("SAPI.SpVoice")
    $o_speech.Voice = $o_speech.GetVoices("name=Microsoft Mike").Item(0) ;Change name here
    $o_speech.Speak ($s_text)
    $o_speech = ""
EndFunc

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Link to comment
Share on other sites

This thread is epic! :)

I mean, what's the chance that the two users from a three year old thread have only a three hour difference on the "Last Active" time when they finally receive their answer? Nice move Lurch :(

Last Active:

Mar 30 2010 06:16 PM

Last Active:

Mar 30 2010 03:05 PM

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...