GNOME Bugzilla – Bug 585417
Allow pauses to be inserted in speech output
Last modified: 2009-11-09 21:35:35 UTC
Please describe the problem: Dear Developers! I see an interesting prosodian problem with the mnemonic spokening function, this is a speech intonation problem: The 2.26.x Orca versions says following the shortcut information if the tutorial message is checked if I remember correct: "Orca screen reader and magnifier frame. Settings button alts. To activate, press space." Newest Orca development version says this information with following: "Orca screen reader and magnifier frame. Settings button alts To activate, press space." This is problem because I using hungarian locale. For example when I activate the application menu, the "Accessibility" menu item (akadálymentesítés in hungarian translation) mnemonics key is a, and the tutorial message is to activate, press right arrow (in hungarian the translation is "az almenü megnyitásához használja a jobbra nyíl billentyűt."). So, the mnemonics a information a and the beginning tutorial message is hear following when Espeak talks this information: "Akadálymentesítés menü aaz almenü megnyitásához használja a jobbra nyíl billentyűt." (Translated with english: Accessibility menu a to activate, press right arrow.) Possible insert after the mnemonics information with ". " string, because better prosode and better intonation with Espeak? Possible fix this problem? Attila Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Yes. Other information:
I'm going to retitle this bug since there's potentially a general need to add pauses to any portion of the speech output.
Created attachment 136338 [details] [review] Patch to allow pauses to be added and also use this new feature before speaking tutorial strings This patch to allows pauses to be added and also uses this new feature before speaking tutorial strings. The funky TUTORIAL string in formatting.py behaves like a ternary operator -- if the tutorial exists, we insert a pause before it; otherwise we do nothing: TUTORIAL = '(tutorial and (pause + tutorial) or [])' The way the speech generators work, the tutorial generator method will only be called once for this operation, so this kind of structure should not be a performance problem. Attila - please test. To apply this patch, you need to use "-p1" for the patch level instead of the "-p0" that we grew accustomed to when we were using SVN.
Patch committed to master for Orca 2.27.3
Will, sorry, but only friday evening tested the patch and hear an interesting think. Different the shortcut mnemonics spoken pitch with the normal text, or what punctuation character use after the mnemonics? Tomorrow morning I compare the 2.26 speech output and 2.27.2 release speech output and write comment if I found the difference. The mnemonics pause before tutorial message is very good, but I think need pause with between the role and the mnemonics key. Difficult detect this with hear. You enough if I send two mp3 file with attachment with 50 speech rate, one with 2.26 Orca speech, and two with 2.27.2 Orca speech? Attila
Created attachment 136463 [details] [review] Patch to put pauses before mnemonics (In reply to comment #4) > The mnemonics pause before tutorial message is very good, but I think need > pause with between the role and the mnemonics key. Please try the attached patch and let me know how it works for you. It puts a pause before the speaking of the mnemonics.
Will, I am working on a bug at the moment, and got this traceback: Traceback (most recent call last):
+ Trace 215987
s.processObjectEvent(event)
self.listeners[key](event)
default.Script.onStateChanged(self, event)
self.onFocus(event)
default.Script.onFocus(self, event)
orca.setLocusOfFocus(event, newFocus)
orca_state.locusOfFocus)
newLocusOfFocus)
if self.presentTableInfo(oldLocusOfFocus, newLocusOfFocus):
if not len(utterances[0]) and self.speakBlankLine(newFocus):
Heh - looking at the code: # [[[TODO: WDW - need to make sure assumption about utterances[0] # is still correct with the new speech generator stuff.]]] # if not len(utterances[0]) and self.speakBlankLine(newFocus): Looks like the assumption is not a good one. :-)
BTW, do you have a reproduceable test case that generates the stack trace? It would help me track down the issue more quickly and hopefully come up with a fix that will eliminate both the stack trace and the TODO. :-)
(In reply to comment #8) > BTW, do you have a reproduceable test case that generates the stack trace? It > would help me track down the issue more quickly and hopefully come up with a > fix that will eliminate both the stack trace and the TODO. :-) > Not yet, but having just finished testing the patch for the bug I was working on, I will see if I can find you one. Stay tuned.
Created attachment 136474 [details] test case Try this: 1. Open the test case. 2. While on the 'Hello world.' line, enable reading of rows. 3. Press Down Arrow to move into the first row of the table.
I forgot to mention, enable Tutorial messages.
(In reply to comment #10) > Created an attachment (id=136474) [edit] > test case > > Try this: > > 1. Open the test case. > 2. While on the 'Hello world.' line, enable reading of rows. > 3. Press Down Arrow to move into the first row of the table. > (In reply to comment #11) > I forgot to mention, enable Tutorial messages. OK - I'm tried and tried and then I tried some more. Then I tried again. From looking at the code, I can see how this might be reproduced (i.e., navigate to a blank cell in a table and also have tutorial messages enabled), but I cannot seem to reproduce it. Darn. I'm really trying, too. Very hard. In any case, the code in question is somewhat suspect, and is also kind of independent of the Pause insertion. It's just that the Pause insertion tickled the bogosity of the code. I'll try to look at it some more tomorrow.
Created attachment 136481 [details] full debug.outs and my ~/.orca (In reply to comment #12) > but I cannot > seem to reproduce it. Darn. I'm really trying, too. Very hard. Don't you hate that? My migraine won't go away, so I've not taken the time this evening to debug this. Sorry! If you'd like, I'll look tomorrow. In the meantime, I've attached two debug.outs, one from reproducing the problem as described and the other following the same steps without tutorial messages enabled because it turns out that generates a similar error (list index out of range) for utterances[0]. I've also attached my ~/.orca. ~$ uname -a SunOS blockhead 5.11 snv_111b i86pc i386 i86pc Solaris OOO310m11 (Build:9399) [CWS:ooo31osol] HTH!
First impressions the second patch: I think the pause with before mnemonic information is very good, but the difference with mnemonic speech pitch and the normal speech is I don't know good or not. I hear bad difference where am I spokening for example with Gnome-terminal: Nev dewelopment version spoken the were am I information with following: Readonly terminal hammera@hammera-laptop ~$. Old stable release says this information following with hear, I paste this sequence with new document with Gedit, and sayall the document: readonly. Terminal. hammera@hammera-laptop ~$. Next two comment I send mp3 files with following steps generated: 1. Launch Orca, and press four tab key. 2. Switch GNOME-terminal, and press where am I command. The first mp3 is development speech record, the second is the stable speech record. Excuse me the bad quality, because only record this information with my notebook builtin microphone. Attila
Created attachment 136484 [details] This is the 2.27.2 Orca speech record. This is a record with 2.27.2 Orca version speech. See the test steps with my prewious comment.
Created attachment 136485 [details] This is the stable 2.26.2 Orca version speech record. This is the stable 2.26.2 Orca speech record. Drastical hear the differences. The test steps see my two prewious comments.
(In reply to comment #14) > First impressions the second patch: > I think the pause with before mnemonic information is very good, but the > difference with mnemonic speech pitch and the normal speech is I don't know > good or not. I'm not sure what you mean by "difference with mnemonic speech pitch". Are you hearing an uppercase voice being applied here? This might not be the result of the pause information (the subject of this bug), but might be the result of Orca catching more uppercase strings being sent to the synthesizer. Please attach a debug.out file that demonstrates the speaking of the mnemonic. > I hear bad difference where am I spokening for example with Gnome-terminal: > Nev dewelopment version spoken the were am I information with following: > Readonly terminal hammera@hammera-laptop ~$. > Old stable release says this information following with hear, I paste this > sequence with new document with Gedit, and sayall the document: > readonly. > Terminal. Is the problem that you prefer "readonly. terminal." to "readonly terminal."? There are a number of spots where pauses can be inserted. I think we might have been doing too much in the earlier versions. You can modify the formatting.py file to include "+ pause +" strings to insert pauses where you'd like them to occur. Please give this a try and let me know what you come up with. I'd like Mike, however, to be the one who ultimately decides where pauses should be in the default formatting strings.
The bug Joanie has raised is a separate problem and I've opened bug #585643 to track it.
I think "readonly. terminal." is right. Evening I do a required debug.out. Enough only the 2.27 output? Attila
(In reply to comment #19) > I think "readonly. terminal." is right. I'll defer to Mike on this. To me, 'readonly' is an adjective used to describe a noun, and the adjective and noun belong in the same phrase with no pause between them. On a higher level note, saying 'readonly' for a terminal in the first place just seems wrong since you certainly can type in a terminal. That might be a separate bug to open if we agree readonly is wrong in that case. > Evening I do a required debug.out. Enough only the 2.27 output? Yes - the thing I'm interested in is the mnemonic speech pitch issue. It's not related to pauses, but somehow it got mixed into this bug as well. I've opened bug #585644 to discuss the mnemonic speech pitch issue. Please attach your debug.out that shows you accessing the offending mnemonic.
(In reply to comment #20) > Yes - the thing I'm interested in is the mnemonic speech pitch issue. It's not > related to pauses, but somehow it got mixed into this bug as well. I've opened > bug #585644 to discuss the mnemonic speech pitch issue. Please attach your > debug.out that shows you accessing the offending mnemonic. In reading this, I was not clear. I mean to attach the debug.out regarding the mnemonic to bug #585644, which will be used to discuss the mnemonic speech issue you raised. This bug (bug #585417) will be used to discuss the places where pauses should be added to the speech output. Finally, bug #585643 will be used to discuss approaches to handling table-related focus changes.
Created attachment 136499 [details] The required debug.out. I not want wayt you evening, because 2.27.3 release period is very sort. I look the debug.out file. The mnemonics information is sending for example with Orca preferences button is Alt p. This problem is the difference with old and new release? The read only terminal where am I string is following with debug.out file: "SPEECH OUTPUT: 'read only terminal hammera@hammera-laptop:~$ " Attila
Sorry, I later see with the new bug email with speech mnemonic pitch bug. The readonly terminal problem: If I right understand, you would like remove the "readonly" text when the user work with GNOME terminal? This is right I think, because I not see readonly Gnome terminal. If you would like, I open this problem with another bug. What happen when long process run with terminal? For example you generate a large iso file. The characters you write is writing with terminal, but not possible run commands. But I think this is offtopic this bug.
Mental note to self - update all the tests now that we're adding "." to the spoken output. I checked in the mnemonic pause patch before changing the tests (sorry!).
(In reply to comment #23) ... > The readonly terminal problem: > If I right understand, you would like remove the "readonly" text when the user > work with GNOME terminal? This is right I think, because I not see readonly > Gnome terminal. > If you would like, I open this problem with another bug. Please do. Thanks. > What happen when long > process run with terminal? For example you generate a large iso file. The > characters you write is writing with terminal, but not possible run commands. I'm not sure what you're describing here, but it sounds like it is a completely new issue to raise in yet a different bug. As a reminder: please try to raise new bugs in new bug reports -- only one issue per bug, please. Please also try to avoid carrying on a discussion in an existing bug about new bugs. We use these bug reports to track *single* issues. When the discussion for a bug becomes very long because of discussions for unrelated bugs, it makes it very difficult/confusing to track discussion for the actual bug we're trying to solve.
When I ask where am I with Thunderbird, the spoken message is wery monotone, quoted with debug.out in hungarian message: SPEECH OUTPUT: 'fatáblázat cella [Bug 585417] [mike] Allow pauses to be inserted in speech output 4. oszlop, 8 oszlopból 262. sor, összesen 262 1. fa szint.' The wish result is following: SPEECH OUTPUT: 'fatáblázat.' Speech output: 'cella.' Speech output: ' [Bug 585417] [mike] Allow pauses to be inserted in speech output' Speech output: '4. oszlop, 8 oszlopból.' Speech output: '262. sor, összesen 262.' Speech output: '1. fa szint.' So, I insert dots with critical places, and add line breaks. I think old Orca release do this form. Attila
I predict you are going to find many individual issues where the speech output isn't exactly the way you like it. To be more efficient in obtaining the exact desired behavior you specifically want, I'm going to request that you make the source code changes that demonstrate what you are looking for and then attach the changes to this bug as a patch. In git master, there are now a few examples of using the 'pause' and 'lineBreak' keywords in src/orca/formatting.py. What I'd like you to do is modify src/orca/formatting.py to use these keywords to get the behavior you want. The 'pause' keyword causes '.' to added to the end of the current string being built up and the resulting text is spoken right away. The '.' is only added if necessary. The 'lineBreak' keyword causes the current string being built up to be spoken right away with nothing extra being done to the string. When you have a patch ready, please attach it and I'll take a look. Thanks!
Thank you Will, I look src/orca/formatting.py file. I not promise in monday, but tuesday I have enough time. Attila
Created attachment 136628 [details] [review] Patch to fix some trivial speech rolename pause problem. This is a big patch. I fix lot of pause problems with trivial rolenames. The compare I use with old and new Orca release. The patch purpose: I try make equals good speech output with new release with Old release speech output. I think I need more testing, but the trivial rolenames output speech was good now. One question? Need editing another formatting.py files (for example src/orca/scripts/apps/evolution/formatting.py)? Attila
(In reply to comment #29) > Created an attachment (id=136628) [edit] > Patch to fix some trivial speech rolename pause problem. Thanks Attila. Please keep testing this and we'll work to get something acceptable/complete into 2.27.4
If not happen drastical think and not later, next week monday evening I finalize my patch with this bug. I would like end with my easyest bugfixes with next week friday, because next week in sunday I go one week holiday, and not would like reserve you with another jobs. Attila
Created attachment 137178 [details] [review] I hope this is a final revision of this patch. I hope this is the final version. I edit some formatting items with src/orca/scripts/apps/soffice/formatting.py file. I don't known, I mistake or not: where am I and detailed where am I does'nt talk the needed information when I edit tables with Openoffice.org Writer? Openoffice.org calc is work right, inserted pauses correct with I would like. Attila
Created attachment 137303 [details] [review] Final version, fix where am I problem with Openoffice.org table cells when I using Openoffice.org Writer. This is the final release. Prewious patch I mistake with where am I and detayled where am I formatting with src/orca/scripts/apps/soffice/formatting.py file. Now when I edit tables with Openoffice.org Writer, where am I and detailed where am I works perfect, and insert pauses between with important informations. If not a big request, please commit this patch, because my another bug fix is depend of this pause fix (bug 585948, automatic position index feature). Now I not found another required place to insert pauses, this bug is now fixed I think. Attila
Thanks for your work, Attila! Here's some comments before I can commit this patch: src/orca/scripts/toolkits/Gecko/formatting.py ============================================= >pyatspi.ROLE_TABLE_CELL: >- 'focused': '(tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState + (expandableState and (expandableState + numberOfChildren))', >+ 'focused': '(tableCell2ChildLabel + tableCell2ChildToggle + pause) or cellCheckedState + pause + (+ expandableState + pause and (expandableState + pause + numberOfChildren + pause))', I think this needs work. The problem is that the pause in "(tableCell2ChildLabel + tableCell2ChildToggle + pause)" will always end up making this become accepted, causing the cellCheckedState portion to never be used. There are also some other issues around the "(+" section. It might be better written as: + 'focused': '((tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState) + pause + (expandableState and (expandableState + pause + numberOfChildren + pause))', src/orca/scripts/apps/soffice/formatting.py =========================================== >pyatspi.ROLE_TABLE_CELL: >- 'focused': '(tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState + (expandableState and (expandableState + numberOfChildren))', >+ 'focused': '(tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState + pause + (expandableState and (expandableState + numberOfChildren)) + pause', This might be better written as (I moved the last 'pause' in with the expanded phrase): + 'focused': '(tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState + pause + (expandableState and (expandableState + numberOfChildren + pause))', >'ROLE_SPREADSHEET_CELL': >- 'basicWhereAmI': 'roleName + column + columnHeader + row + rowHeader + (textContent or spreadSheetCell) + anyTextSelection' >+ 'basicWhereAmI': 'roleName + pause + row + pause + rowHeader + pause + column + pause + columnHeader + pause + (textContent or spreadSheetCell) + pause + anyTextSelection + pause' Needs work - this changes the order of the row and column. Why? To keep the same order, it would be written as: + 'basicWhereAmI': 'roleName + pause + column + pause + columnHeader + pause + row + pause + rowHeader + pause + (textContent or spreadSheetCell) + pause + anyTextSelection + pause' Please make these changes, test, and let me know if things still work for you. There's also some whitespace issues in the strings, but that's mostly for good programming practices and will not effect the output. I will change those when I commit the final patch. Note also that this will have to be run through the regression tests and all the effected tests will need to be changed to reflect the new speech formatting. I will do this, but it will take some time.
Ok, I try do changes with tomorrow, your comment is helpful. When you comment with src/orca/scripts/apps/soffice/formatting.py, You wroted: "Needs work - this changes the order of the row and column. Why?" I replace the order because I not known possible changeable the message order with any language translation file. If yes, not need change this part. For example if hungarian blind people using Openoffice.org calc, I think they would like better hear first the row and second the column coordinate with where am I. I look tomorrow old orca release how order say this information. If another language users preferred first the column number and second the row number, not need change this information order. Another parts of your comment and you requested changes are clean. Attila
Created attachment 137352 [details] [review] 6. rewision, this patch contains you requested changes. I doed you requested changes, but need little change some method: 1. In src/orca/scripts/toolkits/Gecko/formatting.pi file, with pyatspi.ROLE_TABLE_CELL part: If I insert only following you suggest line: 'focused': '((tableCell2ChildLabel + tableCell2ChildToggle) or cellCheckedState) + pause + (expandableState and (expandableState + pause + numberOfChildren + pause))', This modification result un need cell string for example with Thunderbird. If I move up and down arrow keys with letters, Orca always says unneed the "cell" word after the whole message information, and where am I and detayled where am I does'nt work with tables traditional with Old Orca release in Firefox and Thunderbird. I solve this two problem with following code insert and works perfect now: 'unfocused': 'tableCellRow + pause', 'basicWhereAmI': 'parentRoleName + pause + columnHeader + pause + rowHeader + roleName + pause + cellCheckedState + (realActiveDescendantDisplayedText or imageDescription + image) + columnAndRow + pause + expandableState + pause + nodeLevel', 'detailedWhereAmI': 'parentRoleName + pause + columnHeader + pause + rowHeader + roleName + pause + cellCheckedState + (realActiveDescendantDisplayedText or imageDescription + image) + pause + columnAndRow + pause + tableCellRow + pause + expandableState + nodeLevel + pause' Because original src/orca/scripts/toolkits/Gecko/formatting.py file does'nt have pyatspi.ROLE_TABLE_CELL part, Orca use default pyatspi.ROLE_TABLE_CELL formatting preference with src/orca/formatting.py file. Because we owerwrite this preference, need add the prewious code. 2. In your src/orca/scripts/apps/soffice/formatting.py requests I all changes doed, not change your suggested code. Attila
Oh, I forgot ask one problem fix hint: When use detayled where am I command with Firefox, the spokened informations not contains pauses, for example the spokened output I hear following: "13 headings 14 tables 14 forms 65 visited links 12 unvisited links" If not precise the output, sorry, I write example spokened output. In src/orca/formatting.py or another formatting.py files I not found what the need piatspy role object to fix this problem. Missing this piatspy role object with src/orca/formatting.py or src/orca/scripts/toolkits/Gecko/formatting.py file? Only this one problem fix missing. Attila
Created attachment 138216 [details] [review] Apply Attila's changes so they can be turned on/off easily I'm still a little concerned about this patch because it might be adding pauses and line breaks that work specifically for eSpeak. They might not work so well with other speech synthesis engines. So...what I did was create a new setting, orca.settings.useExperimentalSpeechProsody, whose default value is False. If you set it to True in your ~/.orca/orca-customizations.py or ~/.orca/user-settings.py file, the changes Attila provided will be applied. If not, we keep the current behavior. Attila - please experiment with this (it's checked into the master branch) and adjust the lines contained within the "if orca.settings.useExperimentalSpeechProsody" blocks to get things the way you want them. We can also send a call out to the list to experiment as well. Attila - I may be misunderstanding what you meant by "Orca always says unneed the "cell" word after the whole message information, and where am I and detayled where am I does'nt work with tables traditional with Old Orca release in Firefox and Thunderbird." I tried reproducing this with the latest code, but I was unable to do so. It may have already been fixed by something else I encountered with the braille refactor. In any case, I left your Gecko ROLE_TABLE_CELL changes out because I couldn't reproduce the problem. Finally, regarding the "13 headings 14 tables 14 forms 65 visited links 12 unvisited links" text. This is currently hardcoded in Gecko's speech_generator.py:_generatePageSummaryMethod and there's no easy opportunity to insert pauses via a formatting string. This is something we probably should consider splitting into separate generator methods at some point (using a to-be-cached value of self._script.getPageSummary). Thanks!
Tomorrow I test your patch. If the orca.settings.useExperimentalSpeechProsody setting works right, possible do a check box with Orca preference Gui/speech page? This checkbox easyest toggle this setting with beginner users. If this request not a big problem and you accept my request, I open a feature request and do need modification. Attila
Will, if I can get Cepstral going on Opensolaris I'll try this with it this weekend.
Willl, your patch is fantastic, I not found problem. When I setting orca.settings.useExperimentalSpeechProsody to true with my user-settings.py file, all need Espeak pause fix works very well. When I do the need pause fix, unfortunately I forgot another speech sinthesizer users, because my machine impossible test another speech sinthesizer the fix (for example Cepstral sinthesizer). Very bad this fix with another speech sinthesizers? The orca.settings.useExperimentalSpeechProsody setting is very good ydea. Ift this bug is finalized, and you writing positive openion my check box suggestion, I do a check box with this setting with speech page. The "Insert pauses with important informations" label is good? Thank you your very good patch. Attila
(In reply to comment #41) > Ift this bug is finalized, and you writing positive openion my check box > suggestion, I do a check box with this setting with speech page. The "Insert > pauses with important informations" label is good? Many thanks for testing. What I will do is release Orca 2.27.4 with the code as is and let people on the list know about the setting and how to change it. If further testing shows that this improves speech across all synthesizers, I'll just roll your changes directly into the formatting dictionary and we won't need to worry about a checkbox.
Ok, agree, thank you. Please tell me or write an e-mail my e-mail address if need do the suggested check box. Not a big work if need, I do welcome because this task is easy to do. :-) If not happen drastical change with this code, I begin finalize with my automatic position index feature (bug 585948), because depend this feature with this bug fix. Attila
Because Ubuntu Developers want replace gnome-speech with speech-dispatcher in Ubuntu Karmic, I tested my fix with speech-dispatcher because interesting how work the fix. I dont known why, but when I choose speech-dispatcher with speech system combo box and espeak with speech sinthesizer combo box, speech-dispatcher use one second pauses with important object when my fix is used. This is very disturb me. For example I pressed tab key with Orca main window, and hear the output following, one second pause text with quoted text mean one second delay with next information: "quit button. one second pause Altq one second pause to activate, press space." This is normal and right? Please test anybody if possible. Interesting, but if I use default gnome-speech driver and Espeak, I not see this problem and all works fine with needed pauses. Have any ydea how can fix this problem with speech-dispatcher integration? Attila
(In reply to comment #44) > For example I pressed tab key with Orca main window, and hear the output > following, one second pause text with quoted text mean one second delay with > next information: > "quit button. one second pause Altq one second pause to activate, press space." > This is normal and right? Please test anybody if possible. > Interesting, but if I use default gnome-speech driver and Espeak, I not see > this problem and all works fine with needed pauses. > > Have any ydea how can fix this problem with speech-dispatcher integration? A 'pause' element in the speech formatting string adds a "." to the end of any text currently in place and then sends the string off to the synthesis system for speaking. From the behavior you describe, it seems like speech dispatcher may be causing some sort of delay between requests to speak. Speech dispatcher shouldn't do so.
How can fix this problem, or impossible to fix now? So, not the pause fix produce the problem, this is speech-dispatcher bug? Attila
(In reply to comment #46) > How can fix this problem, or impossible to fix now? > So, not the pause fix produce the problem, this is speech-dispatcher bug? I may take a look at just inserting a ". " in the string we're building up. But, the main problem (IMO) is that speech dispatcher should not cause such long delays between utterance requests. It seems like a speech dispatcher bug to me. If I do make a patch, I will post it here.
Created attachment 138448 [details] [review] Patch to not break utterance up when pauses are inserted. Attila - please test this patch.
I tested the patch, and useExperimentalSpeechProsody have default value (set to True with src/orca/settings.py). When I using Espeak and gnome-speech driver, I not see big difference. Only difference I see for example with where am I operation with gnome-terminal and another objects (with early we add pauses). When I using old fix, the speech sinthesyzer add a "." character with all paused output (now you removed this ". " breaks with src/orca/speech.py), this old method good for Espeak and gnome-speech driver. So, missing ". " break with this situation if I using gnome-speech driver and Espeak. Interesting, when I use speech-dispatcher speech system with new patch, I hear my old fix result (not affect your patch with speech-dispatcher)? The delay problem I think still have this situation. Speech-dispatcher adds a ". " sequence with output parts? I think I examine what difference with two speech output with two situation. If I see differences, I send a debug.out file, I hope help. Attila
Here the two generated pause output with gnome-speech and speech-dispatcher. I not see differences this two output. Gnome-speech pause output: generate speech results: írásvédett <orca.speech_generator.Pause instance at 0x9dc40ec> terminál <orca.speech_generator.Pause instance at 0x9dc40ec> hammera@hammera-laptop:~$ <orca.speech_generator.Pause instance at 0x9dc40ec> hammera@hammera-laptop: ~ SPEECH OUTPUT: 'írásvédett. terminál. hammera@hammera-laptop:~$ Speech-dispatcher pause output: generate speech results: írásvédett <orca.speech_generator.Pause instance at 0x99380ec> terminál <orca.speech_generator.Pause instance at 0x99380ec> hammera@hammera-laptop:~$ <orca.speech_generator.Pause instance at 0x99380ec> hammera@hammera-laptop: ~ SPEECH OUTPUT: 'írásvédett. terminál. hammera@hammera-laptop:~$ Next two comment I send two debug.out file. First the gnome-speech debug.out file, second the speech-dispatcher debug.out file. I do only one think with two debug.out file: do where am I operation with gnome-terminal, because I hear drastical difference with two speech systems. Attila
Created attachment 138512 [details] This is full debug.out, I use gnome-speech service and Espeak to test Will fix. Now I using gnome-speech speech system and Espeak, and do where am I with gnome-terminal.
Created attachment 138513 [details] Now I using speech-dispatcher when I test Will fix. Now I using speech-dispatcher speech system and Espeak, and do where am I with gnome-terminal. I hope we found why difference the speech output with gnome-speech.
There are no differences in the output. I do see, however, that there is a linebreak (\n) in the string sent to the synthesis engine. Speech dispatcher may be forcing a pause to happen when it detects a line break. (In reply to comment #51) > Now I using gnome-speech speech system and Espeak, and do where am I with > gnome-terminal. SPEECH OUTPUT: 'írásvédett. terminál. hammera@hammera-laptop:~$ . hammera@hammera-laptop: ~' (In reply to comment #52) > Now I using speech-dispatcher speech system and Espeak, and do where am I with > gnome-terminal. SPEECH OUTPUT: 'írásvédett. terminál. hammera@hammera-laptop:~$ . hammera@hammera-laptop: ~' (In reply to comment #49) > When I using old fix, the speech sinthesyzer add a "." character with all > paused output (now you removed this ". " breaks with src/orca/speech.py), this > old method good for Espeak and gnome-speech driver. So, missing ". " break with > this situation if I using gnome-speech driver and Espeak. I'm having difficulty understanding just what you're saying here. Does the new patch fix the majority of the issues you were experiencing with speech dispatcher and does it also NOT introduce any problems with gnome-speech?
Unfortunately No, the patch not solve the speech-dispatcher problem and result monotone speech when I use gnome-speech driver with long output, for example long where am I output. Attila
(In reply to comment #54) > Unfortunately No, the patch not solve the speech-dispatcher problem and result > monotone speech when I use gnome-speech driver with long output, for example > long where am I output. Do you have an example of long where am I output?
For examples: "readonly terminal hammera@hammera-laptop~ frame." Or where am I output with Thunderbird mailbox: "tree table cell [bug 585417] [mike] allow pauses to be inserted in speech output 4 of 8 columns 117 rows of 117 row tree level 1." I hope translate correct with english the second example, now I not switch english language my system. If need, I make two record how can I hear this two output when I using the old fixed speech, and how can I hear when I applyed your patch. Attila
Just the associated "SPEECH OUTPUT" lines would be all that I really need. They pretty much show what is being sent to the speech synthesis engine. You can get these by enabling debug and then doing a 'grep SPEECH' on the debug file. Thanks!
Now I tested gnome-speech driver and Espeak. Original pause fix speech outputs my prewious two examples (when I not applyed your patch): When I do where am I in gnome-terminal: SPEECH OUTPUT: 'read only.' SPEECH OUTPUT: 'terminal.' SPEECH OUTPUT: 'hammera@hammera-laptop:~$ .' SPEECH OUTPUT: 'hammera@hammera-laptop: ~' When I do where am I in Thunderbird: SPEECH OUTPUT: 'tree table.' SPEECH OUTPUT: 'cell.' SPEECH OUTPUT: 'Re: Some Karmic milestone question.' SPEECH OUTPUT: 'column 4 of 8 row 399 of 421.' SPEECH OUTPUT: 'tree level 1.' When I apply your patch, the speech outputs is following changed: When I do where am I in gnome-terminal: SPEECH OUTPUT: 'read only. terminal. hammera@hammera-laptop:~$ . hammera@hammera-laptop: ~' When I do where am I in Thunderbird: SPEECH OUTPUT: 'tree table. cell. Re: Some Karmic milestone question. column 4 of 8 row 399 of 421. tree level 1. ' I think the original first output form is better with the second output form when I using gnome-speech and Espeak, because the line breaks determining with Espeak intonation and result better intonation. But I don't known what better with speech-dispatcher. One ydea: Possible modify your patch with possible effect with speech-dispatcher only? Another ydea, but I think we impossible fix this now: Speech-dispatcher not like ". ", "? " and "! " punctuation characters with speech outputs? I write following text with gedit, and read entire document when I using speech-dispatcher, I see my long delay problem when Orca read entire document: "tree table. cell. Tree table? Cell? Tree table! Cell!" If I apply following form, I see very long delay when Orca read entire document: "Tree table. Cell. Tree table? Cell? Tree table! Cell!" If this is the problem, it is big problem, but not this bug problem I think. Possible you reproduce this problem with my steps? I hope help you. Attila
> I think the original first output form is better with the second output form > when I using gnome-speech and Espeak, because the line breaks determining with > Espeak intonation and result better intonation. Can you elaborate on what you mean by 'better'? Is it a subtle difference or is it something that makes a huge dramatical usability difference? > But I don't known what better > with speech-dispatcher. > One ydea: > Possible modify your patch with possible effect with speech-dispatcher only? This is not something I'd like to do, but we could potentially provide a setting that specifies whether pauses send queued speech to spoken immediately or just insert a ". ". > If this is the problem, it is big problem, but not this bug problem I think. > Possible you reproduce this problem with my steps? I haven't had the time to get speech dispatcher running on OpenSolaris, so I'm only able to test with gnome-speech right now. However, from all things you describe, this sounds like a speech dispatcher problem and not an Orca problem. :-(
Sorry my english when you read this comment. :-):-) Yes, the original pause fix form is makes a huge dramatical usability. So, the original speech form result very good speech intonation with speech output, equals good development version speech intonation with Orca 2.26 release speech intonation. You wroted: "This is not something I'd like to do, but we could potentially provide a setting that specifies whether pauses send queued speech to spoken immediately or just insert a ". "." Need toggle useExperimentalSpeechProsody to false, or need do a new setting with toggle this? "I haven't had the time to get speech dispatcher running on OpenSolaris, so I'm only able to test with gnome-speech right now. However, from all things you describe, this sounds like a speech dispatcher problem and not an Orca problem. :-(" Ok, I agree, thank you. Because this is the situation (speech-dispatcher bug produce this delay problem, not an Orca bug), I think not need commit your last sent patch, because original committed pause fix not produced any problem when we using gnome-speech and useExperimentalSpeechProsody value is true. I try open a bug report with this delay problem in speech-dispatcher, and hope speech-dispatcher developers fix this problem in future. So, What can I must do to fix this bug, or what can I help you? Attila
Created attachment 138830 [details] [review] Patch to add setting to specify whether pauses cause speech to be emitted immediately or not This patch adds a emitSpeechOnPauses setting (default=True) determines whether Orca sends speech to the speech synthesis engine immediately when a pause is enountered in a speech formatting string or if it should wait to process the entire string. The purpose is to try to help address the differences between gnome-speech and speech dispatcher when it comes to long delays between speech utterances.
I tested your last patch, your patch is fantastic. When I using gnome-speech driver, emitSpeechOnPauses default value is very good (true value). When I using speech-dispatcher and default value your setting, I see long delay with speech outputs, but I not surprised because you write this your git log comment. I toggle the emitSpeechOnPauses setting to false in src/orca/settings.py file, the delay with speech output is shorter. So, your patch is good, fix this problem, shorter delays with speech-dispatcher is speech-dispatcher problem (you wroted with prewious two comment. My openion: need do a checkbox with this setting in speech page, because possible easy to toggle this setting, not need the user hand modify with .orca/user-settings.py file. If we do this, this bug is fixed I think. Attila
Created attachment 138910 [details] [review] Add an "Insert pauses between important informations" checkbox to the Orca GUI preferences/speech page Will, I do a checkbox, but excuse me, I am very tired now. The problem my patch is following: When uncheck the "Insert pauses between important informations" checkbox, not toggled the "emitSpeechOnPauses" setting with new value. What can I forgot?
Created attachment 139019 [details] [review] Patch to add checkbox to UI Attila - we switched over to GtkBuilder, so your glade-based patch is no longer applicable. :-( Here's a new patch. The reason things didn't take effect is that it is necessary to add a line to the settings.py:userCustomizableSettings list. In any case, I cannot come up with any good wording for what the checkbox should be. "Break speech into chunks between pauses" is slightly better than "Insert pause between important informations", but still not quite accurate.
Will, the check box is work correct. I one interesting problem found, but I don't no sure why happen: The new checkbox label does'nt translated with hungarian language, but presents in the po/hu.po file (intltool-update hu correct put this string) following: #: ../src/orca/orca-setup.ui.h:26 msgid "Break speech into chunks between pauses" msgstr "A beszéd megállítása szünetek közben" I not found with orca-setup.ui.h file with following command in toplevel orca source directory: find -name orca-setup.ui.h When I do find -name orca-setup* command, this command only shows orca-setup.ui file. Your machine translated correct the new check box label with non english language? Attila
(In reply to comment #65) > Will, the check box is work correct. > I one interesting problem found, but I don't no sure why happen: > The new checkbox label does'nt translated with hungarian language, but presents > in the po/hu.po file (intltool-update hu correct put this string) following: > #: ../src/orca/orca-setup.ui.h:26 > msgid "Break speech into chunks between pauses" > msgstr "A beszéd megállítása szünetek közben" I believe this is bug #589362.
Ok, I think we done this bug, I not found any problem if you agree this. Thank you your hard work with this whole bug fix.
Created attachment 139073 [details] [review] Patch that was committed (added mnemonic and note for translators) Thanks Attila! I think we can close this bug now.