Jump to content

Recommended Posts

Posted

hey guys i am using some techines for text to speech in vbscript . it is like this but i dont like voice of it ... Can i change voice of this..

StrText="Hello i want solution"

set ObjVoice=CreateObject("Sapi.SpVoice")

ObjVoice.Speak StrTex

thanks in advanced,


Posted

It's not hard to do, but the voices available change between versions of the OS (and languages installed too) so most of the time using the default voice is the best option. Otherwise you have to enumerate the voices are available (many are only available for a particular language) using the GetVoices method and then use one of those -- and usually there is only one, which is the default one anyway. And if you do that, then you better have pretty solid error handling too, because you will eventually run into problems (especially across different languages -- there may be zero voices for a particular LCID so you have to fallback to something else). And the default voice is usually the most advanced/recent as well so it's the one that already sounds best (i.e. Anna on Win 7 vs Mark, Mike and Sam), whereas the others may even be far older SAPI 4 voices. Also, no matter which voice you use, some words won't sound right so you'll have to make use of phonemes & SSML.

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
  • Recently Browsing   0 members

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