default speech dictionary, as and American Samoa


P.Stephen Hoad
 

Good Day!
While I read a news story today, I came across this sentence:
"Firefighters located a 3- to 4-acre woods fire threatening several
structures at 763 Bunker Hill Road as well as a self-storage facility
at 784 Bunker Hill Road."

within the news story the first as reads correctly but the 2nd as
reads "American Samoa". I have attempted, in vain, to deal with this
problem within the default speech dictionary with no resulting fix. I
created 2 entries, they are:
#1. pattern: AS. Replacement: American Samoa. case: (i have tried both
on and off). type: anywhere.
and #2: pattern: as. Replacement: as. Case: off. type: anywhere.
Except for the capitalization of as, all punctuation here was simply
to make reading this Email read more sensibly.
I know I've done something that doesn't work, is there a solution I'm missing?
Thank You:
Steve Hoad


Gene
 

Did you place the entries in the dictionary at the same time or whenever you did, are they both still there?  Remove the American Samoa one, which is not correct.  That entry tells NVDA to say American Samoa when it sees as.  You placed American Samoa in the pronounced as field, if you did what you wrote you did.  Leave the as pronounced as as entry and see what happens. 
 
If that doesn’t work remove it.  Then try an entry with American Samoa in the pattern field and the word as in the pronounced as field.  You will never hear American Samoa spoken properly if you do this, it will be pronounced as as.  You’ll have to see if that solves the problem regarding how your synthesizer itself is programmed to pronounce it.
 
Gene

-----Original Message-----
Sent: Friday, May 07, 2021 5:56 AM
Subject: [nvda] default speech dictionary, as and American Samoa
 
Good Day!
While I read a news story today, I came across this sentence:
"Firefighters located a 3- to 4-acre woods fire threatening several
structures at 763 Bunker Hill Road as well as a self-storage facility
at 784 Bunker Hill Road."

within the news story the first as reads correctly but the 2nd as
reads "American Samoa". I have attempted, in vain, to deal with this
problem within the default speech dictionary with no resulting fix.  I
created 2 entries, they are:
#1. pattern: AS. Replacement: American Samoa. case: (i have tried both
on and off). type: anywhere.
and #2: pattern: as. Replacement: as. Case: off. type: anywhere.
Except for the capitalization of as, all punctuation here was simply
to make reading this Email read more sensibly.
I know I've done something that doesn't work, is there a solution I'm missing?
Thank You:
  Steve Hoad





 

This sort of thing is virtually always an issue with the synth, so it would be worth reporting to the synth maker with your example text, too.

That being said, two things:

1. I'd use the voice dictionary.

2. Make the matching string "as well as" then try something like "as well As" or "as well az" (or perhaps azz) for the replacement.
    You might also try something as simple as "as" for the match and "As" for the replacement and see if that fixes it.

I had a similar experience with one voice saying "cup" as "Cuban Pesos" when it was used in recipes in an ingredient list.  Just the simple replacement of lowercase "cup" with the capitalized "Cup" fixed the issue.
--

Brian - Windows 10 Pro, 64-Bit, Version 20H2, Build 19042  

Always remember others may hate you but those who hate you don't win unless you hate them.  And then you destroy yourself.

       ~ Richard M. Nixon

 


Patrick Le Baudour
 

Hi,

I tried to narrow down the thing, seems it need a number, and a word like street, road, hill are needed to match.
based on the first one, I tried the pattern
(\d+)([^0-9,]+\sas\s)
replacing by
\1, \2
in regular expression mode, it seems to work.

-- Patrick

Le 07/05/2021 à 12:56, P.Stephen Hoad a écrit :
Good Day!
While I read a news story today, I came across this sentence:
"Firefighters located a 3- to 4-acre woods fire threatening several
structures at 763 Bunker Hill Road as well as a self-storage facility
at 784 Bunker Hill Road."
within the news story the first as reads correctly but the 2nd as
reads "American Samoa". I have attempted, in vain, to deal with this
problem within the default speech dictionary with no resulting fix. I
created 2 entries, they are:
#1. pattern: AS. Replacement: American Samoa. case: (i have tried both
on and off). type: anywhere.
and #2: pattern: as. Replacement: as. Case: off. type: anywhere.
Except for the capitalization of as, all punctuation here was simply
to make reading this Email read more sensibly.
I know I've done something that doesn't work, is there a solution I'm missing?
Thank You:
Steve Hoad


 

On Fri, May 7, 2021 at 11:13 AM, Patrick Le Baudour wrote:
I tried to narrow down the thing, seems it need a number, and a word like street, road, hill are needed to match.
-
But since it's the second "as" in the phrase "as well as" that's the problem, and the original text was, "at 763 Bunker Hill Road as well as" I'm not quite sure how that regex would help.  It seems to capture the part, "763 Bunker Hill Road as", which is not the problem "as" in this case.
--

Brian - Windows 10 Pro, 64-Bit, Version 20H2, Build 19042  

Always remember others may hate you but those who hate you don't win unless you hate them.  And then you destroy yourself.

       ~ Richard M. Nixon

 


Patrick Le Baudour
 

Regular expressions capture the largest possible match by default, this is probably also the reason only the second as is affected by that problem

-- Patrick

Le 07/05/2021 à 17:20, Brian Vogel a écrit :
On Fri, May 7, 2021 at 11:13 AM, Patrick Le Baudour wrote:
I tried to narrow down the thing, seems it need a number, and a word
like street, road, hill are needed to match.
-
But since it's the second "as" in the phrase "as well as" that's the problem, and the original text was, "at 763 Bunker Hill Road as well as" I'm not quite sure how that regex would help.  It seems to capture the part, "763 Bunker Hill Road as", which is not the problem "as" in this case.
--
Brian -Windows 10 Pro, 64-Bit, Version 20H2, Build 19042
/Always remember others may hate you but those who hate you don't win unless you hate them.  And then you destroy yourself./
       ~ Richard M. Nixon


 

On Fri, May 7, 2021 at 11:32 AM, Patrick Le Baudour wrote:
Regular expressions capture the largest possible match by default
-
Patrick, I understand how regexes work, but I don't see how yours would capture anything beyond the address followed by the first as, nor how that would likely solve the issue at hand.  But we also lack data about the voice being used, and that's the most likely root of the problem.  I guess it could by splitting that original "as" off from the "well as," but one would still have to know the voice being used to be sure.

I've had to do the same sort of thing as you're proposing for the odd synth that decides to screw up a word as an abbreviation in the very occasional context.

In this case, though, I'd definitely try just matching "as" and substituting "As" and seeing if that does it.  I've had luck with that simple technique on several occasions where two or three letter words which have a meaning as abbreviations get announced as the expansion for the abbreviation when that's not what they actually are in context.

I dread to think about the amount of context processing that has to occur by synths to decide exactly how to pronounce certain things depending on exactly where they are and what surrounds them!
--

Brian - Windows 10 Pro, 64-Bit, Version 20H2, Build 19042  

Always remember others may hate you but those who hate you don't win unless you hate them.  And then you destroy yourself.

       ~ Richard M. Nixon

 


Patrick Le Baudour
 

well, i got the same american samoa replacement with one core zara, and tested before posting., it did solve it.
after checking other voices, same thing with one core marc, , sapi5 zira and david. British voices don't have the problem in the first place, so I would assume only american voices are affected.

switching caps did not work here, nor could I think of a same sounding replacement for as, so i haven't got any simpler solution coming to mind
-- Patrick


Gene
 

I have no idea why this behavior occurs in the first place.  it isn’t logical.  As isn’t capitalized and there is no period after it so it isn’t an abbreviation.  It makes no sense for one as to be spoken one way and an identical as following soon after to be spoken a different way.  This sounds like a programming error or bug that, as Brian suggested, would be a good idea to report.
       
As for the speech dictionary, I don’t know how the voice you are using will react, but I just tested my suggestion.  My synthesizer says St. Ives as saint Ives.  If I create a dictionary entry with St. in the pattern field and the letters st in the pronounced as field, St. Ives is pronounced as st Ives.  As I understand the way the NVDA dictionary works, this sort of entry should work regardless of synthesizer.  As I understand it, the screen-reader sends the pronounced as text to the synthesizer so the synthesizer doesn’t even have the chance to know what the original text is that is triggering the unwanted speech. 
 
Gene   

-----Original Message-----
Sent: Friday, May 07, 2021 11:43 AM
Subject: Re: [nvda] default speech dictionary, as and American Samoa
 

well, i got the same american samoa replacement with one core zara, and
tested before posting., it did solve it.
after checking other voices, same thing with one core marc, , sapi5 zira
and david. British voices don't have the problem in the first place, so
I would assume only american voices are affected.

switching caps did not work here, nor could I think of a same sounding
replacement for as, so i haven't got any simpler solution coming to mind
-- Patrick