Self-voicing on windows 10. Changing the voice gender?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
crackshot91
- Newbie
- Posts: 4
- Joined: Sun Aug 07, 2011 1:31 am
- Contact:
Self-voicing on windows 10. Changing the voice gender?
Many games developed using Ren'Py have a self-voicing feature (Press V and you'll hear it), but I can't seem to be able to make the games use the female voice (Microsoft Zira). No matter what setting I choose in the voice settings control panel, the games use Microsoft David's voice. How do I get Ren'Py games to use a different voice?
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
I don't know. To play voice on window, we use the wscript program to run lib/windows-i686/say.vbs . You can look at that to see what's going on, but I think it's supposed to use the default voice.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
-
crackshot91
- Newbie
- Posts: 4
- Joined: Sun Aug 07, 2011 1:31 am
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
Unfortunately I am a strict novice, so I'm not sure how to go about investigating this. By "default voice", I'm assuming you mean Microsoft David? Is there a way to make Zira the default voice? Could I maybe uninstall Microsoft David's voice?
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
I'm pretty much just a much a novice when it comes to Windows 10's SAPI support. I have no idea.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
- DragoonHP
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
So I tried my hand at it.
Change say.vbs to
Not the best way but it should work. This script basically checks if the required voice pack is installed on the system. If yes, it uses that voice, otherwise it uses the default voice.
And for this to work, change the last line in default_tts_function to
Or maybe it would be better to create a config variable for sapi voice. I dunno.
Change say.vbs to
Code: Select all
Text = WScript.Arguments(0)
Speaker = WScript.Arguments(1)
Set s = CreateObject("SAPI.SpVoice")
For Each Voice In s.GetVoices
I = I + 1
If InStr(Voice.GetDescription, Speaker) > 0 Then
Set s.Voice = s.GetVoices.Item(I-1)
Exit For
End If
Next
s.Speak Text
And for this to work, change the last line in default_tts_function to
Code: Select all
process = subprocess.Popen([ "wscript", renpy.exports.fsencode(say_vbs), renpy.exports.fsencode(s), renpy.exports.fsencode("Zira") ])
-
crackshot91
- Newbie
- Posts: 4
- Joined: Sun Aug 07, 2011 1:31 am
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
You guys are gonna think I'm stupid, but I'm not actually developing a game myself. I'm just trying to get a couple Ren'Py games to use a different voice. Particularly Starlight Vega. I posted this question in the Starlight Vega forum, but I've yet to receive a response.
So, I edited the say.vbs file to reflect what you suggested, DragoonHP, but I'm unclear about what you mean by "changing the last line in default_tts_function". Is this a user-configurable thing, or does the dev need to do this? Sorry for the embarrassingly nooby questions. I'm just a dumb end user looking for a solution.
So, I edited the say.vbs file to reflect what you suggested, DragoonHP, but I'm unclear about what you mean by "changing the last line in default_tts_function". Is this a user-configurable thing, or does the dev need to do this? Sorry for the embarrassingly nooby questions. I'm just a dumb end user looking for a solution.
- DragoonHP
- Miko-Class Veteran
- Posts: 758
- Joined: Tue Jun 22, 2010 12:54 am
- Completed: Christmas
- IRC Nick: DragoonHP
- Location: Zion Island, Solario
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
It will be a better if the devs change it. But in your case, you can just change the second line to
Speaker = "Zira"
directly. (Instead of Zira, you can use other names like Hazel, David, Sam etc)
Speaker = "Zira"
directly. (Instead of Zira, you can use other names like Hazel, David, Sam etc)
-
crackshot91
- Newbie
- Posts: 4
- Joined: Sun Aug 07, 2011 1:31 am
- Contact:
Re: Self-voicing on windows 10. Changing the voice gender?
Ahh! It worked!!! You rock. 
Re: Self-voicing on windows 10. Changing the voice gender?
Sorry to necropost but i'm having the same problem.
While the block code about say.vbs seems to be already set in renpy 7.3.5.606, the other line in the default_tts_function wasn't. So i did what it says, but it causes renpy to not start at all (not just the game, the whole renpy launcher as well) without logging anything. putting back the original line fixes it but well, back to start then.
Does anyone find an idea on how to fix it?
While the block code about say.vbs seems to be already set in renpy 7.3.5.606, the other line in the default_tts_function wasn't. So i did what it says, but it causes renpy to not start at all (not just the game, the whole renpy launcher as well) without logging anything. putting back the original line fixes it but well, back to start then.
Does anyone find an idea on how to fix it?
Who is online
Users browsing this forum: No registered users
