After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 398531 - Person list in Speech tab can become empty after pressing "OK" or "Apply"
Person list in Speech tab can become empty after pressing "OK" or "Apply"
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
2.17.x
Other All
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-19 21:42 UTC by Willie Walker
Modified: 2007-02-02 23:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Partial patch to try to fix the problem. (1.37 KB, patch)
2007-01-30 22:32 UTC, Rich Burridge
needs-work Details | Review
Patch to hopefully resolve the problem (48.24 KB, patch)
2007-02-02 02:59 UTC, Willie Walker
none Details | Review
Revised patch to include a deeper copy of the ACSS (needed to copy family instead of referencing it) (49.41 KB, patch)
2007-02-02 03:37 UTC, Willie Walker
committed Details | Review

Description Willie Walker 2007-01-19 21:42:09 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.
Comment 1 Rich Burridge 2007-01-30 22:32:32 UTC
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.
Comment 2 Willie Walker 2007-02-02 02:59:59 UTC
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.
Comment 3 Willie Walker 2007-02-02 03:37:21 UTC
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.
Comment 4 Joanmarie Diggs (IRC: joanie) 2007-02-02 15:55:59 UTC
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.
Comment 5 Rich Burridge 2007-02-02 16:21:04 UTC
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!
Comment 6 Willie Walker 2007-02-02 16:39:21 UTC
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.
Comment 7 Joanmarie Diggs (IRC: joanie) 2007-02-02 16:52:31 UTC
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. :-/
Comment 8 Willie Walker 2007-02-02 17:45:31 UTC
(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.
Comment 9 Joanmarie Diggs (IRC: joanie) 2007-02-02 20:02:23 UTC
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!
Comment 10 Joanmarie Diggs (IRC: joanie) 2007-02-02 20:50:41 UTC
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.
Comment 11 Joanmarie Diggs (IRC: joanie) 2007-02-02 21:07:34 UTC
I rebooted and now I cannot reproduce the problem in comment #9.  Go figure....
Comment 12 Willie Walker 2007-02-02 21:21:00 UTC
(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!
Comment 13 Willie Walker 2007-02-02 21:24:44 UTC
(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.
Comment 14 Willie Walker 2007-02-02 23:29:13 UTC
(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).
Comment 15 Willie Walker 2007-02-02 23:30:42 UTC
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!)