Ren'Py's Self-Voicing option and regional letters

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
mrreynevan2
Newbie
Posts: 4
Joined: Thu May 26, 2016 3:41 pm
Contact:

Ren'Py's Self-Voicing option and regional letters

#1 Post by mrreynevan2 » Thu May 26, 2016 3:49 pm

Hey there guys!

In short, I'm working on a simple game for a single person. They're blind, so I'm relying on the self-voicing funtion of Ren'Py engline.
There's a small problem though. I'd like to stick with Polish as the game language, since they aren't good with English, but Ren'Py's SV function doesn't support characters like Ą, Ć, Ę and so on.
I assume it's because of the fact that the text is being read directly from some kind of database/storage and there are some encoding issues but I'm not sure and don't have any idea where to look for it.

Has anyone encountered this issue before? Is there any way to fix it?

User avatar
Kaen
Regular
Posts: 148
Joined: Tue Oct 16, 2012 10:49 pm
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#2 Post by Kaen » Fri May 27, 2016 4:42 pm

Hiya,

According to the docs: "Ren'Py relies on the operating system to provide speech synthesis services. To adjust the speed of speech synthesis and the voice used, adjust your platform's speech settings."

So check if your OS speech synthesis service supports your needs ^^

User avatar
uyjulian
Regular
Posts: 114
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#3 Post by uyjulian » Sat May 28, 2016 1:23 am

If you are on OSX, make sure you select the correct voice that support your language.
If you are Linux, espeak is used, however Ren'Py does not specify any settings for you.

I think espeak should be included with renpy so we have consistent TTS across all platforms, however espeak is licensed under GPLv3 and not LGPL.

mrreynevan2
Newbie
Posts: 4
Joined: Thu May 26, 2016 3:41 pm
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#4 Post by mrreynevan2 » Mon May 30, 2016 4:39 pm

Nah, I'm on Windows.

I've also checked the TTS settings and everything seems fine, not to mention that all other apps work just fine with the same voice.

Maybe I wasn't clear enough. Here are two examples of how the text sounds in Ren'Py & how it should sound:

This is how it's supposed to sound
This is how Ren'Py processes it

Basically, all non-standard alphabet characters (all national letters if I'm not mistaken) are read as their standard counterparts,so:
ą becomes a
ł becomes l
ż becomes z
ę becomes e

...and so on.

If I'm not mistaken this happens to all languages other than English. Is there any fix for this?

mrreynevan2
Newbie
Posts: 4
Joined: Thu May 26, 2016 3:41 pm
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#5 Post by mrreynevan2 » Fri Jun 03, 2016 12:12 pm

Well, shit.

It doesn't seem like it can be easily fixed, or at least I can't find anything.
Seems like I'll have to switch to other engines then.

Does anyone know if Unity3D has easily-implementable TTS module? I assume you can't just import the standard System.Speech dll package and expect it to work correctly, since it's Mono and all that multiplatform stuff...

User avatar
uyjulian
Regular
Posts: 114
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#6 Post by uyjulian » Fri Jun 03, 2016 8:55 pm

mrreynevan2 wrote:Well, shit.

It doesn't seem like it can be easily fixed, or at least I can't find anything.
Seems like I'll have to switch to other engines then.

Does anyone know if Unity3D has easily-implementable TTS module? I assume you can't just import the standard System.Speech dll package and expect it to work correctly, since it's Mono and all that multiplatform stuff...
Look in renpy/display/tts.py in your renpy sdk or game, it contains the code that allows TTS to work in a platform-specific way. Feel free to modify it.
You might want to modify say.vbs to use your prefered voice (however, that will only be in effect on Win32-based systems)

mrreynevan2
Newbie
Posts: 4
Joined: Thu May 26, 2016 3:41 pm
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#7 Post by mrreynevan2 » Sat Jun 04, 2016 8:35 am

uyjulian wrote:
mrreynevan2 wrote:Well, shit.

It doesn't seem like it can be easily fixed, or at least I can't find anything.
Seems like I'll have to switch to other engines then.

Does anyone know if Unity3D has easily-implementable TTS module? I assume you can't just import the standard System.Speech dll package and expect it to work correctly, since it's Mono and all that multiplatform stuff...
Look in renpy/display/tts.py in your renpy sdk or game, it contains the code that allows TTS to work in a platform-specific way. Feel free to modify it.
You might want to modify say.vbs to use your prefered voice (however, that will only be in effect on Win32-based systems)
... .. ... .. nope.

That's not a problem, it doesn't matter what voice is selected, it's NOT caused by the voice...

As I've said like 2 or 3 times, it seems like there's some problem with encoding or other such crap, since ALL language-specific additional letters (like ąźżęć for Polish, üöäß for deustch, æøå for Norwegian and sooo on) are mispronounced by the renpy reader. And NO, IT'S NOT DUE TO THE OS SETTINGS.

I took a lot at the tts.py file, and sure enough, with my rather limited knowledge of python I managed to find some encoding settings. The thing is, it's set to UTF8, which to my knowledge DOES support random national characters.

So, two possible conclusions:
Either there's some other .py file that interferes with the speech patterns, or I'm just unable to find the right definition in the tts.py.

Edit: One more possibility: maybe, if and after the string is correctly extracted from the game (whether by UI, or from file, that doesn't really matter in this particular scenario) it's somehow reconverted and wrongly encoded while executing the say VBScript.

User avatar
uyjulian
Regular
Posts: 114
Joined: Sun Mar 08, 2015 1:40 pm
Github: uyjulian
Contact:

Re: Ren'Py's Self-Voicing option and regional letters

#8 Post by uyjulian » Sat Jun 04, 2016 11:13 am

mrreynevan2 wrote:
uyjulian wrote:
mrreynevan2 wrote:Well, shit.

It doesn't seem like it can be easily fixed, or at least I can't find anything.
Seems like I'll have to switch to other engines then.

Does anyone know if Unity3D has easily-implementable TTS module? I assume you can't just import the standard System.Speech dll package and expect it to work correctly, since it's Mono and all that multiplatform stuff...
Look in renpy/display/tts.py in your renpy sdk or game, it contains the code that allows TTS to work in a platform-specific way. Feel free to modify it.
You might want to modify say.vbs to use your prefered voice (however, that will only be in effect on Win32-based systems)
... .. ... .. nope.

That's not a problem, it doesn't matter what voice is selected, it's NOT caused by the voice...

As I've said like 2 or 3 times, it seems like there's some problem with encoding or other such crap, since ALL language-specific additional letters (like ąźżęć for Polish, üöäß for deustch, æøå for Norwegian and sooo on) are mispronounced by the renpy reader. And NO, IT'S NOT DUE TO THE OS SETTINGS.

I took a lot at the tts.py file, and sure enough, with my rather limited knowledge of python I managed to find some encoding settings. The thing is, it's set to UTF8, which to my knowledge DOES support random national characters.

So, two possible conclusions:
Either there's some other .py file that interferes with the speech patterns, or I'm just unable to find the right definition in the tts.py.

Edit: One more possibility: maybe, if and after the string is correctly extracted from the game (whether by UI, or from file, that doesn't really matter in this particular scenario) it's somehow reconverted and wrongly encoded while executing the say VBScript.
I think your non-unicode language is set incorrectly, causing the characters not in the currently-set non-unicode language to be dropped whenever it's converted from UTF8 to your native encoding whenever it's passed from the say.vbs script to SAPI.

Try fixing your non-unicode language.

Post Reply

Who is online

Users browsing this forum: Google [Bot]