orca --setup, tab "Voice": Language setting not saved
Bug #1849461 reported by
Bastiaan Stougie
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
orca (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
$ lsb_release -rd
Description: Ubuntu 19.10
Release: 19.10
$ apt-cache policy orca
orca:
Installed: 3.34.0-1ubuntu3
Candidate: 3.34.0-1ubuntu3
Version table:
*** 3.34.0-1ubuntu3 500
500 http://
500 http://
100 /var/lib/
$ orca --setup
In the "Voice" tab, if I change only the Language setting from default value "en" to for example "nl" and press "OK", the voice does not change and when I run orca --setup again, the language setting is back to the original value "en".
To post a comment you must log in.
I traced this to a problem in "/usr/lib/ python3/ dist-packages/ orca/backends/ gsettings_ backend. py". It does not store the Language setting unless also one of "Rate", "Pitch", or "Volume" in the "Voice" tab are changed.
I changed the code in settings_manager.py to use the json backend, and examined the resulting json configuration file:
"profiles": {
"speechSer verFactory" : "orca.speechdis patcherfactory" ,
"speechSer verInfo" : [
"Default Synthesizer",
"default"
"voices" : {
"default" : {
" established" : false,
" family" : {
"name" : "Dutch",
"lang" : "nl",
"dialect" : "",
"variant" : "none"
}
"default": {
],
So json_backend.py can independently store or retrieve the modified Language setting under "family", while "established" is false (meaning none of "Rate", "Pitch", and "Volume" settings have been modified).
gsettings_ backend. py should also independently store and retrieve the Language setting if none of "Rate", "Pitch", and "Volume" settings have been modified. I changed the code as follows to do so:
$ diff orca-patched/ orca/backends/ gsettings_ backend. py /usr/lib/ python3/ dist-packages/ orca/backends/ gsettings_ backend. py amily.get_ boolean( 'family- set') == True: __contains_ _('established' ): pop('establishe d') get_user_ value(setting) is not None: get_double( setting) debug.LEVEL_ FINEST, 'INFO: GSettings backend: Getting voice setting for voice %s with name %s = %s' % (voice, setting, gSettingsVal)) setting] = gSettingsVal __contains_ _('established' ): pop('establishe d') get_user_ value(setting) is not None: get_double( setting) debug.LEVEL_ FINEST, 'INFO: GSettings backend: Getting voice setting for voice %s with name %s = %s' % (voice, setting, gSettingsVal)) setting] = gSettingsVal voice]. __contains_ _('family' ): tings.set_ string( setting, voiceSettings[ voice][ 'family' ].get(setting) ) tings.set_ boolean( 'family- set', True)
468,476c468,475
< if voiceEstablished == True or voiceGSettingsF
< if voiceEstablished == True:
< if appSpecific == False and voiceSetting.
< voiceSetting.
< for setting in ['average-pitch', 'gain', 'rate']:
< if voiceGSettings.
< gSettingsVal = voiceGSettings.
< debug.println(
< voiceSetting[
---
> if voiceEstablished == True:
> if appSpecific == False and voiceSetting.
> voiceSetting.
> for setting in ['average-pitch', 'gain', 'rate']:
> if voiceGSettings.
> gSettingsVal = voiceGSettings.
> debug.println(
> voiceSetting[
619,622c618,621
< if voiceSettings[
< for setting in ['name', 'locale', 'dialect']:
< voiceFamilyGSet
< voiceFamilyGSet
---
> i...