Speak titles rather then spell

Forum for TextAloud version 3

Moderator: Jim Bretti

Post Reply
john.goley
Posts: 10
Joined: Sun Dec 11, 2011 5:07 pm
Contact:

Speak titles rather then spell

Post by john.goley »

Many books or articles have chapter titles or the first few words of the chapter in all caps. For example; "I AM ..." is said "I A.M...." rather than "I am..." or "ON THAT DAY....." is said "O.N. that day..." rather than "On that day..."

I know there is a regex expression that can fix this, because I have seen it on this forum and used it in the past, but.... I have searched for it 6 ways to Sunday and cannot find it.

Any help?

John
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Speak titles rather then spell

Post by Jim Bretti »

Hi John

It sounds like you're looking for something to convert upper case text to lower case. One thing you can do is create a pronunciation dictionary entry that uses a regular expression to match uppercase words of a given length. Then, specify the "Pronounce As" dropdown to "Respel", and in the respell field, use a special function to convert text to lower case.

Just for example, we'll assume hear that you want to convert upper case words between 2 and 4 characters long (you can set this however you like)

For the Regular expression, use this:

(?<=\b)[A-Z]{2,4}(?=\b)

For the Respell field, use:

##lowercase($0)

You should also select the "Case Sensitive" checkbox.

The regular expression matches all upper case words between 2 and 4 characters in length. Lookbehinds and lookaheads are used in the expression to ensure that word boundary characters (\b) occur before and after the matched text.

Let me know if you have questions or have trouble getting this to work.
Jim Bretti
NextUp.com
Post Reply