<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Please post your changes to jira.<div><br></div><div>/b</div><div><br><div><div>On Jul 26, 2009, at 9:25 AM, Diego Toro wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><div>Hi all,</div> <div> </div> <div>This code support currency and number pronounced in spanish, there are new files so that to pronounce numbers in spanish is different to english, for <br>example, number 100 in english is one-hundred and 500 is five-hundred but in spanish that is not right way.</div> <div> </div> <div>Audio files neccesaries (included in phrase_es.xml):<br> veinti.wav<br> 100.wav<br> 500.wav <br> 700.wav<br> 900.wav<br>I changed code on mod_say_es.c and switch_status_t play_group method to improve support for pronouncing currency and number, this is new code:<br> <br>static switch_status_t play_group(switch_say_method_t method, int a, int b, int c, char *what, switch_core_session_t *session,switch_input_args_t *args)<br>{<br> if (a) {<br> switch(a) {<br> case 1:<br> if (b || c) {<br> say_file("digits/hundred.wav");<br> } else {<br> say_file("digits/100.wav");<br> }<br> <br> break;<br> case 5:<br> say_file("digits/500.wav");<br> <br> break;<br> case 7:<br> say_file("digits/700.wav");<br> break;<br> case 9:<br> say_file("digits/900.wav");<br> break;<br> default:<br> say_file("digits/%d.wav", a);<br> say_file("digits/hundred.wav");<br> break;<br> }<br> }<br> <br> if (b) {<br> if (b > 1) {<br> switch (b) {<br> case 2: if (c) {<br> say_file("digits/veinti.wav");<br> } else {<br> say_file("digits/20.wav");<br> }<br> break;<br> default:<br> say_file("digits/%d0.wav", b);<br> if (c)<br> {<br> say_file("currency/and.wav"); <br> }<br> break;<br> }<br> } else {<br> say_file("digits/%d%d.wav", b, c);<br> c = 0;<br> }<br> }<br> if (c) {<br> if (method == SSM_COUNTED) {<br> say_file("digits/h-%d.wav", c);<br> } else {<br> say_file("digits/%d.wav", c);<br> }<br> }<br> if (what && (a || b || c)) {<br> say_file(what);<br> }<br> return SWITCH_STATUS_SUCCESS;<br>}<br> </div> <div> </div> <div>any suggestion is welcome</div> <div> </div> <div>Diego Toro<br></div></td></tr></tbody></table><br> _______________________________________________<br>FreeSWITCH-dev mailing list<br><a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>