Please post your changes to jira.

/b

On Jul 26, 2009, at 9:25 AM, Diego Toro wrote:

Hi all,

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 example, number 100 in english is one-hundred and 500 is five- hundred but in spanish that is not right way.

Audio files neccesaries (included in phrase_es.xml):
 veinti.wav
 100.wav
 500.wav
 700.wav
 900.wav
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:

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)
{
 if (a) {
  switch(a) {
   case 1:
 if (b || c) {
              say_file("digits/hundred.wav");
           } else {
              say_file("digits/100.wav");
              }

          break;
   case 5:
 say_file("digits/500.wav");

 break;
   case 7:
 say_file("digits/700.wav");
        break;
   case 9:
 say_file("digits/900.wav");
        break;
   default:
 say_file("digits/%d.wav", a);
        say_file("digits/hundred.wav");
 break;
    }
  }

 if (b) {
   if (b > 1) {
     switch (b) {
      case 2:  if (c) {
                say_file("digits/veinti.wav");
                } else {
                  say_file("digits/20.wav");
                 }
           break;
      default:
  say_file("digits/%d0.wav", b);
                if (c)
 {
                  say_file("currency/and.wav");
                 }
           break;
        }
     } else {
         say_file("digits/%d%d.wav", b, c);
 c = 0;
      }
   }
 if (c) {
   if (method == SSM_COUNTED) {
    say_file("digits/h-%d.wav", c);
  } else {
     say_file("digits/%d.wav", c);
    }
 }
 if (what && (a || b || c)) {
   say_file(what);
  }
 return SWITCH_STATUS_SUCCESS;
}


any suggestion is welcome

Diego Toro

_______________________________________________
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

_______________________________________________
FreeSWITCH-dev mailing list
[email protected]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
http://www.freeswitch.org

Reply via email to