Re: wild cards in speech dictionary


Luke Davis
 

On Fri, 10 Jul 2020, Scott Berry wrote:

I was wondering if there is a way to make a wild card speech dictionary entry.  The reason for this is that one of the many survey sites I use reads numbers like  11125 and it should be $111.25.  Thanks for the help.
Of course. That's what regular expression entries are for.
Python syntax is what NVDA uses, although you don't need all the function calls and such in this howto, just the regexp stuff: https://docs.python.org/3/howto/regex.html#regex-howto

I think in your case, if they use an 11 where they mean a dollar sign, you would want something like:

\b11([\d\.]{3,})

And the replacement:

$\1

That is quite untested though.

Also, it seems highly unlikely that they are using an 11 instead of a $. Something else is probably going on. You may need to use the log viewer to find out what is actually being sent to the synth (at input output debug level), in order to find out what you actually need to replace.

Luke

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