Manual control of pronunciation....

Forum for TextAloud version 3

Moderator: Jim Bretti

Post Reply
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Manual control of pronunciation....

Post by nextupUser »

Is there any way to manually control the way a particular word is pronounced in a sentence? For example, with the Julie voice, sometimes it might be nice to use a "Hey!" instead of typical boring "Hey". However, if you use "Hey!" in the middle of a sentence, you get a nasty pause at the end.

"Oh hey how's it going?"

"Oh hey! <pause here, I would like to remove it :( > how's it going?"

There are other cases where two words can have very different pronunciations depending on where they exist in the sentence. I would love to be able to pick the pronunciation that sounds best (the software USUALLY picks the best sounding version, but not always).

Thanks in advance
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Manual control of pronunciation....

Post by Jim Bretti »

My guess is that in this case, the voice may be inserting a pause after the exclamation point. If you have any pronunciation dictionary entries defined that insert pauses, you might try disabling your pronunciation dictionaries just as a test.

If this is really happening at the voice level I don't know of anything we can do in TextAloud to control it.
Jim Bretti
NextUp.com
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

In an ideal world, It seems like the most elegant solution would be to have a tag (like <pause 15ms> or <pause 0ms>) that you could insert between words in TextAloud. That way, users would have direct control over the rhythm of sentences (for times when the auto generated pacing is a bit off). I guess that is not currently possible :( ?

But I don't quite understand your instructions, where do you want me to look again? I am pretty sure I have some global setting turned on that auto inserts pauses at the end of sentences (I actually like that feature), are you suggesting I turn that off? That would cause ALL of my sentences to lose their pauses though (something I can't afford to do).
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Manual control of pronunciation....

Post by Jim Bretti »

I don't think the problem is related to automatic pauses inserted by TextAloud. Just to test, you can try turning them off though. Automatic pauses inserted at the end of sentences key on the first character of the next word. Automatic pauses at end of sentences should only be inserted if the word following the period / question mark / exclamation point begins with an upper case character.

The thing I was wondering about in my previous post was the pronunciation dictionary (Tools -> Pronunciation Dictionary Maintenance). Some users use pronunciation dictionaries for inserting pauses, but if you're not doing that there is no need to check it.

The voice engines use logic of their own (beyond the control of TextAloud) to insert some of these pauses. So basically if the voice you're using is pausing at exclamation points I don't know of any way to prevent it.
Jim Bretti
NextUp.com
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

Hmm well I went to 'Tools->Pauses and text insertion' and removed the pause after sentences entry, but I still get pauses between sentences (just normal sentences). Is there some other setting I need to change in order to remove the auto pauses at the end of sentences? I am also noticing that some sentences generate pauses, while others don't. For example...

I am testing the pause. did you hear it? <there IS a 1 second pause after 'pause'. Even though 'did' is lower case>

This is a test sentence. did you hear it? <there is NOT a pause after the word 'sentence', as you would expect>

Again I am using the Julie16 voice (although I verified the same behavior in other voices). How on earth could two sentences behave differently? And my 'Tools -> Pronunciation Dictionary Maintenance' is blank, I've never used it.
The voice engines use logic of their own (beyond the control of TextAloud) to insert some of these pauses. So basically if the voice you're using is pausing at exclamation points I don't know of any way to prevent it.
You're talking about the raw source voices/words? Why on earth would anyone manually put silence onto the end of a word? That just seems like a horrible horrible design decision. The engine that ultimately strings the words together (that's TextAloud I assume?) can generate silence/pauses on its own. Why corrupt your own data with unnecessary pauses if you don't need to? We should give NeoSpeech more credit than that, right?...
PHenry1026
Posts: 231
Joined: Thu Jan 11, 2007 12:10 pm
Contact:

Re: Manual control of pronunciation....

Post by PHenry1026 »

Greetings,

You can try the following regex and respell:

(?#hey!)(?m)(?<=^|\s|['"‘“(]|\p{Pi}|\p{Ps}|\p{Pd})hey!(?!\s*?\r\n)(?= +(?-i)[a-z])

hey,

I don't have Julia but I tested it with AT&T Mike and it works. You can lessen the pause by removing the comma from the respell hey; however to me it sounds better with the comma in the respell.

I tested the above regex on the following sentences:

Oh hey! how's it going? Dont say hey! I don't like it. Don't say hey! anymore; Say hey!

In an ideal world, It seems like the most elegant solution would be to have a tag .

Percy Henry.
http://ReadTAClearly.com
Last edited by PHenry1026 on Wed Apr 11, 2012 1:47 am, edited 1 time in total.
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Manual control of pronunciation....

Post by Jim Bretti »

NextUpUser,

On your questions about these two sentences:
I am testing the pause. did you hear it? <there IS a 1 second pause after 'pause'. Even though 'did' is lower case>
This is a test sentence. did you hear it? <there is NOT a pause after the word 'sentence', as you would expect>
If you turn off *all* options in TextAloud that control pronunciation, the speech engine still analyzes sentences, and determines when to raise/lower pitch, pause at punctuation, etc. Controlling the voices at this level is not possible from TextAloud. The TextAloud pronunciation dictionaries work because they cause TextAloud to modify the text passed to the voice engine. Pause control in TextAloud can be used to insert pauses, but again, this works by inserting pause tags in the text. It does not change the underlying logic used by the voice engine.

As Percy mentioned, about the only control we have in this kind of situation is to have TextAloud replace the exclamation points with something else. This may help with the unwanted pauses, but unfortunately I don't know of any alternatives for forcing your Julie voice to add emphasis.
Jim Bretti
NextUp.com
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

@PHenry1026

Wait, where do I paste that monster line of syntax?

"(?#hey!)(?m)(?<=^|\s|['"‘“(]|\p{Pi}|\p{Ps}|\p{Pd})hey!(?!\s*?\r\n)(?= +(?-i)[a-z])" goes where? And where did you find the documentation for all these commands?
Controlling the voices at this level is not possible from TextAloud
Surgically replacing the pronunciation of one single word, without effecting the rest of the sentence, doesn't seem like that unreasonable of a request.. there must be SOME way to do this?
PHenry1026
Posts: 231
Joined: Thu Jan 11, 2007 12:10 pm
Contact:

Re: Manual control of pronunciation....

Post by PHenry1026 »

See the following post on entering a regular expression in TextAloud: http://www.nextup.com/phpBB2/viewtopic. ... 302#p14652

I believe that Jim has some links to documentation on regular expressions.

Percy Henry
http://ReadTAClearly.com

P.S. Although the above regular expression can be generalized to handle any word ending with an exclamation, I would not recommend doing so because many words ending with exclamations are interjections such as shhh! and sound better in TextAloud when the respell is an audio file.
Last edited by PHenry1026 on Wed Apr 11, 2012 1:47 am, edited 1 time in total.
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Manual control of pronunciation....

Post by Jim Bretti »

There are plenty of places on the web to find documentation on regular expressions, one good one I know of is at http://www.regular-expressions.info/.

In this case, I think I'd recommend starting with a dictionary entry that is very simple, and editing the entry as needed. The simplest thing you can do is use a simple text match instead of a regular expression, like this:

Text Matching: Simple Text
hey!

Pronounce Using: Respell
hey,

The problem with using a simple text match instead of a regular expression is that it does not include a condition requiring the next word to start with a lower case letter. So the pronunciation correction will be applied even if "hey!" is really the end of a sentence.

If you want to use a regular expression, you could start with something simpler, and as needed, gradually build up to the more powerful expression Percy gave. You could start with this:

Text Matching: Regular Expression
(?<=\b)hey!(?= +(?-i)[a-z])

Pronounce Using: Respell
hey,

This regular expression is looking for the text "hey!", and requires a word boundary character (\b) to precede the word. The expression also requires one or more spaces, then a lower case letter to follow the word. You can always update the expression for cases it does not handle.

I think I'd start with the simple text match, see how it works out, and move on to regular expressions if needed.
Jim Bretti
NextUp.com
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

Haven't had a ton of time to play with this, but not having much luck so far :( . If anyone can confirm that they have been able to successfully get the julie voice (or any voice with expressions) to use a expressive version of a word without effecting the rest of the sentence, please let me know!
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

Well I have been playing around with the regular expressions (thanks for all the tips) but unfortunately I cant seem to get any results that I couldn't already get with simple text match/replace. I still find it hard to believe that there is no way to control the pause in between words. Is the pause after the word "Hey!" really embedded in the voice sample itself (the actress said Hey!, then paused for a half second of silence before stopping the recording)? That just cant be... TextAloud has to be the one adding the pause before it begins playing the next word in the sentence, right?

This seems like such a fundamental part of any tts reader software. There are a million cases where a slight tempo shift between words can make the difference between natural and robotic sounding speech. Gahh why is there no <pause 10ms> or <pause 0ms> tag in TextAloud!?
PHenry1026
Posts: 231
Joined: Thu Jan 11, 2007 12:10 pm
Contact:

Re: Manual control of pronunciation....

Post by PHenry1026 »

I would be nice and courteous of you to show the "simple text match/replace" that you have been using that do as good a job as the other regular expressions your fellow users were kind enough to provide above, to try to help you out.

;) Percy
http://ReadTAClearly.com
Last edited by PHenry1026 on Wed Apr 11, 2012 1:48 am, edited 1 time in total.
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

Jim posted a example above
In this case, I think I'd recommend starting with a dictionary entry that is very simple, and editing the entry as needed. The simplest thing you can do is use a simple text match instead of a regular expression, like this:

Text Matching: Simple Text
hey!

Pronounce Using: Respell
hey,
Just a simple dictionary entry that replaces one word with another. Problem is, it does nothing for pauses/tempo.
PHenry1026
Posts: 231
Joined: Thu Jan 11, 2007 12:10 pm
Contact:

Re: Manual control of pronunciation....

Post by PHenry1026 »

Just as I thought.

;) Percy
http://ReadTAClearly.com
Last edited by PHenry1026 on Wed Apr 11, 2012 1:48 am, edited 1 time in total.
nextupUser
Posts: 14
Joined: Fri Sep 23, 2011 4:00 pm
Contact:

Re: Manual control of pronunciation....

Post by nextupUser »

Is anyone aware of any other reader programs that work with neo speech voices? Seems like thats my only option at this point :( .
Post Reply