Mise à jour après premières vagues de gros tests
[asterisk-config-auf.git] / etc-asterisk / say.conf
CommitLineData
3802e567
MN
1;
2; language configuration
3;
4
5[general]
6mode=old ; method for playing numbers and dates
7 ; old - using asterisk core function
8 ; new - using this configuration file
9
10; The new language routines produce strings of the form
11; prefix:[format:]data
12; that are matched against the rules in this file to produce
13; an output.
14;
15; The data is generally the string to be spelled (either a number,
16; an ascii string or a date/time in the format specified below).
17; It is available, in the right hand side of a rule, as variable ${SAY}.
18;
19; The format is optional and normally used only for date/time.
20; The prefix is used to select the pronunciation - standard
21; prefixes are
22; num used for numbers
23; enum used for enumerations
24; date for dates
25; time for times
26; datetime for dates and times
27; char for character strings
28; phonetic for phonetic strings
29; digit for digit strings
30;
31; but others can be used at will.
32;
33; Processing occurs as follows:
34; If the format is empty, or there is no format, the entire
35; string is matched against one of the pattern on the left hand side.
36; On the first match, the various comma-separated components on the right
37; hand side are pronounced, as follows:
38; + a component starting with a prefix: (i.e. with a ':' in it)
39; is re-processed according to these rules;
40; + a component without a ':' in it is considered a filename and
41; the corresponding file is played.
42;
43; If the format is non-empty, the format is split into its components
44; (individual characters, or filenames in single quotes), and then
45; filenames are played, whereas single characters are used to
46; generate a new string format:pat:data to be processed.
47;
48; DATES/AND TIMES assume that the date info is available in
49; the form YYYYMMDDHHmm.ss-dow-doy
50; with 4 digits for the year, 2 for month, day, hour, minutes, seconds,
51; one digit for the day-of-week, and 3 digits for the day-of-year.
52;
53; Example:
54; datetime::200604172030.00-4-102
55; (typical format for a date) is first matched against the line
56; datetime::. => date:AdBY 'digits/at' IMp:${SAY}
57; which is normally present with the default format for dates.
58; In turn, the format string "AdBY 'digits/at' IMp" results in
59; the sequence
60; date:A:200604172030.00-4-102
61; date:d:200604172030.00-4-102
62; date:B:200604172030.00-4-102
63; date:Y:200604172030.00-4-102
64; digits/at
65; date:I:200604172030.00-4-102
66; date:M:200604172030.00-4-102
67; date:p:200604172030.00-4-102
68;
69;
70; Remember, normally X Z N are special, and the search is
71; case insensitive, so you must use [X] [N] [Z] .. if you
72; want exact match.
73
74; We start with the basic rules that might be more-or-less
75; language-independent
76
77[digit-base](!) ; base rule for digit strings
78 ; XXX incomplete yet
79 _digit:[0-9] => digits/${SAY}
80 _digit:[-] => letters/dash
81 _digit:[*] => letters/star
82 _digit:[@] => letters/at
83 _digit:[0-9]. => digit:${SAY:0:1}, digit:${SAY:1}
84
85[date-base](!) ; base rules for dates and times
86 ; the 'SAY' variable contains YYYYMMDDHHmm.ss-dow-doy
87 ; these rule map the strftime attributes.
88 _date:Y:. => num:${SAY:0:4} ; year, 19xx
89 _date:[Bbh]:. => digits/mon-$[${SAY:4:2}-1] ; month name, 0..11
90 _date:[Aa]:. => digits/day-${SAY:16:1} ; day of week
91 _date:[de]:. => num:${SAY:6:2} ; day of month
92 _date:[H]:. => digits/oh, num:${SAY:8:2} ; hour (oh one, oh two, ..., oh nine, ten, eleven, ..., twenty-three)
93 _date:[I]:. => num:$[${SAY:8:2} % 12] ; hour 0-12
94 _date:[M]:. => num:${SAY:10:2} ; minute
95 ; XXX too bad the '?' function does not remove the quotes
96 ; _date:[pP]:. => digits/$[ ${SAY:10:2} > 12 ? "p-m" :: "a-m"] ; am pm
97 _date:[pP]:. => digits/p-m ; am pm
98 _date:[S]:. => num:${SAY:13:2} ; seconds
99 _date:[Ii]:. => num:$[${SAY:8:2} % 12] ; hour 0-12
100 _date:[k]:. => num:${SAY:8:2} ; hour (one, two. three, ...,twenty three
101 _date:[m]:. => num:${SAY:4:2} ; month number
102 _date:[Q]:. => date:dby ;incompleat ; "today", "yesterday" or ABdY
103 _date:[q]:. => date:dby ;incompleat ; "" (for today), "yesterday", weekday, or ABdY
104 _date:[R]:. => date:HM${SAY} ; 24 hour time, including minute
105 _date:[T]:. => date:HMS${SAY} ; 24 hour, minure, seconds
106
107[en-base](!)
108 _[n]um:0. => num:${SAY:1}
109 _[n]um:X => digits/${SAY}
110 _[n]um:1X => digits/${SAY}
111 _[n]um:[2-9]0 => digits/${SAY}
112 _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
113 _[n]um:X00 => num:${SAY:0:1}, digits/hundred
114 _[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
115
116 _[n]um:X000 => num:${SAY:0:1}, digits/thousand
117 _[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1}
118 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
119 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
120 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
121 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
122
123 _[n]um:X000000 => num:${SAY:0:1}, digits/million
124 _[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
125 _[n]um:XX000000 => num:${SAY:0:2}, digits/million
126 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2}
127 _[n]um:XXX000000 => num:${SAY:0:3}, digits/million
128 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3}
129
130 _[n]um:X000000000 => num:${SAY:0:1}, digits/billion
131 _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1}
132 _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion
133 _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2}
134 _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion
135 _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3}
136
137 ; enumeration
138 _e[n]um:X => digits/h-${SAY}
139 _e[n]um:1X => digits/h-${SAY}
140 _e[n]um:[2-9]0 => digits/h-${SAY}
141 _e[n]um:[2-9][1-9] => num:${SAY:0:1}0, digits/h-${SAY:1}
142 _e[n]um:[1-9]00 => num:${SAY:0:1}, digits/h-hundred
143 _e[n]um:[1-9]XX => num:${SAY:0:1}, digits/h-hundred, enum:${SAY:1}
144
145[en_GB](date-base,digit-base,en-base)
146 _[n]um:XXX => num:${SAY:0:1}, digits/hundred, vm-and, num:${SAY:1}
147
148[it](digit-base,date-base)
149 _[n]um:0. => num:${SAY:1}
150 _[n]um:X => digits/${SAY}
151 _[n]um:1X => digits/${SAY}
152 _[n]um:[2-9]0 => digits/${SAY}
153 _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
154 _[n]um:100 => digits/hundred
155 _[n]um:1XX => digits/hundred, num:${SAY:1}
156 _[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred
157 _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
158
159 _[n]um:1000 => digits/thousand
160 _[n]um:1XXX => digits/thousand, num:${SAY:1}
161 _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousands
162 _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousands, num:${SAY:1}
163 _[n]um:XX000 => num:${SAY:0:2}, digits/thousands
164 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousands, num:${SAY:2}
165 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousands
166 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousands, num:${SAY:3}
167
168 _[n]um:1000000 => num:${SAY:0:1}, digits/million
169 _[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
170 _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/millions
171 _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1}
172 _[n]um:XX000000 => num:${SAY:0:2}, digits/millions
173 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
174 _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions
175 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
176
177 _[n]um:X000000000 => num:${SAY:0:1}, digits/billion
178 _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1}
179 _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion
180 _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2}
181 _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion
182 _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3}
183
184 _datetime::. => date:AdBY 'digits/at' IMp:${SAY}
185 _date::. => date:AdBY:${SAY}
186 _time::. => date:IMp:${SAY}
187
188[en](en-base,date-base,digit-base)
189 _datetime::. => date:AdBY 'digits/at' IMp:${SAY}
190 _date::. => date:AdBY:${SAY}
191 _time::. => date:IMp:${SAY}
192
193[de](date-base,digit-base)
194 _[n]um:0. => num:${SAY:1}
195 _[n]um:X => digits/${SAY}
196 _[n]um:1X => digits/${SAY}
197 _[n]um:[2-9]0 => digits/${SAY}
198 _[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0
199 _[n]um:100 => digits/ein, digits/hundred
200 _[n]um:1XX => digits/ein, digits/hundred, num:${SAY:1}
201 _[n]um:[2-9]00 => digits/${SAY:0:1}, digits/hundred
202 _[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1}
203
204 _[n]um:1000 => digits/ein, digits/thousand
205 _[n]um:1XXX => digits/ein, digits/thousand, num:${SAY:1}
206 _[n]um:[2-9]000 => digits/${SAY:0:1}, digits/thousand
207 _[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1}
208 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
209 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
210 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
211 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:1}
212
213 _[n]um:1000000 => digits/eine, digits/million
214 _[n]um:1XXXXXX => digits/eine, digits/million, num:${SAY:1}
215 _[n]um:[2-9]000000 => digits/${SAY:0:1}, digits/millions
216 _[n]um:[2-9]XXXXXX => digits/${SAY:0:1}, digits/millions, num:${SAY:1}
217 _[n]um:XX000000 => num:${SAY:0:2}, digits/millions
218 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
219 _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions
220 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
221
222 _datetime::. => date:AdBY 'digits/at' IMp:${SAY}
223 _date::. => date:AdBY:${SAY}
224 _time::. => date:IMp:${SAY}
225
226[hu](digit-base,date-base)
227 _[n]um:0. => num:${SAY:1}
228 _[n]um:X => digits/${SAY}
229 _[n]um:1[1-9] => digits/10en, digits/${SAY:1}
230 _[n]um:2[1-9] => digits/20on, digits/${SAY:1}
231 _[n]um:[1-9]0 => digits/${SAY}
232 _[n]um:[3-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
233 _[n]um:XXX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
234
235 _[n]um:X000 => num:${SAY:0:1}, digits/thousand
236 _[n]um:XXXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1}
237 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
238 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
239 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
240 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
241
242 _[n]um:X000000 => num:${SAY:0:1}, digits/million
243 _[n]um:XXXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
244 _[n]um:XX000000 => num:${SAY:0:2}, digits/million
245 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2}
246 _[n]um:XXX000000 => num:${SAY:0:3}, digits/million
247 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3}
248
249 _[n]um:X000000000 => num:${SAY:0:1}, digits/billion
250 _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1}
251 _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion
252 _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2}
253 _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion
254 _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3}
255
256 _datetime::. => date:YBdA k 'ora' M 'perc':${SAY}
257 _date::. => date:YBdA:${SAY}
258 _time::. => date:k 'ora' M 'perc':${SAY}
259
260[fr](date-base,digit-base)
261 _[n]um:0. => num:${SAY:1}
262 _[n]um:X => digits/${SAY}
263 _[n]um:1X => digits/${SAY}
264 _[n]um:[2-9]0 => digits/${SAY}
265 _[n]um:[2-6]1 => digits/${SAY:0:1}0, vm-and, digits/${SAY:1}
266 _[n]um:71 => digits/60, vm-and, num:1${SAY:1}
267 _[n]um:7X => digits/60, num:1${SAY:1}
268 _[n]um:9X => digits/80, num:1${SAY:1}
269 _[n]um:[2-9][1-9] => digits/${SAY:0:1}0, num:${SAY:1}
270 _[n]um:100 => digits/hundred
271 _[n]um:1XX => digits/hundred, num:${SAY:1}
272 _[n]um:[2-9]00 => num:${SAY:0:1}, digits/hundred
273 _[n]um:[2-9]XX => num:${SAY:0:1}, digits/hundred, num:${SAY:1}
274
275 _[n]um:1000 => digits/thousand
276 _[n]um:1XXX => digits/thousand, num:${SAY:1}
277 _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousand
278 _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1}
279 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
280 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
281 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
282 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
283
284 _[n]um:1000000 => num:${SAY:0:1}, digits/million
285 _[n]um:1XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
286 _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/million
287 _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/million, num:${SAY:1}
288 _[n]um:XX000000 => num:${SAY:0:2}, digits/million
289 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/million, num:${SAY:2}
290 _[n]um:XXX000000 => num:${SAY:0:3}, digits/million
291 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/million, num:${SAY:3}
292
293 _datetime::. => date:AdBY 'digits/at' H 'hours' M 'perc':${SAY}
294 _date::. => date:AdBY:${SAY}
295 _time::. => date:H 'hours' M 'perc':${SAY}
296
297 _pho[n]e:XXXX => num:${SAY:0:2}, num:${SAY:2:2}
298 _pho[n]e:0[1-9]XXXXXXXX => num:${SAY:0:1}, num:${SAY:1:1}, num:${SAY:2:2}, num:${SAY:4:2}, num:${SAY:6:2}, num:${SAY:8:2}
299 _pho[n]e:. => digit:${SAY}
300
301[es](date-base,digit-base)
302 _[n]um:0. => num:${SAY:1}
303 _[n]um:X => digits/${SAY}
304 _[n]um:1X => digits/${SAY}
305 _[n]um:[2-9]0 => digits/${SAY}
306 _[n]um:2[1-9] => digits/20-and, digits/${SAY:1}
307 _[n]um:[3-9][1-9] => digits/${SAY:0:1}0, vm-and, digits/${SAY:1}
308 _[n]um:100 => digits/hundred
309 _[n]um:1XX => digits/100-and, num:${SAY:1}
310 _[n]um:[2-9]00 => digits/${SAY}
311 _[n]um:[2-9]XX => digits/${SAY:0:1}00, num:${SAY:1}
312
313 _[n]um:1000 => digits/thousand
314 _[n]um:1XXX => digits/thousand, num:${SAY:1}
315 _[n]um:[2-9]000 => num:${SAY:0:1}, digits/thousand
316 _[n]um:[2-9]XXX => num:${SAY:0:1}, digits/thousand, num:${SAY:1}
317 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
318 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
319 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
320 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
321
322 _[n]um:1000000 => digits/1M, digits/million
323 _[n]um:1XXXXXX => digits/1M, digits/million, num:${SAY:1}
324 _[n]um:[2-9]000000 => num:${SAY:0:1}, digits/millions
325 _[n]um:[2-9]XXXXXX => num:${SAY:0:1}, digits/millions, num:${SAY:1}
326 _[n]um:XX000000 => num:${SAY:0:2}, digits/millions
327 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
328 _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions
329 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
330 _[n]um:XXXX000000 => num:${SAY:0:4}, digits/millions
331 _[n]um:XXXXXXXXXX => num:${SAY:0:4}, digits/millions, num:${SAY:4}
332
333 _datetime::. => date:Ad 'letters/d' B 'letters/d' Y 'digits/at' HMp:${SAY}
334 _date::. => date:Ad 'letters/d' B 'letters/d' Y:${SAY}
335 _time::. => date:HMp:${SAY}
336
337[da](date-base,digit-base)
338 _[n]um:0. => num:${SAY:1}
339 _[n]um:X => digits/${SAY}
340 _[n]um:1X => digits/${SAY}
341 _[n]um:[2-9]0 => digits/${SAY}
342 _[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/${SAY:0:1}0
343 _[n]um:100 => digits/1N, digits/hundred
344 _[n]um:1XX => digits/1N, digits/hundred, num:${SAY:1}
345 _[n]um:[2-9]00 => digits/${SAY:0:1}, digits/hundred
346 _[n]um:[2-9]XX => digits/${SAY:0:1}, digits/hundred, num:${SAY:1}
347
348 _[n]um:1000 => digits/1N, digits/thousand
349 _[n]um:1XXX => digits/1N, digits/thousand, num:${SAY:1}
350 _[n]um:[2-9]000 => digits/${SAY:0:1}, digits/thousand
351 _[n]um:[2-9]XXX => digits/${SAY:0:1}, digits/thousand, num:${SAY:1}
352 _[n]um:XX000 => num:${SAY:0:2}, digits/thousand
353 _[n]um:XXXXX => num:${SAY:0:2}, digits/thousand, num:${SAY:2}
354 _[n]um:XXX000 => num:${SAY:0:3}, digits/thousand
355 _[n]um:XXXXXX => num:${SAY:0:3}, digits/thousand, num:${SAY:3}
356
357 _[n]um:X000000 => digits/${SAY:0:1}, digits/million
358 _[n]um:XXXXXXX => digits/${SAY:0:1}, digits/million, num:${SAY:1}
359 _[n]um:XX000000 => num:${SAY:0:2}, digits/millions
360 _[n]um:XXXXXXXX => num:${SAY:0:2}, digits/millions, num:${SAY:2}
361 _[n]um:XXX000000 => num:${SAY:0:3}, digits/millions
362 _[n]um:XXXXXXXXX => num:${SAY:0:3}, digits/millions, num:${SAY:3}
363
364 _[n]um:X000000000 => num:${SAY:0:1}, digits/billion
365 _[n]um:XXXXXXXXXX => num:${SAY:0:1}, digits/billion, num:${SAY:1}
366 _[n]um:XX000000000 => num:${SAY:0:2}, digits/billion
367 _[n]um:XXXXXXXXXXX => num:${SAY:0:2}, digits/billion, num:${SAY:2}
368 _[n]um:XXX000000000 => num:${SAY:0:3}, digits/billion
369 _[n]um:XXXXXXXXXXXX => num:${SAY:0:3}, digits/billion, num:${SAY:3}
370
371 _datetime::. => date:AdBY 'digits/at' kM:${SAY}
372 _date::. => date:AdBY:${SAY}
373 _time::. => date:HM:${SAY}
374
375 ; enumeration
376 _e[n]um:X => digits/h-${SAY}
377 _e[n]um:1X => digits/h-${SAY}
378 _e[n]um:[2-9]0 => digits/h-${SAY}
379 _e[n]um:[2-9][1-9] => digits/${SAY:1}-and, digits/h-${SAY:0:1}0
380 _e[n]um:100 => digits/1N, digits/h-hundred
381 _e[n]um:1XX => digits/1N, digits/h-hundred, enum:${SAY:1}
382 _e[n]um:[2-9]00 => num:${SAY:0:1}, digits/h-hundred
383 _e[n]um:[2-9]XX => num:${SAY:0:1}, digits/h-hundred, enum:${SAY:1}