Page 1 of 1

not reading pound sign properly

Posted: Thu Oct 20, 2016 12:28 pm
by smcdonaldwfh
Hi

Can someone help me get textaloud to read currency properly, it reads the dollar sign($) ok but the £10 counds out as 0.

An explanation in simple terms would be appreciated.

Regards
:cry:

Re: not reading pound sign properly

Posted: Thu Oct 20, 2016 1:39 pm
by Jim Bretti
You should be able to solve this problem using TextAloud's Pronunciation Dictionary Maintenance. From the TextAloud main menu, click Tools -> Text Processing -> Pronunciation Dictionary Maintenance.

We'll make this very simple to start with, we can adjust later if need to handle different number formats. For now, create a new dictionary entry and configure it like this:

Set the Text Matching dropdown to "Regular Expression", and use this as the regular expression:
£(\d+)

Then set Pronounce Using to "Respell", and use this as the respelling:
$1 pounds

If you're not familiar with regular expressions it is a text pattern matching language. In this case, the regular expression £(\d+) matches any text that begins with £ and is followed by one or more digits. In the respell field, $1 corresponds to the text matched by the first pair of parentheses in the expression (the digits following the currency symbol).

That should handle this particular case. If you need more help just post again. There is a very good reference on regular expressions at http://www.regular-expressions.info.