[Freeswitch-users] Patch to fix italian pronunce in mod_say_it

Albano Daniele Salvatore - Lavoro info at daccii.it
Tue Nov 10 05:00:23 PST 2009


Hi,

yesterday i started to fix pronuce in mod_say_it for numbers, dates and 
times. I needed to add some sound files because these was necessary for 
a correct italian pronunce.

I've patched these three functions:
- play_group
- it_say_time
- it_say_general_count

I've diff it against revision 15396 (i've updated freeswitch tree 
yesterday morning)

Can you take a look to the patch?



# Modification to play_group function

In italian we pronunce 123 as "cento venti tre" and not "uno cento venti 
tre" so, if a is 1 just doesn't play the digit



# Modification to it_say_time

Our long date format is something like

WDAY_NAME, WDAY_NUMBER MONTH_NAME YEAR

so i converted the date pronunce to this.

I've dropped am/pm logic, because we have 24h standard, and minutes 
related logic because, we don't have it.



# Modification to it_say_general_count

I rewrote number to string conversion to make it more readable (using 
just two math operations, a module and a division) and to drop the 999 
milions limit (1*)(however more code should be changed to fully drop 
this limit).

Changes are mainly related to millions and thousands pronunce: in 
italian, if you need to say 1 milion you doesn't say "uno milione" but 
"un milione" but to say 3 millions you say "tre milioni", while for 
thousand you doesn't pronunce "un" at all.


1*: i've noticed a little bug in xx_say_money in mod_say_xx ... it get 
up to 12 digits but in xx_say_general_count manage up to 9 digits, so 
the first three digits wouldn't get never pronunced

Thank you

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mod_say_it.c.fix-pronunce.patch
Url: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091110/e68393dc/attachment-0002.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info.vcf
Type: text/x-vcard
Size: 381 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20091110/e68393dc/attachment-0002.vcf 


More information about the FreeSWITCH-users mailing list