sanjeev18 Posted February 9, 2011 Posted February 9, 2011 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 StrTexthanks in advanced,
CoffeeFiend Posted February 9, 2011 Posted February 9, 2011 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now