GNOME Bugzilla – Bug 412656
Refactor speech generators to provide ACSS per string
Last modified: 2010-09-20 10:57:02 UTC
Right now, speech generators return a list of strings and the thing calling them decides which voice (ACSS) to use to speak all the strings. Some users have requested the ability to have finer granularity over the voices that are used (e.g., a specific voice for a specific role -- see also bug 405759 for a related example). One way to do this would be to have speech generators return a list of [[string, acss], [string, acss], ...] instead of [string, acss]. The acss could be chosen by generator for the specific role(s) being handled. By default, all acss's would be the default acss, but if role-specific acss's were defined, they would be used. On the speech side, the thing receiving the utterances (e.g., speech.speak) would work to be smart to clump together sequential strings that use the same acss so as to avoid unnecessary pauses in the speech output (we do this in Gecko.py -- look for the word 'clump').
See also bug 511885 - an ACSS would be nice for channel notify events from live regions in FF.
i'm happy to have a go at this when i get back (after 25th.) Thank you
It's yours. :-) Thanks Jon!
Created attachment 122515 [details] [review] revision 0.1 This patch: moves clumpUtterances, from toolkits/Gecko/script.py to speech.py Also needed to move adjustForRepeats from default.py to speech.py. (would we ever need to overwride adjustForRepeats in the scripts, or is it ok to assume static?) (assuming static for now.) Moved adjustForRepeats helper function _addRepeatSegment from default.py to speech.py. updated references to self.clumpUtterances to speech.clumpUtterances and self.adjustForRepeats to speech.adjustForRepeats.
(In reply to comment #4) > Created an attachment (id=122515) [edit] > revision 0.1 > > This patch: > > moves clumpUtterances, from toolkits/Gecko/script.py to speech.py Thanks for taking a start at this. In general, we do not want to pull things out of the script and put them in speech.py. The reason for this is to allow the scripts to provide customized behavior in the event we're dealing with an application or toolkit that provides what I euphemistically call a "unique interaction model."
(In reply to comment #5) > (In reply to comment #4) > > Created an attachment (id=122515) [edit] > > revision 0.1 > > > > This patch: > > > > moves clumpUtterances, from toolkits/Gecko/script.py to speech.py > > Thanks for taking a start at this. In general, we do not want to pull things > out of the script and put them in speech.py. The reason for this is to allow > the scripts to provide customized behavior in the event we're dealing with an > application or toolkit that provides what I euphemistically call a "unique > interaction model." Having said this, if there is no specific script knowledge needed to do the adjustForRepeats or clumpUtterances or other things being proposed to be pushed from the script to speech.py, then centralizing it in speech.py is probably OK.
closing this as fixed. Master contains formatting strings for acss/speech generators.
*** Bug 589415 has been marked as a duplicate of this bug. ***
(In reply to comment #7) > closing this as fixed. > Master contains formatting strings for acss/speech generators. Reopening because this bug is for actually doing the ACSS per string. That is bug#570658 enables us to do this by adding "voice" elements to the formatting strings, but we still need to do the work to add the voice elements.
In bug 588910 comment #22, Jose asked: > Would be possible speak Misspelled Indicator using a different voice? I'm not sure if the Misspelled Indicator could/should be handled here. But I don't want the idea to be lost, so I'm adding it here. (I also added it to bug 543157 - the RFE for a System Voice.)
Ale, you have some related bugs/RFEs on the Andalucía list. Therefore, this might be worth taking a look at along with those....
I fixed this as part of the commit for bug 543157.