Page 1 of 1

Preventing Self-Voicing from Activating

Posted: Sun Oct 22, 2017 8:19 pm
by Silence in Space
I have found that the self-voicing feature that is included with the keybindings to be annoying. Sure, I can simply remove it from the Help section on the Main Menu; however, this does not prevent the user from hitting "V" on the keyboard and activating it accidentally. I want to know how to prevent it from activating. I do not mind if the dialogue prompt appears in the upper left hand corner. I simply want the self-voicing feature to not work or be completely muted.

I have been reading that it is apparently dependent upon the operating system instead of the Ren'Py engine. This means that there is something in Ren'Py that asks the operating for this synthesized voice. I have done the following in option.rpy:

Code: Select all

define config.has_voice = False
The self-voicing completely destroys the atmosphere and mood of the game that I am creating and therefore must be removed entirely; however, there is nothing that I can find in screen.rpy, option.rpy, and gui.rpy that dictates self-voicing. Can I just have "V" as an empty keybinding (i.e. part of the keyboard configuration but does not have any real function or effect)?

I can easily hide the fact that "V" does anything it is simply my fear that the user will accidentally discover this for him or herself.

If this is not possible without tearing apart the Ren'Py engine, is there a way that I can change the default self-voicing voice synthesizer to something very distorted?

Re: Preventing Self-Voicing from Activating

Posted: Sun Oct 22, 2017 8:39 pm
by Imperf3kt
Take a look in 00common.rpy in your ren'py install folder and you can copy the self voicing code from there, into your project (screens.rpy is appropriate) and then edit it to disallow self voicing.

Disclaimer:
I may have the wrong file, going by memory. It is definitely in one of the 00*.rpy files though.

Re: Preventing Self-Voicing from Activating

Posted: Sun Oct 22, 2017 8:49 pm
by Remix

Code: Select all

define preferences.self_voicing = False
init python:
    del config.keymap['self_voicing']
untested

Re: Preventing Self-Voicing from Activating

Posted: Mon Oct 23, 2017 7:11 pm
by Silence in Space
Remix wrote: Sun Oct 22, 2017 8:49 pm

Code: Select all

define preferences.self_voicing = False
init python:
    del config.keymap['self_voicing']
untested
I get the following error message:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/options.rpy", line 97, in script
    define preferences.self_voicing = False
  File "renpy/common/000namespaces.rpy", line 26, in set
    raise Exception("The define statement can not be used with the preferences namespace.")
Exception: The define statement can not be used with the preferences namespace.
I don't think I've seen the error message stated in this format before. That's interesting. I recognize namespace from C++ from my classes in college but that is simply it. I am not sure if namespace is used differently in Python (or Ren'Py).

Re: Preventing Self-Voicing from Activating

Posted: Mon Oct 23, 2017 7:16 pm
by Silence in Space
Imperf3kt wrote: Sun Oct 22, 2017 8:39 pm Take a look in 00common.rpy in your ren'py install folder and you can copy the self voicing code from there, into your project (screens.rpy is appropriate) and then edit it to disallow self voicing.

Disclaimer:
I may have the wrong file, going by memory. It is definitely in one of the 00*.rpy files though.
There is no 00common.rpy file present in the game's folder. It may be helpful to mention that I am making this game on the Mac (i.e. an Apple computer) using the New GUI (not the Legacy).

Re: Preventing Self-Voicing from Activating

Posted: Mon Oct 23, 2017 7:17 pm
by Remix
Oops..
Preference variables store the values of Ren'Py preferences. While the value of a preference should be set at runtime using the Preference() action, preference variables should be used in conjuction with the default statement to set the default value of a preference.

For example:

default preferences.text_cps = 142
So, ummm

default preferences.self_voicing = False

Re: Preventing Self-Voicing from Activating

Posted: Mon Oct 23, 2017 10:09 pm
by Imperf3kt
Silence in Space wrote: Mon Oct 23, 2017 7:16 pm
Imperf3kt wrote: Sun Oct 22, 2017 8:39 pm Take a look in 00common.rpy in your ren'py install folder and you can copy the self voicing code from there, into your project (screens.rpy is appropriate) and then edit it to disallow self voicing.

Disclaimer:
I may have the wrong file, going by memory. It is definitely in one of the 00*.rpy files though.
There is no 00common.rpy file present in the game's folder. It may be helpful to mention that I am making this game on the Mac (i.e. an Apple computer) using the New GUI (not the Legacy).
Of course not, all 00 prefixed files are found in renpy install folder.
I don't know how it works on a mac, but on Windows that would be C:\program files(x86)\renpy

Re: Preventing Self-Voicing from Activating

Posted: Mon Oct 23, 2017 11:09 pm
by Divona

Code: Select all

init python:
    config.keymap['self_voicing'].remove('v')
    config.keymap['self_voicing'].remove('V')

Re: Preventing Self-Voicing from Activating

Posted: Tue Oct 24, 2017 5:19 am
by edgebug
Why do you want to make your game inaccessible to blind folks, though...? O_o

I mean, I get that to a sighted person, the self-voicing might change the atmosphere, but consider: it's easy to just hit V again to turn it off if they accidentally turn it on, and also, without the voicing, a person with limited or no vision won't be able to get any atmosphere from the game at all.

IDK, I just think you should maybe rethink making the game deliberately inaccessible to an entire demographic of disabled folks. :D

Re: Preventing Self-Voicing from Activating

Posted: Tue Oct 24, 2017 1:15 pm
by Silence in Space
edgebug wrote: Tue Oct 24, 2017 5:19 am Why do you want to make your game inaccessible to blind folks, though...? O_o

I mean, I get that to a sighted person, the self-voicing might change the atmosphere, but consider: it's easy to just hit V again to turn it off if they accidentally turn it on, and also, without the voicing, a person with limited or no vision won't be able to get any atmosphere from the game at all.

IDK, I just think you should maybe rethink making the game deliberately inaccessible to an entire demographic of disabled folks. :D
I have already released this and therefore am leaving the self-voicing implemented into the game and let the computer generate it (although something within the game's dialogues may cause the text-to-speech AI mispronounce some fictitious words). Sure, I can do the voice acting myself but the point of the game is to immerse yourself as the main character (whose gender is purposely made ambiguous).

I am simply curious if there is a way to actually properly disable self-voicing since it seems like a forced implementation in the engine that cannot be turned off by simply setting a value to true. If I read other forums correctly, apparently self-voicing was only "recently" added to Ren'Py.

I am not trying to bar people who are unable to see or have difficulty seeing from being able to enjoy the game. I am simply wanting to implement a self-voicing of my own selection and not the garbage synthetic voices found on current computers (for English at least).

Re: Preventing Self-Voicing from Activating

Posted: Fri Nov 03, 2017 8:27 pm
by PyTom
Self-voicing is an accessibility thing. Because I want it to be turned on by people who can't see, I had to bind it to as simple a key as possible. That makes it difficult to turn off, since it's fairly deeply integrated.

If you want to do your own voicing, you can - self-voicing won't occur when a voice is playing on the voice channel.

Re: Preventing Self-Voicing from Activating

Posted: Sat Nov 04, 2017 5:52 am
by Imperf3kt
PyTom wrote: Fri Nov 03, 2017 8:27 pm Self-voicing is an accessibility thing. Because I want it to be turned on by people who can't see, I had to bind it to as simple a key as possible. That makes it difficult to turn off, since it's fairly deeply integrated.

If you want to do your own voicing, you can - self-voicing won't occur when a voice is playing on the voice channel.
So if someone used a silent voice file, you could override it?

Re: Preventing Self-Voicing from Activating

Posted: Wed Mar 03, 2021 3:57 pm
by sonejo
This worked for me:

Code: Select all

define config.keymap['self_voicing'] = []
define config.keymap['clipboard_voicing'] = []

Re: Preventing Self-Voicing from Activating

Posted: Fri Apr 30, 2021 11:28 am
by JenivereDomino
This topic is old, but a blind friend of mine wanted me to pass on this comment regarding the assisted voicing feature, as he came across this topic when looking into how well the feature would work for him playing VN games:

"Here is the thing. The "garbage" voice they speak of? That *could be* one of the voices that blind people use on their PCs every day. It is a speech synthesizer, and it is something that people in the blind community are used to. The thing that makes a character ambiguous, or designed to be "you" as the main character, the synthesizer fulfills that because to a blind person, a speech synth is a "voice", not a "character". It's a narrator by default. Hearing a "voice" does not mean hearing a "character". The voice *is* how blind people use their computers. We actually have several voices at our disposal."

I hope this helps anyone else who is having trouble deciding about whether to try and disable self-voicing. Even with pronouncing fictitious words and names, there's no guarantee that a reader will be pronouncing them correctly in their mind anyway as they read, but if you're particularly concerned you could probably use square brackets with a condition that would change the spelling to something phonetic that the AI would pronounce as you intend it to when the self-voicing option is turned on.

Re: Preventing Self-Voicing from Activating

Posted: Fri Aug 11, 2023 4:25 pm
by papillon
Unfortunately there's now a new reason to attempt to disable self-voicing: Steam is apparently marking games as "Unsupported" on Deck if they contain self-voicing.

EDIT: Okay, they agreed with me that it seemed silly to mark the game as totally unplayable because an optional accessibility feature doesn't work. Phew!