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": {
"default": {
"speechServerFactory": "orca.speechdispatcherfactory",
"speechServerInfo": [
"Default Synthesizer",
"default"
],
"voices": {
"default": {
"established": false,
"family": {
"name": "Dutch",
"lang": "nl",
"dialect": "",
"variant": "none"
}
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
468,476c468,475
< if voiceEstablished == True or
voiceGSettingsFamily.get_boolean('family-set') == True:
< if voiceEstablished == True:
< if appSpecific == False and
voiceSetting.__contains__('established'):
< voiceSetting.pop('established')
< for setting in ['average-pitch', 'gain', 'rate']:
< if voiceGSettings.get_user_value(setting) is not None:
< gSettingsVal = voiceGSettings.get_double(setting)
< debug.println(debug.LEVEL_FINEST, 'INFO:
GSettings backend: Getting voice setting for voice %s with name %s = %s' %
(voice, setting, gSettingsVal))
< voiceSetting[setting] = gSettingsVal
---
> if voiceEstablished == True:
> if appSpecific == False and
> voiceSetting.__contains__('established'):
> voiceSetting.pop('established')
> for setting in ['average-pitch', 'gain', 'rate']:
> if voiceGSettings.get_user_value(setting) is not None:
> gSettingsVal = voiceGSettings.get_double(setting)
> debug.println(debug.LEVEL_FINEST, 'INFO: GSettings
> backend: Getting voice setting for voice %s with name %s = %s' % (voice,
> setting, gSettingsVal))
> voiceSetting[setting] = gSettingsVal
619,622c618,621
< if voiceSettings[voice].__contains__('family'):
< for setting in ['name', 'locale', 'dialect']:
< voiceFamilyGSettings.set_string(setting,
voiceSettings[voice]['family'].get(setting))
< voiceFamilyGSettings.set_boolean('family-set', True)
---
> if voiceSettings[voice].__contains__('family'):
> for setting in ['name', 'locale', 'dialect']:
> voiceFamilyGSettings.set_string(setting,
> voiceSettings[voice]['family'].get(setting))
> voiceFamilyGSettings.set_boolean('family-set', True)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1849461
Title:
orca --setup, tab "Voice": Language setting not saved
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/orca/+bug/1849461/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs