| 1 |
|
| 2 |
//==================================================== |
| 3 |
// Catalan - based on Spanish and Base2 |
| 4 |
//==================================================== |
| 5 |
// in our project we decided not to use elisions, but they could be managed here by using "ipa NULL" |
| 6 |
|
| 7 |
// vowels |
| 8 |
//============= |
| 9 |
|
| 10 |
phoneme a |
| 11 |
vwl starttype #a endtype #a |
| 12 |
length 180 |
| 13 |
IF thisPh(isUnstressed) THEN |
| 14 |
ChangePhoneme(@) |
| 15 |
ENDIF |
| 16 |
FMT(vowel/a_6) |
| 17 |
endphoneme |
| 18 |
|
| 19 |
phoneme a2 // don't reduce |
| 20 |
vwl starttype #a endtype #a |
| 21 |
length 180 |
| 22 |
FMT(vowel/a_6) |
| 23 |
endphoneme |
| 24 |
|
| 25 |
phoneme e |
| 26 |
vwl starttype #e endtype #e |
| 27 |
length 170 |
| 28 |
IF thisPh(isUnstressed) THEN |
| 29 |
ChangePhoneme(@) |
| 30 |
ENDIF |
| 31 |
|
| 32 |
FMT(vowel/e) |
| 33 |
endphoneme |
| 34 |
|
| 35 |
phoneme e2 // don't reduce |
| 36 |
vwl starttype #e endtype #e |
| 37 |
length 170 |
| 38 |
FMT(vowel/e) |
| 39 |
endphoneme |
| 40 |
|
| 41 |
phoneme E |
| 42 |
vwl starttype #e endtype #e |
| 43 |
length 180 |
| 44 |
IF thisPh(isUnstressed) THEN |
| 45 |
ChangePhoneme(@) |
| 46 |
ENDIF |
| 47 |
FMT(vowel/e_mid) |
| 48 |
endphoneme |
| 49 |
|
| 50 |
phoneme E2 // don't reduce |
| 51 |
vwl starttype #e endtype #e |
| 52 |
length 180 |
| 53 |
ChangeIfUnstressed(e2) |
| 54 |
FMT(vowel/e_mid) |
| 55 |
endphoneme |
| 56 |
|
| 57 |
phoneme O |
| 58 |
vwl starttype #o endtype #o |
| 59 |
length 170 |
| 60 |
IF thisPh(isUnstressed) THEN |
| 61 |
IF thisPh(isWordEnd) AND nextPh(isVowel) THEN |
| 62 |
IF nextPh(i) THEN |
| 63 |
ChangePhoneme(u) |
| 64 |
ELSE |
| 65 |
ChangePhoneme(w) |
| 66 |
ENDIF |
| 67 |
ELIF thisPh(isWordStart) AND prevPh(isVowel) THEN |
| 68 |
ChangePhoneme(w) |
| 69 |
ELSE |
| 70 |
ChangePhoneme(u) |
| 71 |
ENDIF |
| 72 |
ENDIF |
| 73 |
FMT(vowel/oo) |
| 74 |
endphoneme |
| 75 |
|
| 76 |
phoneme o |
| 77 |
vwl starttype #o endtype #o |
| 78 |
length 170 |
| 79 |
IF thisPh(isUnstressed) THEN |
| 80 |
IF thisPh(isWordEnd) AND nextPh(isVowel) THEN |
| 81 |
IF nextPh(i) THEN |
| 82 |
ChangePhoneme(u) |
| 83 |
ELSE |
| 84 |
ChangePhoneme(w) |
| 85 |
ENDIF |
| 86 |
ELIF thisPh(isWordStart) AND prevPh(isVowel) THEN |
| 87 |
ChangePhoneme(w) |
| 88 |
ELSE |
| 89 |
ChangePhoneme(u) |
| 90 |
ENDIF |
| 91 |
ENDIF |
| 92 |
FMT(vowel/o) |
| 93 |
endphoneme |
| 94 |
|
| 95 |
phoneme o2 |
| 96 |
vwl starttype #o endtype #o |
| 97 |
length 170 |
| 98 |
FMT(vowel/o) |
| 99 |
endphoneme |
| 100 |
|
| 101 |
phoneme O2 |
| 102 |
vwl starttype #o endtype #o |
| 103 |
length 170 |
| 104 |
FMT(vowel/oo) |
| 105 |
endphoneme |
| 106 |
|
| 107 |
phoneme U |
| 108 |
vwl starttype #u endtype #u |
| 109 |
unstressed |
| 110 |
length 160 |
| 111 |
FMT(vowel/uu_2) |
| 112 |
endphoneme |
| 113 |
|
| 114 |
phoneme u |
| 115 |
vwl starttype #u endtype #u |
| 116 |
length 160 |
| 117 |
IF thisPh(isUnstressed) THEN |
| 118 |
IF thisPh(isWordEnd) THEN |
| 119 |
IF nextPh(isVowel) THEN |
| 120 |
IF nextPh(i) THEN |
| 121 |
ELSE |
| 122 |
ChangePhoneme(w) |
| 123 |
ENDIF |
| 124 |
ENDIF |
| 125 |
ELIF thisPh(isWordStart) THEN |
| 126 |
IF prevPh(isVowel) THEN |
| 127 |
ChangePhoneme(w) |
| 128 |
|
| 129 |
ENDIF |
| 130 |
ENDIF |
| 131 |
ENDIF |
| 132 |
FMT(vowel/u_bck) |
| 133 |
endphoneme |
| 134 |
|
| 135 |
phoneme i |
| 136 |
vwl starttype #i endtype #i |
| 137 |
length 170 |
| 138 |
IF thisPh(isUnstressed) THEN |
| 139 |
IF thisPh(isWordEnd) THEN |
| 140 |
IF nextPh(isVowel) THEN |
| 141 |
IF nextPh(u) THEN |
| 142 |
ELSE |
| 143 |
ChangePhoneme(j) |
| 144 |
ENDIF |
| 145 |
ENDIF |
| 146 |
ELIF thisPh(isWordStart) THEN |
| 147 |
IF prevPh(isVowel) THEN |
| 148 |
ChangePhoneme(j) |
| 149 |
ENDIF |
| 150 |
ENDIF |
| 151 |
ENDIF |
| 152 |
FMT(vowel/i) |
| 153 |
endphoneme |
| 154 |
|
| 155 |
|
| 156 |
// nasals |
| 157 |
//============== |
| 158 |
|
| 159 |
phoneme M |
| 160 |
vls lbd nas |
| 161 |
ipa ɱ |
| 162 |
IF nextPh(v) THEN |
| 163 |
ChangePhoneme(m) |
| 164 |
ENDIF |
| 165 |
endphoneme |
| 166 |
|
| 167 |
phoneme m |
| 168 |
vcd blb nas |
| 169 |
Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk |
| 170 |
lengthmod 4 |
| 171 |
|
| 172 |
IF KlattSynth THEN |
| 173 |
Vowelin f1=0 f2=1000 -50 -200 f3=-200 80 |
| 174 |
IF nextPh(isPause2) THEN |
| 175 |
FMT(klatt/m_) |
| 176 |
ENDIF |
| 177 |
FMT(klatt/m) |
| 178 |
ENDIF |
| 179 |
|
| 180 |
NextVowelStarts |
| 181 |
VowelStart(m/m@) |
| 182 |
VowelStart(m/ma) |
| 183 |
VowelStart(m/me) |
| 184 |
VowelStart(m/mi) |
| 185 |
VowelStart(m/mo) |
| 186 |
VowelStart(m/mu) |
| 187 |
EndSwitch |
| 188 |
|
| 189 |
IF nextPh(f) OR nextPh(v) THEN |
| 190 |
ChangePhoneme(M) |
| 191 |
ENDIF |
| 192 |
|
| 193 |
IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN |
| 194 |
FMT(m/mj) |
| 195 |
ELIF prevPh(isPause) THEN |
| 196 |
FMT(m/_m) |
| 197 |
ELIF nextPh(isNotVowel) THEN |
| 198 |
FMT(m/m_) |
| 199 |
ENDIF |
| 200 |
endphoneme |
| 201 |
|
| 202 |
|
| 203 |
phoneme n |
| 204 |
vcd alv nas |
| 205 |
Vowelout f1=2 f2=1500 -300 250 f3=-100 80 rms=20 brk |
| 206 |
lengthmod 4 |
| 207 |
|
| 208 |
IF KlattSynth THEN |
| 209 |
Vowelin f1=0 f2=1500 -200 200 f3=0 80 |
| 210 |
FMT(klatt/n) |
| 211 |
ENDIF |
| 212 |
|
| 213 |
NextVowelStarts |
| 214 |
VowelStart(n/n@) |
| 215 |
VowelStart(n/na) |
| 216 |
VowelStart(n/ne) |
| 217 |
VowelStart(n/ni) |
| 218 |
VowelStart(n/no) |
| 219 |
VowelStart(n/nu) |
| 220 |
EndSwitch |
| 221 |
|
| 222 |
IF nextPh(f) THEN |
| 223 |
ChangePhoneme(M) |
| 224 |
ELIF nextPh(k) OR nextPh(g) THEN |
| 225 |
ChangePhoneme(N) |
| 226 |
ELIF nextPh(p) OR nextPh(b) OR nextPh(v) OR nextPh(m) THEN |
| 227 |
ChangePhoneme(m) |
| 228 |
ELIF nextPh(l^) OR nextPh(n^) THEN |
| 229 |
ChangePhoneme(n^) |
| 230 |
ENDIF |
| 231 |
IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN |
| 232 |
FMT(n/nj) |
| 233 |
ELIF prevPh(isPause) OR prevPh(n) THEN |
| 234 |
FMT(n/_n) |
| 235 |
ELIF nextPh(isNotVowel) THEN |
| 236 |
FMT(n/n_) |
| 237 |
ENDIF |
| 238 |
endphoneme |
| 239 |
|
| 240 |
phoneme l |
| 241 |
import_phoneme en/l // use 'dark' [l] after a vowel |
| 242 |
endphoneme |
| 243 |
|
| 244 |
// fricatives |
| 245 |
//================ |
| 246 |
phoneme s |
| 247 |
vls alv frc sib |
| 248 |
voicingswitch z |
| 249 |
lengthmod 3 |
| 250 |
Vowelin f1=0 f2=1700 -300 300 f3=-100 80 |
| 251 |
Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20 |
| 252 |
|
| 253 |
IF prevPh(isPalatal) OR nextPh(S) OR nextPh(Z) THEN |
| 254 |
IF prevPh(j) THEN |
| 255 |
ELIF nextPh(isVoiced) THEN |
| 256 |
ChangePhoneme(Z) |
| 257 |
ELSE |
| 258 |
ChangePhoneme(S) |
| 259 |
ENDIF |
| 260 |
ENDIF |
| 261 |
IF thisPh(isWordEnd) THEN |
| 262 |
IF nextPh(isVoiced) THEN |
| 263 |
ChangePhoneme(z) |
| 264 |
ENDIF |
| 265 |
ENDIF |
| 266 |
IF nextPh(isPause) THEN |
| 267 |
WAV(ufric/s_) |
| 268 |
ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN |
| 269 |
WAV(ufric/s!) |
| 270 |
ENDIF |
| 271 |
WAV(ufric/s) |
| 272 |
endphoneme |
| 273 |
|
| 274 |
phoneme z |
| 275 |
vcd alv frc sib |
| 276 |
voicingswitch s |
| 277 |
lengthmod 6 |
| 278 |
Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 |
| 279 |
IF prevPh(isPalatal) OR nextPh(Z) THEN |
| 280 |
IF prevPh(j) THEN |
| 281 |
ELSE |
| 282 |
ChangePhoneme(Z) |
| 283 |
ENDIF |
| 284 |
ENDIF |
| 285 |
IF KlattSynth THEN |
| 286 |
Vowelin f1=0 f2=1390 -300 300 f3=0 0 |
| 287 |
Vowelout f1=1 f2=1390 -300 300 f3=-100 60 len=50 brk |
| 288 |
ENDIF |
| 289 |
|
| 290 |
IF nextPh(isPause2) THEN |
| 291 |
FMT(voc/z_) addWav(ufric/s_, 70) |
| 292 |
ENDIF |
| 293 |
FMT(voc/z) addWav(ufric/s_, 85) |
| 294 |
endphoneme |
| 295 |
|
| 296 |
phoneme f |
| 297 |
vls lbd frc |
| 298 |
voicingswitch v |
| 299 |
lengthmod 3 |
| 300 |
Vowelout f1=0 f2=1000 -500 -350 f3=-200 80 |
| 301 |
IF thisPh(isWordStart) THEN |
| 302 |
ELSE |
| 303 |
IF nextPh(isVoiced) THEN |
| 304 |
IF thisPh(isWordEnd) THEN |
| 305 |
ipa v |
| 306 |
ELSE |
| 307 |
IF nextPh(isVowel) OR nextPh(l) OR nextPh(**) OR nextPh(R) THEN |
| 308 |
ELSE |
| 309 |
ipa v |
| 310 |
ENDIF |
| 311 |
ENDIF |
| 312 |
ENDIF |
| 313 |
ENDIF |
| 314 |
IF nextPh(isPause) THEN |
| 315 |
WAV(ufric/f_) |
| 316 |
ENDIF |
| 317 |
WAV(ufric/f) |
| 318 |
endphoneme |
| 319 |
|
| 320 |
phoneme v // = b |
| 321 |
vcd blb stp |
| 322 |
IF thisPh(isWordEnd) THEN |
| 323 |
IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 324 |
ELIF prevPh(m) THEN |
| 325 |
ELSE |
| 326 |
ChangePhoneme(p) |
| 327 |
ENDIF |
| 328 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority |
| 329 |
ChangePhoneme(b) |
| 330 |
ELIF nextPh(isVoiced) THEN |
| 331 |
IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN |
| 332 |
IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN |
| 333 |
ChangePhoneme(B) |
| 334 |
ELSE |
| 335 |
ChangePhoneme(b) |
| 336 |
ENDIF |
| 337 |
ELSE |
| 338 |
ChangePhoneme(b) |
| 339 |
ENDIF |
| 340 |
ELSE |
| 341 |
ChangePhoneme(p) |
| 342 |
ENDIF |
| 343 |
CALL base1/b |
| 344 |
endphoneme |
| 345 |
|
| 346 |
|
| 347 |
// R |
| 348 |
//===================== |
| 349 |
phoneme R |
| 350 |
liquid trl |
| 351 |
lengthmod 6 |
| 352 |
ipa r |
| 353 |
IF thisPh(isWordEnd) AND nextPh(R) THEN |
| 354 |
ipa NULL |
| 355 |
ENDIF |
| 356 |
Vowelin f1=0 f2=1600 -300 300 f3=-200 80 |
| 357 |
Vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk |
| 358 |
FMT(r3/r_trill2) addWav(r3/r_trill2.wav, 65) |
| 359 |
endphoneme |
| 360 |
|
| 361 |
// plosives (oclusives) |
| 362 |
// ==================== |
| 363 |
|
| 364 |
phoneme b |
| 365 |
vcd blb stp |
| 366 |
|
| 367 |
IF thisPh(isWordEnd) THEN |
| 368 |
IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 369 |
ELIF prevPh(m) THEN |
| 370 |
ELSE |
| 371 |
ChangePhoneme(p) |
| 372 |
ENDIF |
| 373 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority |
| 374 |
ELIF nextPh(isVoiced) THEN |
| 375 |
IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN |
| 376 |
IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN |
| 377 |
ChangePhoneme(B) |
| 378 |
ENDIF |
| 379 |
ENDIF |
| 380 |
ELSE |
| 381 |
ChangePhoneme(p) |
| 382 |
ENDIF |
| 383 |
|
| 384 |
CALL base1/b |
| 385 |
endphoneme |
| 386 |
|
| 387 |
phoneme g |
| 388 |
vcd vel stp |
| 389 |
lengthmod 5 |
| 390 |
voicingswitch k |
| 391 |
Vowelin f1=2 f2=2300 200 300 f3=-300 80 |
| 392 |
Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk |
| 393 |
IF thisPh(isWordEnd) THEN |
| 394 |
IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 395 |
ELSE |
| 396 |
ChangePhoneme(k) |
| 397 |
ENDIF |
| 398 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority |
| 399 |
ELIF nextPh(isVoiced) THEN |
| 400 |
IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN |
| 401 |
IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN |
| 402 |
ChangePhoneme(Q) |
| 403 |
ENDIF |
| 404 |
ENDIF |
| 405 |
ELSE |
| 406 |
ChangePhoneme(k) |
| 407 |
ENDIF |
| 408 |
IF PreVoicing THEN |
| 409 |
FMT(g/xg) |
| 410 |
ENDIF |
| 411 |
IF nextPh(isPause2) THEN |
| 412 |
FMT(g/g_) addWav(x/g_) |
| 413 |
ENDIF |
| 414 |
FMT(g/g) addWav(x/g2) |
| 415 |
endphoneme |
| 416 |
|
| 417 |
phoneme d |
| 418 |
vcd dnt stp |
| 419 |
IF thisPh(isWordEnd) THEN |
| 420 |
IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 421 |
ELSE |
| 422 |
ChangePhoneme(t) |
| 423 |
ENDIF |
| 424 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority |
| 425 |
ELIF nextPh(isVoiced) THEN |
| 426 |
IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN |
| 427 |
IF prevPh(isVowel) OR prevPh(**) OR prevPh(R) OR prevPh(j) OR prevPh(w) OR prevPh(isVFricative) THEN |
| 428 |
ChangePhoneme(D) |
| 429 |
ENDIF |
| 430 |
ENDIF |
| 431 |
ELSE |
| 432 |
ChangePhoneme(t) |
| 433 |
ENDIF |
| 434 |
|
| 435 |
CALL base2/d |
| 436 |
endphoneme |
| 437 |
|
| 438 |
|
| 439 |
phoneme p |
| 440 |
vls blb stp |
| 441 |
lengthmod 2 |
| 442 |
voicingswitch b |
| 443 |
Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 |
| 444 |
Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30 |
| 445 |
IF nextPh(isPause2) THEN |
| 446 |
WAV(ustop/p_unasp_, 80) |
| 447 |
ELIF nextPh(isRhotic) THEN |
| 448 |
WAV(ustop/pr) |
| 449 |
ELIF nextPh(l) THEN |
| 450 |
WAV(ustop/pl) |
| 451 |
ELIF thisPh(isWordStart) THEN // don't change it if it's word start |
| 452 |
ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 453 |
IF nextPh(w) OR nextPh(j) THEN |
| 454 |
ELSE |
| 455 |
ChangePhoneme(b) |
| 456 |
ENDIF |
| 457 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation |
| 458 |
ChangePhoneme(b) |
| 459 |
ENDIF |
| 460 |
WAV(ustop/p_unasp) |
| 461 |
endphoneme |
| 462 |
|
| 463 |
phoneme t // dental variant of /t/ |
| 464 |
vls dnt stp |
| 465 |
lengthmod 2 |
| 466 |
voicingswitch d |
| 467 |
Vowelin f1=0 f2=1600 -300 300 f3=-100 80 |
| 468 |
Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 |
| 469 |
IF nextPh(isPause2) THEN |
| 470 |
WAV(ustop/t_dnt, 30) |
| 471 |
ELIF thisPh(isWordStart) THEN // don't change it if it's word start |
| 472 |
ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 473 |
IF nextPh(**) OR nextPh(w) OR nextPh(j) THEN |
| 474 |
ELSE |
| 475 |
ChangePhoneme(d) |
| 476 |
ENDIF |
| 477 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation |
| 478 |
ChangePhoneme(d) |
| 479 |
ENDIF |
| 480 |
WAV(ustop/t_dnt2, 60) |
| 481 |
endphoneme |
| 482 |
|
| 483 |
phoneme k |
| 484 |
vls vel stp |
| 485 |
lengthmod 2 |
| 486 |
voicingswitch g |
| 487 |
Vowelin f1=0 f2=2300 200 400 f3=-100 80 |
| 488 |
Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 |
| 489 |
|
| 490 |
IF nextPh(isPause2) THEN |
| 491 |
WAV(ustop/k_) |
| 492 |
|
| 493 |
ELIF nextPh(isRhotic) THEN |
| 494 |
WAV(ustop/kr) |
| 495 |
ELIF thisPh(isWordStart) THEN // don't change it if it's word start |
| 496 |
ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN |
| 497 |
IF nextPh(w) OR nextPh(j) THEN |
| 498 |
ELIF nextPh(n) OR nextPh(d) OR nextPh(z) THEN |
| 499 |
ChangePhoneme(g) |
| 500 |
ELIF thisPh(isWordEnd) THEN |
| 501 |
ChangePhoneme(g) |
| 502 |
ENDIF |
| 503 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation |
| 504 |
ChangePhoneme(g) |
| 505 |
ENDIF |
| 506 |
WAV(ustop/k_unasp, 70) |
| 507 |
endphoneme |
| 508 |
|
| 509 |
phoneme tS |
| 510 |
vls pla afr sib |
| 511 |
voicingswitch dZ |
| 512 |
lengthmod 2 |
| 513 |
Vowelin f1=0 f2=2300 200 400 f3=-100 80 |
| 514 |
|
| 515 |
IF thisPh(isWordEnd) AND nextPh(isVoiced) THEN |
| 516 |
ChangePhoneme(dZ) |
| 517 |
ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation |
| 518 |
ChangePhoneme(dZ) |
| 519 |
ENDIF |
| 520 |
WAV(ustop/tsh) |
| 521 |
endphoneme |