GNOME Bugzilla – Bug 398531
Person list in Speech tab can become empty after pressing "OK" or "Apply"
Last modified: 2007-02-02 23:30:42 UTC
In the "Speech" tab of the Orca preferences dialog, one can select the "Speech synthesizer" and the "Person" to use, among other things. When one changes the "Speech synthesizer" selection, the list of people in the "Person" combobox is repopulated. This all works fine until the user presses the "OK" or "Apply" buttons. After the user presses one of these buttons, the elements in the "Person" combobox disappear. I believe the problem is that an "OK" or "Apply" causes settings to be saved and reloaded. The side effect of this is that speech servers will automatically be shutdown. As such, any references the Preferences GUI is holding onto for speech are out of date.
Created attachment 81554 [details] [review] Partial patch to try to fix the problem. The attached patch works towards a solution. The remaining problem is with the following two lines: if not self.initializing: self.voices.set_active(0) at line 681 in orca_gui_prefs.py. As it currently stands, this will always set the active choice in the voices combo box to the first item. What we really want here is to set it to the current voice.
Created attachment 81729 [details] [review] Patch to hopefully resolve the problem This is a rather heavyweight patch. I thought this "simple look at it for an hour" problem was going to be easy, but I found the need to reorganize and refactor the code. Took me about 14 hours of time I really didn't have. But...it seems to solve the problem. I noticed another lurking problem, which is that the rate/pitch/volume sliders are sometimes out of sync with what the voice type actually holds. The cause of this is that the ACSS for the voice type doesn't need to hold the values for these types, so the rate/pitch/volume values can be empty. So, when switching from one voice type to another that doesn't have the values (e.g., uppercase to default -- default tends not to set the pitch whereas uppercase does), the sliders can remain visually "stuck" and do not indicate the true state (i.e., the value isn't even set). That is probably something for another bug, and the solution might be to do something such as put a checkbox by the slider: a checked state means pay attention to the value, an unchecked state means to ignore it (and inherit from the default voice). I'd appreciate it if some people could take it for a spin. The things I'd like to see tested are: 1) Does it fix the bug for you? 2) Does it work for you in the presence of no speech servers, one speech server, many speech servers (you can do this by moving your various /usr/lib/bonobo/servers/GNOME_Speech_Synth*.server files in and out of the /usr/lib/bonobo/servers directory) 3) Does it work with no ~/.orca/user-settings.py* file (make sure you delete both the *.py and *.pyc files) 4) Does it work when you change and Apply (or OK) the preferences several time? 5) Do the settings get restored when you press Cancel? I've tested these, and I think they all seem to work, but I am tired.
Created attachment 81732 [details] [review] Revised patch to include a deeper copy of the ACSS (needed to copy family instead of referencing it) I needed to make this additional change because the "Cancel" operation worked well for everything except the voice family name. D'Oh. That's because the voice family was a dictionary and we needed to make of copy of it rather than a reference to it. In looking back on all the changes I made for this bug, I think a lot of the confusion experienced here is that we were not doing deep copies of the ACSS structure. As such, when we thought we were working with a local copy, we were really dealing with a shared reference.
1. Yes 2. No servers? In that case the combo boxes stay empty. :-) With one and several, yes. 3. Oops, the bug is still present here. I selected my synthesizer, voice, and rate and then pressed the Apply button. When I selected a different synthesizer, the person list was empty. 4. Not counting 3, yes. 5. Yes.
Here's my results with testing the latest patch with Orca from svn trunk/HEAD on Ubuntu Edgy (I suspect Joanie tested on Ubuntu Feisty). > 1) Does it fix the bug for you? Yes. > 2) Does it work for you in the presence of no speech servers, one speech > server, many speech servers (you can do this by moving your various > /usr/lib/bonobo/servers/GNOME_Speech_Synth*.server files in and out of the > /usr/lib/bonobo/servers directory) No speech servers - Yes. The "Enable speech" checkbox was not checked and the rest of the items on the panel were grayed. One speech server - Yes, once I'd set it up via the Preferences speech pane (I was coming from the previous test where no speech servers were available). Two speech servers - Yes. > 3) Does it work with no ~/.orca/user-settings.py* file (make sure you delete > both the *.py and *.pyc files) Yes. Joanie writes: > Oops, the bug is still present here. I selected my synthesizer, > voice, and rate and then pressed the Apply button. When I selected > a different synthesizer, the person list was empty. I'm not seeing this problem on Edgy (using Festival and Cepstral). > 4) Does it work when you change and Apply (or OK) the preferences several > time? Yes. > 5) Do the settings get restored when you press Cancel? Yes. Nice work Will!
Thanks for testing, Joanie and Rich. Joanie, regarding: 3. Oops, the bug is still present here. I selected my synthesizer, voice, and rate and then pressed the Apply button. When I selected a different synthesizer, the person list was empty. I've tried this and cannot seem to reproduce it, either. Are you still able to reproduce it? In addition, do you have emacspeak support still set up? I'd be interested how things work with multiple speech systems in place.
I can indeed reproduce it -- on both of my Feisty machines. I no longer have emacspeak support set up. But I can do that. I'll get back to you on that one in a bit. p.s. Thanks for cleaning up the text that you quoted. :-) Apparently I am not capable of determining the point at which text wraps. :-/
(In reply to comment #7) > I can indeed reproduce it -- on both of my Feisty machines. Bummer. Do you have an exact set of steps (e.g., I chose this exact synthesizer and this exact voice, yadda, yadda)? I'd like to make sure I'm doing what you're doing - it might be a sequence I didn't test.
I can reproduce it in a variety of ways. The key seems to be not having a user-settings.py and pressing the Apply button. Regardless: 1. Delete user-settings.py* 2. Launch Orca from the Applications menu 3. (Preferences dialog box appears) Ctrl PgDn to the Speech page 4. Tab to the Speech System combo box (which is empty). Space bar to expand it. I only have one item, GNOME Speech Services, which appears. Enter to select it/collapse the list. 6. Fonix DECTalk happens to be the selected synth. Leave it alone. 7. Tab to the rate slider and increase it. I went with 65. 8. Alt A twice to move to the Apply button, Space to press it. 9. Tab to the synthesizer combo box, space bar to expand it, choose another synth (I chose Espeak), and press Enter. The person combo box no longer displays a value. 10. Tab to the person combo box and press space bar to expand it. The list is empty. HTH!
Okay, I finally got around to reinstalling Emacspeak. Sorry for the delay, but I have what Rich would call RealJob(tm). :-) On a Feisty box with the patch: 1. Launch Orca 2. Get into the Preferences dialog, Speech page 3. Switch the speech system from gnome-speech to emacspeak and press the Apply button. 4. Switch the speech system from emacspeak back to gnome-speech and press the Apply button. 5. Look in the speech system combo box: emacspeak is no longer there. You have to quit Orca and restart it to be able to choose emacspeak again.
I rebooted and now I cannot reproduce the problem in comment #9. Go figure....
(In reply to comment #11) > I rebooted and now I cannot reproduce the problem in comment #9. Go figure.... > I tried these steps on Edgy and couldn't reproduce it. I wonder if the reboot managed to clean out some old cruft on you machine? PS - thanks for testing!
(In reply to comment #10) > Okay, I finally got around to reinstalling Emacspeak. Sorry for the delay, but > I have what Rich would call RealJob(tm). :-) Thank you for your help! I *can* reproduce this one. Odd. I'll take a look.
(In reply to comment #10) > Okay, I finally got around to reinstalling Emacspeak. Sorry for the delay, but > I have what Rich would call RealJob(tm). :-) > > On a Feisty box with the patch: > > 1. Launch Orca > 2. Get into the Preferences dialog, Speech page > 3. Switch the speech system from gnome-speech to emacspeak and press the Apply > button. > 4. Switch the speech system from emacspeak back to gnome-speech and press the > Apply button. > 5. Look in the speech system combo box: emacspeak is no longer there. > > You have to quit Orca and restart it to be able to choose emacspeak again. > I did some digging. I think this is a bug in the emacspeak speech factory. Logged as bug 403760 (http://bugzilla.gnome.org/show_bug.cgi?id=403760).
Thanks for the testing, everyone! I committed the patch and I'm closing this out as fixed. The emacspeak speech factory bug will hold the other problem Joanie uncovered (thanks Joanie!)