forked from espeak-ng/espeak-ng
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathph_malayalam
320 lines (243 loc) · 5.01 KB
/
ph_malayalam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
// Phonemes for Malayalam
// This inherits from ph_hindi
phoneme @
vwl starttype #@ endtype #@
length 130
FMT(vowel/@_low)
endphoneme
phoneme y // epenthetic vowel
vwl starttype #@ endtype #@
unstressed
ipa ɨ
length 80
FMT(vowel/u#_4, 120)
endphoneme
phoneme a
vwl starttype #a endtype #a
ipa ɐ
length 130
IF thisPh(isStressed) OR thisPh(isFirstVowel) OR thisPh(isWordEnd) THEN
FMT(vowel/a#_4)
ELSE
ChangeIfUnstressed(@)
IF nextPh(m) AND nextPh(isWordEnd) THEN
ChangePhoneme(@)
ENDIF
FMT(vowel/a#_3)
ENDIF
endphoneme
phoneme a# // don't reduce to [@]
vwl starttype #a endtype #a
ChangePhoneme(a)
endphoneme
phoneme a:
vwl lng starttype #a endtype #a
length 300
FMT(vowel/a_5)
endphoneme
phoneme e
vwl starttype #e endtype #e
length 130
FMT(vowel/e)
endphoneme
phoneme e:
vwl lng starttype #e endtype #e
length 270
FMT(vowel/e)
endphoneme
phoneme i
vwl starttype #i endtype #i
length 130
FMT(vowel/i_6)
endphoneme
phoneme I
vwl starttype #i endtype #i
length 130
FMT(vowel/ii)
endphoneme
phoneme i:
vwl lng starttype #i endtype #i
length 270
FMT(vowel/i)
endphoneme
phoneme o
vwl starttype #o endtype #o
length 130
FMT(vowel/o)
endphoneme
phoneme o:
vwl lng starttype #o endtype #o
length 300
FMT(vowel/o)
endphoneme
phoneme u
vwl starttype #u endtype #u
length 110
FMT(vowel/u)
endphoneme
phoneme u:
vwl lng starttype #u endtype #u
length 280
FMT(vowel/u)
endphoneme
phoneme aI
vwl lng starttype #a endtype #i
length 280
FMT(vdiph/ai)
endphoneme
phoneme aU
vwl lng starttype #a endtype #u
length 270
FMT(vdiph/aau_3)
endphoneme
// ?? This is standard [v]. Should be it [v] without the fricative noise?
phoneme v
import_phoneme base1/v
endphoneme
phoneme r
import_phoneme base1/**
endphoneme
phoneme R
import_phoneme base1/R2
endphoneme
phoneme d2 // 'rr' sounds like English 'd'
import_phoneme base1/d
endphoneme
// Aspirated voice stops, sound like aspirated unvoiced stops ?
phoneme b#
vls blb stp prevoice
lengthmod 2
voicingswitch b
Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
IF PreVoicing THEN
IF prevPhW(isVowel) THEN
FMT(b/xb)
ELSE
FMT(voc/murmur1)
ENDIF
ENDIF
IF nextPh(isPause2) THEN
WAV(ustop/p_)
ENDIF
IF nextPh(l) THEN
WAV(ustop/pl)
ENDIF
WAV(ustop/p_asp)
endphoneme
phoneme d#
vls dnt stp prevoice
lengthmod 2
voicingswitch d
Vowelin f1=0 f2=1500 -300 300 f3=-100 80 amp=16
Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
IF PreVoicing THEN
IF prevPhW(isVowel) THEN
FMT(d/xd)
ELSE
FMT(voc/murmur1)
ENDIF
ENDIF
IF nextPh(isPause2) THEN
WAV(ustop/t_dnt, 35)
ENDIF
WAV(ustop/t_dnt, 50)
endphoneme
phoneme t.#
vls rfx stp
lengthmod 2
ipa ʈU+02B0
voicingswitch d.#
Vowelin f1=0 f2=1800 -300 300 f3=-200 80
Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
IF nextPhW(t.#) THEN
ChangePhoneme(t.)
ENDIF
WAV(ustop/th_rfx2, 80)
endphoneme
phoneme d.#
vls rfx stp prevoice
lengthmod 2
ipa ʈU+02B0
Vowelin f1=0 f2=1800 -300 300 f3=-200 80
Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
IF PreVoicing THEN
IF prevPhW(isVowel) THEN
FMT(d/xdr)
ELSE
FMT(voc/murmur1)
ENDIF
ENDIF
voicingswitch d.#
WAV(ustop/th_rfx2, 80)
endphoneme
phoneme J#
vls pal afr sib pzd prevoice
voicingswitch c#
lengthmod 2
Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70
IF PreVoicing THEN
IF prevPhW(isVowel) THEN
FMT(dzh/xdz_pzd)
ELSE
FMT(voc/murmur1)
ENDIF
ENDIF
IF nextPh(isPause2) THEN
WAV(ustop/ts_pzd)
ENDIF
WAV(ustop/ts_pzd)
endphoneme
phoneme g#
vls vel stp prevoice
lengthmod 2
Vowelin f1=1 f2=1400 -100 100 f3=-150 80
Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20
IF PreVoicing THEN
IF prevPhW(isVowel) THEN
FMT(g/xg)
ELSE
FMT(voc/murmur1)
ENDIF
ENDIF
IF nextPh(isPause2) THEN
WAV(ustop/k_asp, 40)
ENDIF
IF nextPhW(#e) OR nextPhW(#i) THEN
WAV(ustop/k_asp_e, 40)
ELIF nextPhW(#o) OR nextPhW(#u) THEN
WAV(ustop/k_asp_a, 25)
ELSE
WAV(ustop/k_asp_a, 30)
ENDIF
endphoneme
// suggested by Prasenjit Sen, but perhaps not needed?
// ml_rules changes [p], [t], [k] to [b], [d], [g] in non-initial
// positions
phoneme p
import_phoneme consonants/p-
voicingswitch b
IF thisPh(isWordStart) THEN
CALL base1/p
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
ChangePhoneme(b)
ENDIF
endphoneme
phoneme t
import_phoneme base1/t[
voicingswitch d
IF thisPh(isWordStart) THEN
CALL base1/t
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
ChangePhoneme(d)
ENDIF
endphoneme
phoneme k
import_phoneme consonants/k-
voicingswitch g
IF thisPh(isWordStart) THEN
CALL base1/k
ELIF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
ChangePhoneme(g)
ENDIF
endphoneme