| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570 | 
//====================================================
//  Hindi
//====================================================
phoneme : //  Lengthen the previous vowel by "length"
  virtual
  length 100
endphoneme
phoneme @
  vwl 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
  vwl 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
  vwl flag1 starttype #@  endtype #@
  length 130
  FMT(vowel/@_low)
endphoneme
phoneme @3
  vwl flag1 starttype #@  endtype #@
  length 130
  ChangeIfDiminished(@-)
  FMT(vowel/@_3)
endphoneme
phoneme i:
  vwl lng 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'
  vwl starttype #i endtype #i
  length 230
  IfNextVowelAppend(;)
  FMT(vowel/ii_6)
endphoneme
phoneme I
  vwl starttype #i endtype #i
  length 100
  IfNextVowelAppend(;)
  FMT(vowel/ii_3)
endphoneme
phoneme e:
  vwl lng starttype #e endtype #e
  length 220
  FMT(vowel/e_2)
endphoneme
phoneme e
  vwl starttype #e endtype #e
  length 140
  FMT(vowel/e_2)
endphoneme
phoneme E:
  vwl lng starttype #e endtype #e
  length 220
  FMT(vdiph/ee-e)
endphoneme
phoneme E
  vwl starttype #e endtype #e
  length 140
  FMT(vowel/e_mid)
endphoneme
phoneme &:
  vwl lng starttype #a endtype #a
  length 220
  FMT(vowel/&)
endphoneme
phoneme a:
  vwl lng starttype #a endtype #a
  length 200
//  IF nextPhW(j) THEN
    FMT(vowel/a_5)
//  ENDIF
//  FMT(vowel/aa_9)
endphoneme
phoneme a
  vwl lng starttype #a endtype #a
  length 140
  FMT(vowel/a#_3)
endphoneme
phoneme o:
  vwl lng starttype #o endtype #o
  length 227
  FMT(vowel/o_2)
endphoneme
phoneme o
  vwl starttype #o endtype #o
  length 140
  FMT(vowel/o)
endphoneme
phoneme O:
  vwl lng starttype #o endtype #o
  length 210
  FMT(vowel/oo_4)
endphoneme
phoneme O
  vwl starttype #o endtype #o
  length 140
  FMT(vowel/0)
endphoneme
phoneme U
  vwl starttype #u endtype #u
  length 140
  FMT(vowel/uu_bck)
endphoneme
phoneme u:
  vwl lng starttype #u endtype #u
  length 230
  FMT(vowel/u_bck)
endphoneme
// Nasal vowels
//=============
phoneme i~
  vwl lng starttype #i endtype #i
  length 220
  FMT(vnasal/i_n2)
endphoneme
phoneme I~
  vwl lng starttype #i endtype #i
  length 170
  FMT(vnasal/ii_n)
endphoneme
phoneme e~
  vwl lng starttype #e endtype #e
  length 220
  FMT(vnasal/e_n)
endphoneme
phoneme E~
  vwl lng starttype #e  endtype #e
  length 220
  FMT(vnasal/ee_n2)
endphoneme
phoneme a~
  vwl lng starttype #a endtype #a
  length 220
  FMT(vnasal/&_n)
endphoneme
phoneme V~
  vwl lng starttype #@ endtype #@
  length 220
  FMT(vnasal/V_n)
endphoneme
phoneme O~
  vwl lng starttype #o endtype #o
  length 220
  FMT(vnasal/oo_n2)
endphoneme
phoneme o~
  vwl lng starttype #o endtype #o
  length 220
  FMT(vnasal/o_n)
endphoneme
phoneme U~
  vwl starttype #u endtype #u
  length 170
  FMT(vnasal/u_n)
endphoneme
phoneme u~
  vwl lng starttype #u endtype #u
  length 220
  FMT(vnasal/u_n)
endphoneme
// Diphthongs
//===========
phoneme aI
  vwl lng starttype #@ endtype #i
  length 240
  lng
  FMT(vdiph/&i)
endphoneme
phoneme aU
  vwl lng starttype #a endtype #u
  length 240
  lng
  FMT(vdiph/aau_3)
endphoneme
// CONSONANTS
//===========
phoneme v        // approximant, not fricative
  import_phoneme base1/v#
  voicingswitch f
endphoneme
phoneme H       // use for full "h"
  import_phoneme base1/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 base1/b
endphoneme
phoneme b#
  vcd blb stp
  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 base1/t[
  voicingswitch d
endphoneme
phoneme t#        // dental variant of /t/
  vls dnt stp
  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 base1/d[
  voicingswitch t
endphoneme
phoneme d#
  vcd dnt stp
  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 stp
  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 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.
  vcd rfx stp
  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 stp
  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 sib
  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 base1/tS;
  ipa cU+02B0
endphoneme
phoneme J
  import_phoneme base1/J
endphoneme
phoneme J#
  vcd pal afr sib
  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 base1/g
  voicingswitch k
endphoneme
phoneme g#
  vcd dnt stp
  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 sib
  lengthmod 3
  WAV(ustop/percus02, 60)
endphoneme
phoneme r
  liquid rhotic
  lengthmod 3
  IF thisPh(isWordEnd) THEN
    CALL base1/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 base1/r
  ENDIF
  ipa ɾ
endphoneme
 |