Voice Change using a Byline

Forum for TextAloud version 3

Moderator: Jim Bretti

Voice Change using a Byline

Postby PHenry1026 » Mon Jul 02, 2012 2:03 am

Greetings:

Assuming that AT&T Mike is the default voice, the following regex changes the default voice based upon the byline it encounters:



(?#ByLine_1_LookAhead)(?m)(?=(?:.*?)\r?\n\s*?By Melissa Sanchez\s*?$)


<voice required="name = Crystal16">


<< Start of Sample Text >>

Yahoo! Breaking News Sunday, July 1, 2012, 9:26 PM PDT
By Melissa Sanchez

Mexico preliminary count: PRI's Enrique Pena Nieto wins presidency, old guard to return

<< end of Sample Text >>


The regex works on the sample text but it spells out everything up to By Melissa Sanchez, then reads the rest of text as would be expected.



A second regex (immediately below) works without spelling out the text but uses AT&T Mike up to By Melissa Sanchez, then switches to Crystal:


(?#ByLine_2_LookAhead)(?m)(?:.*?)\K(?=\r?\n\s*?By Melissa Sanchez\s*?$)


<voice required="name = Crystal16">


Is it possible to get the first regex not to spell out the text before it reaches By Melissa Sanchez?
Last edited by PHenry1026 on Sun May 12, 2013 6:00 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby Jim Bretti » Mon Jul 02, 2012 9:40 am

For some reason, the expression is matching every character, so a voice change tag is being inserted after every character. That is why the text is being spelled.

I didn't look at why the expression is behaving this way, but here is one that works:

Regular Expression:
\A(.+?)(By Melissa Sanchez)

Pronounce As:
<voice required="name = Crystal16">$0
Jim Bretti
NextUp.com
Listen and Learn Anywhere
http://www.NextUp.com
Jim Bretti
 
Posts: 1223
Joined: Wed Oct 29, 2003 11:07 am

Re: Voice Change using a Byline

Postby PHenry1026 » Mon Jul 02, 2012 12:43 pm

Hi Jim,

Thanks for the workaround regex. It works but it seems to slow the voice down . Since the expression is consuming all the text, the expression loses all the flexibility of a lookaround. It would be nice if a correction could be made to stop TA or the regex engine from inserting a voice change after each character up to By Melissa Sanchez.
Last edited by PHenry1026 on Sun May 12, 2013 6:00 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Voice Change using a Byline - Problem Solved

Postby PHenry1026 » Tue Jul 03, 2012 3:29 am

I found a modification that works, which still utilizes all the advantages of a LookAhead:


(?#ByLine_1b_LookAhead)(?m)(?=^\s*?[a-z](?:.*?)\r?\n\s*?By Melissa Sanchez\s*?$)


<voice required="name = Crystal16">



P.S. Even though the above modification fixes the glaring problem, noted above, there is still some interference with the LookAhead which is preventing the lookahead assertion from operating optimally. Also speaking is slower than normal for all the text.
Last edited by PHenry1026 on Sun May 12, 2013 6:01 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Voice Change Bug Fix Needed

Postby PHenry1026 » Thu Jul 05, 2012 12:43 pm

Greetings:

It appears that when a voice change is initiated from the respell line, it captures and/or consumes text; would be nice if this bug could be fixed.
Last edited by PHenry1026 on Sun May 12, 2013 6:02 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby Jim Bretti » Thu Jul 05, 2012 1:02 pm

Hi Percy,

I'm not following, there is nothing special I can think of about using a voice change in the respell line. I may be missing something, but the regular expression substitution code doesn't treat a voice change tag in the respell line differently than any other text.

Can you explain more what the problem is? Is this related to the lookahead expression earlier in this thread?
Jim Bretti
NextUp.com
Listen and Learn Anywhere
http://www.NextUp.com
Jim Bretti
 
Posts: 1223
Joined: Wed Oct 29, 2003 11:07 am

Re: Voice Change using a Byline

Postby PHenry1026 » Thu Jul 05, 2012 1:43 pm

Greetings Jim,

It is hard to explain by writing, since you do not have the same setup as I do. What I can do is send you two audio examples of how the text differ when Crystal is used with a voice change and when Crystal is selected directly:

(?#ByLine_US_F_LookAhead)(?m)(?=^\s*?[a-z](?:.*?)\r?\n\s*?By (?:Michelle Malkin|Maureen Dowd|Gail Collins|Margaret O['’]Brien, BizWrap columnist)\s*?$)

<voice required="name = Crystal16">

<< Start of Sample Text >>

Chicago Tribune BizWrap
By Margaret O'Brien, BizWrap columnist
July 3, 2012


--------------------------------------------------------------------------------
Stocks edge up on short day
D 12,943.82 +72.43 | N 2,976.08 +24.85 | S 1,374.01 +8.51

Stocks were higher after better-than-expected data on factory orders.
• Gains in May factory orders beat estimates

<< End of Sample Text >>

Will send you the two audio samples by email shortly.
Last edited by PHenry1026 on Sun May 12, 2013 6:03 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby PHenry1026 » Thu Jul 05, 2012 3:02 pm

Hi Jim,

Thanks for your insights which allowed me to solve the problem. Basically, if you are going to use the voice change regexes, they have to be the last regexes in all your dictionaries or they will interfere with other regexes.
Last edited by PHenry1026 on Sun May 12, 2013 6:03 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby PHenry1026 » Thu Jul 05, 2012 11:36 pm

Greetings:

Even though placing voice changing regexes last stops them from interfering with other regexes above them, it appears that my gut feelings that placing a voice change on the respell line alters how TextAloud behaves is correct. I am now encountering a situation where TextAloud is now explicitly pronouncing » when a voice change is made on the respell line but ignores » when the voice change is made normally .

(?#ByLine_UK_M_Charles)(?m)(?=^\s*?(?:The Economist Politics This Week)\s*?$)

<voice required="name = Charles16">

<< Start of Sample Text >>

The Economist Politics This Week
Thursday, July 5th 2012






Business & finance | Science & technology | Economics | Culture | Blogs | Multimedia | Newsletters



Highlights from The Economist online's Politics this week


» Mexico's election: The PRI's qualified comeback
» Venezuela's presidential campaign: Tilting the pitch
» France's public finances: François Hollande's fiscal puzzle
» The crisis in Syria: The tide begins to turn
» Violence in Kenya: The Shabab branches out
» A cultural assault in Mali: The jihadists' frightening new front
» Pakistan and America: Making up, a bit

<< End of Sample Text >>



P.S. It also seems that even after the voice change from Mike to Charles using the respell line method, TA ignores regexes that apply to Charles.
Last edited by PHenry1026 on Sun May 12, 2013 6:04 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby Jim Bretti » Fri Jul 06, 2012 3:39 pm

I have a dictionary set up with your lookahead along with a 'skip text' entry to skip the angle brackets, and it seems to be working. I'll need to take a look at a dictionary to see what is happening. Are you able to create one dictionary containing only the dictionary entries needed to duplicate the problem? If you're able to duplicate the problem with only this one dictionary active it will help me pin the problem down.

On the part about dictionary entries for Charles being ignored after the voice change, we currently do not support switching active dictionaries within an article. All dictionary processing is based on the voice assigned to the article .... voice change tags in the text do not currently alter the active dictionaries based on vendor, language, and voice. This would be a really nice feature and we hope to support it in a future release.
Jim Bretti
NextUp.com
Listen and Learn Anywhere
http://www.NextUp.com
Jim Bretti
 
Posts: 1223
Joined: Wed Oct 29, 2003 11:07 am

Re: Voice Change using a Byline

Postby PHenry1026 » Fri Jul 06, 2012 4:03 pm

Hi Jim,

I also had set up dictionaries entries that skip the angle brackets which works, but that seems like ignoring the problem. I am unable to setup a single dictionary that duplicates the problem because unlike the previous case this does not seem to be internal to my setup.
Last edited by PHenry1026 on Sun May 12, 2013 6:05 am, edited 2 times in total.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm

Re: Voice Change using a Byline

Postby Jim Bretti » Fri Jul 06, 2012 4:20 pm

Hi Percy,

I'm not following what the problem is ... if I assign Charles as the voice for your sample article, with no pronunciation dictionaries active, Charles pronounces the characters '»' as 'right double angle bracket'. So it seems I need something to filter those characters. Are you seeing something different?
Jim Bretti
NextUp.com
Listen and Learn Anywhere
http://www.NextUp.com
Jim Bretti
 
Posts: 1223
Joined: Wed Oct 29, 2003 11:07 am

Re: Voice Change using a Byline

Postby PHenry1026 » Fri Jul 06, 2012 4:54 pm

Hi Jim,

You are correct, apparently along time ago I had setup the following regex, (?#Skip »_UK)(?<=^|\s)»(?=\s|$), to ignore the right angle bracket for UK English; but since the voice change on the respell line ignores such entries, I mistakenly thought the problem arose from nowhere. When I set the new entries to ignore the right angle bracket I did not specify for UK English so that is why it works. Sorry for the confusion but it is not all my fault, some of it is due to a lack of uniformity in logic.
PHenry1026
 
Posts: 237
Joined: Thu Jan 11, 2007 12:10 pm


Return to TextAloud 3 Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron