[Freeswitch-svn] [commit] r8819 - freeswitch/trunk/src/mod/say/mod_say_zh
Freeswitch SVN
mikej at freeswitch.org
Mon Jun 23 12:00:44 EDT 2008
Author: mikej
Date: Mon Jun 23 12:00:44 2008
New Revision: 8819
Modified:
freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c
Log:
update zh say module to implement some special rules (MODLANG-64)
Modified: freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c (original)
+++ freeswitch/trunk/src/mod/say/mod_say_zh/mod_say_zh.c Mon Jun 23 12:00:44 2008
@@ -315,7 +315,15 @@
}
if (hours) {
- say_num(hours, SSM_PRONOUNCED);
+
+ if (hours == 2)
+ {
+ say_file("time/specialtwo.wav");
+ }
+ else
+ {
+ say_num(hours, SSM_PRONOUNCED);
+ }
if (hours == 1) {
say_file("time/hour.wav");
} else {
@@ -375,12 +383,16 @@
}
if (say_date) {
- say_file("time/day-%d.wav", tm.tm_wday);
+ say_num(tm.tm_year + 1900, SSM_ITERATED);
+ say_file("time/year.wav");
say_file("time/mon-%d.wav", tm.tm_mon);
- say_num(tm.tm_mday, SSM_COUNTED);
- say_num(tm.tm_year + 1900, SSM_PRONOUNCED);
+ say_num(tm.tm_mday, SSM_PRONOUNCED);
+ say_file("time/day.wav");
+ say_file("time/day-%d.wav", tm.tm_wday);
+
}
+
if (say_time) {
int32_t hour = tm.tm_hour, pm = 0;
@@ -394,18 +406,14 @@
pm = 0;
}
- say_num(hour, SSM_PRONOUNCED);
+ say_file("time/%s.wav", pm ? "p-m" : "a-m");
- if (tm.tm_min > 9) {
- say_num(tm.tm_min, SSM_PRONOUNCED);
- } else if (tm.tm_min) {
- say_file("time/oh.wav");
- say_num(tm.tm_min, SSM_PRONOUNCED);
- } else {
- say_file("time/oclock.wav");
- }
+ say_num(hour, SSM_PRONOUNCED);
+ say_file("time/clock-hour.wav");
+ say_num(tm.tm_min, SSM_PRONOUNCED);
+ say_file("time/clock-minute.wav");
- say_file("time/%s.wav", pm ? "p-m" : "a-m");
+
}
return SWITCH_STATUS_SUCCESS;
More information about the Freeswitch-svn
mailing list