ph_hindi_base 8.76 KB
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 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572

//====================================================
//  Base for Hindi and other Indian languages
//====================================================

phoneme : //  Lengthen the previous vowel by "length"
  virtual
  length 100
endphoneme

phoneme @
  vowel flag1 starttype #@  endtype #@
  length 130

  ChangeIfDiminished(@-)
  IF nextPh(H) OR prevPh(H) THEN
    FMT(vowel/@_low)
  ENDIF
  IF nextPh(j) THEN
    FMT(vowel/V_3)
  ENDIF
  FMT(vowel/@_bck)
endphoneme


phoneme V
  vowel flag1 starttype #@  endtype #@
  length 140

  IF thisPh(isWordStart) THEN
    FMT(vowel/V_3)
    RETURN
  ENDIF

  IF thisPh(isNotStressed) THEN
    length 130

    IF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
      ChangePhoneme(NULL)
    ENDIF

    IF prevPh(H) THEN
      ChangePhoneme(@)
    ENDIF

    IF prev2PhW(isVowel) AND NOT nextVowel(isFlag1) THEN
      IF thisPh(isFinalVowel) AND nextPhW(isNotVowel) THEN
        // don't delete schwa before a word-final consonant
      ELSE
        ChangePhoneme(NULL)
      ENDIF
    ENDIF

    IF prevPh(isPalatal) AND NOT nextPh(H) THEN
      ChangePhoneme(@3)
    ELSEIF prevPh(r) THEN
      ChangePhoneme(@2)
    ELSE
      ChangePhoneme(@)
    ENDIF
  ENDIF
  
  IF nextPh(H) OR prevPh(H) THEN
    FMT(vowel/@_low)
  ENDIF

  IF prevPh(w) THEN
    FMT(vowel/V_4)
  ENDIF

  FMT(vowel/V_3)
endphoneme


phoneme @2
  vowel flag1 starttype #@  endtype #@
  length 130
  FMT(vowel/@_low)
endphoneme

phoneme @3
  vowel flag1 starttype #@  endtype #@
  length 130
  ChangeIfDiminished(@-)
  FMT(vowel/@_3)
endphoneme




phoneme i:
  vowel long starttype #i endtype #i
  length 230
  IF thisPh(isUnstressed) THEN
    ChangePhoneme(i)
  ENDIF
  IfNextVowelAppend(;)
  FMT(vowel/i_fnt)
endphoneme

phoneme i         // as [i:] but not marked as 'long'
  vowel starttype #i endtype #i
  length 230
  IfNextVowelAppend(;)
  FMT(vowel/ii_6)
endphoneme

phoneme I
  vowel starttype #i endtype #i
  length 100
  IfNextVowelAppend(;)
  FMT(vowel/ii_3)
endphoneme

phoneme e:
  vowel long starttype #e endtype #e
  length 220
  FMT(vowel/e_2)
endphoneme

phoneme e
  vowel starttype #e endtype #e
  length 140
  FMT(vowel/e_2)
endphoneme

phoneme E:
  vowel long starttype #e endtype #e
  length 220
  FMT(vdiph/ee-e)
endphoneme

phoneme E
  vowel starttype #e endtype #e
  length 140
  FMT(vowel/e_mid)
endphoneme

phoneme &:
  vowel long starttype #a endtype #a
  length 220
  FMT(vowel/&)
endphoneme


phoneme a:
  vowel long starttype #a endtype #a
  length 200
  IF nextPhW(j) THEN
    FMT(vowel/a_5)
  ENDIF
  FMT(vowel/aa_9)
endphoneme

phoneme a
  vowel long starttype #a endtype #a
  length 140
  FMT(vowel/a#_3)
endphoneme


phoneme o:
  vowel long starttype #o endtype #o
  length 227
  FMT(vowel/o_2)
endphoneme

phoneme o
  vowel starttype #o endtype #o
  length 140
  FMT(vowel/o)
endphoneme

phoneme O:
  vowel long starttype #o endtype #o
  length 210
  FMT(vowel/oo_4)
endphoneme


phoneme O
  vowel starttype #o endtype #o
  length 140
  FMT(vowel/0)
endphoneme


phoneme U
  vowel starttype #u endtype #u
  length 140
  FMT(vowel/uu_bck)
endphoneme


phoneme u:
  vowel long starttype #u endtype #u
  length 230
  FMT(vowel/u_bck)
endphoneme


// Nasal vowels
//=============

phoneme i~
  vowel long starttype #i endtype #i
  length 220
  FMT(vnasal/i_n2)
endphoneme

phoneme I~
  vowel long starttype #i endtype #i
  length 170
  FMT(vnasal/ii_n)
endphoneme

phoneme e~
  vowel long starttype #e endtype #e
  length 220
  FMT(vnasal/e_n)
endphoneme

phoneme E~
  vowel long starttype #e  endtype #e
  length 220
  FMT(vnasal/ee_n2)
endphoneme

phoneme a~
  vowel long starttype #a endtype #a
  length 240
  FMT(vnasal/a_n)
endphoneme

phoneme V~
  vowel long starttype #@ endtype #@
  length 220
  FMT(vnasal/V_n)
endphoneme

phoneme O~
  vowel long starttype #o endtype #o
  length 220
  FMT(vnasal/oo_n2)
endphoneme

phoneme o~
  vowel long starttype #o endtype #o
  length 220
  FMT(vnasal/o_n)
endphoneme

phoneme U~
  vowel starttype #u endtype #u
  length 170
  FMT(vnasal/u_n)
endphoneme

phoneme u~
  vowel long starttype #u endtype #u
  length 220
  FMT(vnasal/u_n)
endphoneme


// Diphthongs
//===========


phoneme aI
  vowel long starttype #@ endtype #i
  length 240
  long
  FMT(vdiph/&i)
endphoneme

phoneme aU
  vowel long starttype #a endtype #u
  length 240
  long
  FMT(vdiph/aau_3)
endphoneme



// CONSONANTS
//===========

phoneme v        // approximant, not fricative
  import_phoneme base/v#
  voicingswitch f
endphoneme


phoneme H       // use for full "h"
  import_phoneme base/h
endphoneme



// bilabial plosives
//==================

phoneme p
  import_phoneme consonants/p-
endphoneme


phoneme p#
  import_phoneme consonants/ph
endphoneme


phoneme  b       // this is [b]
  import_phoneme base/b
endphoneme


phoneme b#
  vcd blb stop
  lengthmod 5
  voicingswitch p#
  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
    FMT(b/xb)
  ENDIF

  FMT( b/b@2) addWav(ustop/p_asp, 70)
endphoneme




// dental plosives
//==================

phoneme t        // dental variant of /t/
  import_phoneme base/t[
  voicingswitch d
endphoneme


phoneme t#        // dental variant of /t/
  vls dnt stop
  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 nextPh(isPause2) THEN
    WAV(ustop/t_dnt, 35)
  ENDIF
  WAV(ustop/t_dnt, 50)
endphoneme


phoneme d       // dental variant of /d/
  import_phoneme base/d[
  voicingswitch t
endphoneme


phoneme d#
  vcd dnt stop
  lengthmod 5
  voicingswitch t#
  Vowelin f1=0  f2=1500 -300 300  f3=-100 80
  Vowelout f1=0 f2=1500 -300 250  f3=-100 80  rms=20

  IF PreVoicing THEN
    FMT(d/xd)
  ENDIF

  FMT(d/xd3) addWav(ustop/t_dnt, 40)
endphoneme




// retroflex plosives
//===================

phoneme t.
  vls rfx stop
  lengthmod 2
  ipa ʈ
  voicingswitch d.
  Vowelin f1=0  f2=1800 -300 300  f3=-400 80
  Vowelout f1=0 f2=1800 -300 250  f3=-400 80  rms=20 colr=2
  WAV(ustop/t_short)
endphoneme

phoneme t.#
  vls rfx stop
  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.
  vcd rfx stop
  lengthmod 5
  voicingswitch t.
  ipa ɖ
  Vowelin f1=1  f2=1800 -300 300  f3=-400 80
  Vowelout f1=1 f2=1800 -300 300  f3=-400 80 colr=2

  IF PreVoicing THEN
    FMT(d/xdr)
  ENDIF

  IF nextPh(isPause2) THEN
    FMT(d/d_) addWav(x/d_)
  ENDIF

  FMT(d/dr) addWav(x/d)
endphoneme


phoneme d.#
  vcd rfx stop
  lengthmod 5
  ipa ɖU+02B0
  voicingswitch t.#
  Vowelin f1=1  f2=1800 -300 300  f3=-400 80
  Vowelout f1=1 f2=1800 -300 300  f3=-400 80 colr=2

  IF PreVoicing THEN
    FMT(d/xdr)
  ENDIF

  FMT(d/dr) addWav(ustop/t)
//  FMT(d/dr) addWav(ustop/th_rfx)
endphoneme




// palatal plosives
//=================

// also try [tS] and [dZ]

phoneme c
  vls pla afr sibilant
  voicingswitch dZ
  lengthmod 2
  Vowelin f1=0  f2=2300 200 400  f3=-100 80

  IF nextPh(isPause2) THEN
    WAV(ustop/tsh_)
  ENDIF
  WAV(ustop/tsh_unasp)
endphoneme



phoneme c#
  CALL base/tS;
  ipa cU+02B0
endphoneme


phoneme J
  import_phoneme base/J
endphoneme


phoneme J#
  vcd pal afr sibilant
  lengthmod 5
  voicingswitch c#
  Vowelin f1=0  f2=2700 400 600  f3=300 80 rate len=70
  Vowelout f1=0 f2=2700 400 600  f3=300 80 colr=1

  IF PreVoicing THEN
    FMT(dzh/xdz_pzd)
  ENDIF

  FMT(dzh/xdz_pzd) addWav(ustop/ts_pzd)
endphoneme





// velar plosives
//==================


phoneme k
  import_phoneme consonants/k-
  voicingswitch g
endphoneme

phoneme k#
  import_phoneme consonants/k#
  voicingswitch g#
endphoneme


phoneme g
  import_phoneme base/g
  voicingswitch k
endphoneme


phoneme g#
  vcd dnt stop
  lengthmod 5
  voicingswitch k#
  Vowelin f1=1  f2=2300 200 300  f3=-150 80  rms=20
  Vowelout f1=0 f2=2300 300 400  f3=-150 80  rms=20

  IF PreVoicing THEN
    FMT(g2/xg)
  ENDIF

  IF nextPh(isPause2) THEN
    FMT(g2/xg) addWav(ustop/k_asp, 35)
  ENDIF
  FMT(g2/xg) addWav(ustop/k_asp, 50)
endphoneme

//================

phoneme #X2  // click, use for indicating combining long vowels
  vls alv frc sibilant
  lengthmod 3
  WAV(ustop/percus02, 60)
endphoneme


phoneme r
  liquid rhotic
  lengthmod 3
  
  IF thisPh(isWordEnd) THEN
    CALL base/r/
  ELSE
    IF prevPhW(isVowel) THEN
      IF nextPhW(isNotVowel) THEN
        IF nextPhW(isUStop) OR nextPhW(isVStop) THEN
          ChangePhoneme(*)
        ENDIF
      ENDIF

      IF nextPhW(V) THEN    // [V] may be removed by ChangePhoneme(NULL)
        IF next2PhW(isUStop) OR next2PhW(isVStop) THEN
          ChangePhoneme(*)
        ENDIF
      ELSE
        IF nextPhW(isVowel) THEN
          ChangePhoneme(*)
        ENDIF
      ENDIF
    ENDIF
    
    CALL base/r
  ENDIF
  ipa ɾ
endphoneme