Re: NVDA pronouncing "no" as "number" with some widgets but only with Microsoft synthesizers


Luke Davis
 

slugolicious and others interested

Solved as follows...

In my testing with notepad, with MS voices, I was able to get the "no" as "number" behavior, only when there really was a number after it.
"no. 1"
"no 1"
"no 1"
All spoke as "number 1", while "no", with or without period, in any other usages, spoke as "no".
Presumptuous, but implemented intelligently.

So then I took slugolicious's actual original test case, and ran that in Firefox.

I was able to replicate the dropdown behavior, where "no" is stated as "number". Looking at the NVDA debug log, it is clear why this is happening: in certain contexts, the number of options is announced as "2 of 2" or similar. What is being sent to the synth is "no 2 of 2", which in any other circumstance should be spoken as "number 2" a vast majority of the time.

Further, since there seems to always be two spaces placed between the word and its option position whether there are 2, 99, or 110 options (I tested), we can fix this with a rather narrow regular expression.

Using a speech dictionary specifically for Microsoft David, I did a case-insensitive regular expression as follows:

Pattern: \Ano(?= \d)
Replacement: know

Note the double space inside the parenthesized portion of the expression.

All "no" as "number" cases still work, except the very particular case of the word "no", followed by two spaces, followed by a digit, which is now pronounced as "no" not "number".
(Actually it's pronounced as "know", which in English is the same thing.)

Hth

Luke

Join nvda@nvda.groups.io to automatically receive all group messages.