davidacm / NVDA-IBMTTS-Driver

This project is aimed at developing and maintaining the NVDA IBMTTS driver. IBMTTS is a synthesizer similar to Eloquence. Please send your ideas and contributions here!
GNU General Public License v2.0
56 stars 23 forks source link

Expand pause shortening functionality to include only shortening utterance boundaries #101

Closed ultrasound1372 closed 11 months ago

ultrasound1372 commented 11 months ago

Rationale

For users that don't use the complete shorten pauses setting, commit c230570 increased the amount of silence between a control and its contents, such as a list and a list item, or a dialog and the focused control inside it. For lack of a better term I call this an utterance boundary. I personally do not like how aggressive the shorten pauses setting is when reading regular text, but neither do I like the increased gap between control announcements presented by this commit. I have been maintaining a local fork with continuous rebasing so I could have the best of both worlds, but I recently realized this may have wider appeal.

Implementation

The class attribute _short_pause and the corresponding shortPause boolean driver setting have been removed, instead replaced by a new pauseMode driver setting and _pause_mode attribute. The logic for this setting was based on that used for sample rate selection so I could create a choice control. The _pause_mode attribute is an integer so as to speed up pause-related checks, using the following numeric meanings.

Notes

One or more of the pause mode descriptions may need to be revised, this was quickly thrown together and it was difficult for me to come up with properly descriptive strings. Once that is done obviously these strings will have to be handed off to translators for a future release.
At the moment, this has no compatibility loading of the old shorten pauses boolean setting, which should probably correspond to modes 0/2 for false/true. I'm unsure exactly how to implement such a thing.

Mohamed00 commented 11 months ago

Not sure about the description of the option, I'm thinking it's rather verbose in its current state. I think a better way to word it might be to describe the setting as pauses with the following options.

These would then have more detailed descriptions in readme.md.

ultrasound1372 commented 11 months ago

I did say they could use some revision, so yes I'd agree with your versions. Text rather than utterance boundary is probably easier for the average user to handle. Though I hope they won't get confused by text boundary...