Inserting pauses after periods and two blank spaces

Forum for TextAloud version 3

Moderator: Jim Bretti

Post Reply
starrmark
Posts: 6
Joined: Sat Jun 13, 2015 4:01 pm
Contact:

Inserting pauses after periods and two blank spaces

Post by starrmark »

I would like to insert long pauses at the end of each sentence--but not after every period followed by 1 space, as appears in initials and abbreviations. The period at the end of a sentence is supposed to be followed by two blank spaces. So I would like to lengthen permanently all of the pauses that occur only after a period and two blank spaces.

However, TOOLS>TEXT PROCESSING>PAUSES AND TEXT INSERTIONS does not have a selection that will enable me to do that. Nor does it have the capability whereby I can create and define a new default for pauses. It only allows me to lengthen the pause at a period followed by one blank space. And unfortunately, that affects all initials and abbreviations. I do not want to enter pauses manually at the end of every sentence in a document.

How can I lengthen pauses after every period followed by two blank spaces in every document?
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Inserting pauses after periods and two blank spaces

Post by Jim Bretti »

You could create a TextAloud pronunciation dictionary entry to do this. Here is one way to do it. Under the TextAloud Tools menu, click Text Processing -> Pronunciation Dictionary Maintenance. Create a new entry. For the Text Matching dropdown, select Regular Expression, and for the expression use this:

[.?!]\p{Zs}{2,}

Then, for the Pronounce Using dropdown, select Respell, and use this as the 'respelling':

$0 {{Pause=1}}

The dictionary entry will look for end of sentence punctuation (period, question mark, exclamation mark) followed by two or more spaces. In the respell field, $0 just represents the matched text, and we're manually adding a pause tag.

Let me know if that doesn't help.
Jim Bretti
NextUp.com
starrmark
Posts: 6
Joined: Sat Jun 13, 2015 4:01 pm
Contact:

Re: Inserting pauses after periods and two blank spaces

Post by starrmark »

Hello Jim

Many thanks for your reply.

Your work-around works well--but it's not perfect. It works well for adding pauses after a period or exclamation point or question mark followed by two empty spaces. And it does avoid adding pauses after initials and abbreviations.

However, it does not add pauses after a period or exclamation point or question mark followed by a close-quote, or a close-parenthesis, or a close-bracket, or a close-brace, followed by two blank spaces. Also, it does not add pauses after periods (etc.) followed by footnotes followed by two blank spaces.

Perhaps one day you might add an option to TOOLS that would select all of these ends-of-sentences (but not abbreviations or initials.)

MS
PHenry1026
Posts: 231
Joined: Thu Jan 11, 2007 12:10 pm
Contact:

Re: Inserting pauses after periods and two blank spaces

Post by PHenry1026 »

MS

Jim answered your query perfectly. The problem is that your request was poorly structured.

In the future, it might be a good idea to list all the possibilities you are requesting help for.
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Inserting pauses after periods and two blank spaces

Post by Jim Bretti »

Hi MS,

This is one of those cases where there are lots of ways to write the regular expression. You just need to keep tweaking the expression until it works.

I think this expression should handle most of the cases you mentioned:

[.?!][\p{Cc}\p{Pe}'"]?\p{Zs}{2,}

There is some pretty good documentation at http://www.regular-expressions.info/unicode.html on using the \p{} Unicode categories.

We'll look at handling this better from the Tools menu also.
Jim Bretti
NextUp.com
Post Reply