
//====================================================
//  Estonian
//====================================================

phoneme : //  Lengthen previous vowel by "length"
  virtual
  length 160
endphoneme

phoneme a
  vowel starttype #a endtype #a
  length 170
//  ChangeIfUnstressed(A)
  FMT(vowel/aa_9)
endphoneme

phoneme a:
  vowel starttype #a endtype #a
  length 340
  FMT(vowel/aa)
endphoneme

//phoneme A
//  vowel starttype #a endtype #a
//  length 170
//  FMT(vowel/a#_2)
//endphoneme

phoneme A1
  vowel starttype #a endtype #a
  length 255
  FMT(vowel/aa_8)
endphoneme

phoneme e
  vowel starttype #e endtype #e
  length 160
//  ChangeIfUnstressed(E)
  FMT(vowel/e#)
endphoneme

phoneme e:
  vowel starttype #e endtype #e
  length 320
  FMT(vowel/e_7)
endphoneme

//phoneme E
//  vowel starttype #e endtype #e
//  length 160
//  FMT(vowel/ee_4)
//endphoneme

phoneme E1
  vowel starttype #e endtype #e
  length 240
  FMT(vowel/ee#_2)
endphoneme

phoneme i
  vowel starttype #i endtype #i
  length 140
//  ChangeIfUnstressed(I)
  FMT(vowel/i_8)
endphoneme

phoneme i:
  vowel starttype #i endtype #i
  length 280
  FMT(vowel/i_7)
endphoneme

//phoneme I
//  vowel starttype #i endtype #i
//  length 140
//  FMT(vowel/i_3)
//endphoneme

phoneme I1
  vowel starttype #i endtype #i
  length 210
  FMT(vowel/ii_3)
endphoneme

phoneme i1
  vowel starttype #i endtype #i
  length 30
  FMT(vowel/i#_7)
endphoneme

phoneme o
  vowel starttype #o endtype #o
  length 160
//  ChangeIfUnstressed(O)
  FMT(vowel/o_mid)
endphoneme

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

//phoneme O
//  vowel starttype #o endtype #o
//  length 150
//  FMT(vowel/o_mid)
//endphoneme

phoneme O1
  vowel starttype #o endtype #o
  length 225
  FMT(vowel/oo_4)
endphoneme

phoneme u
  vowel starttype #u endtype #u
  length 145
//  ChangeIfUnstressed(U)
  FMT(vowel/u_bck2)
endphoneme

phoneme u:    // TEST
  vowel starttype #u endtype #u
  length 290
  FMT(vowel/u_bck3)
endphoneme

//phoneme U    // TEST
//  vowel starttype #u endtype #u
//  length 145
//  FMT(vowel/u_5)
//endphoneme

phoneme U1    // TEST
  vowel starttype #u endtype #u
  length 218
  FMT(vowel/u_5)
endphoneme

// õ
phoneme 8
  vowel starttype #@ endtype #@
  length 165
  FMT(vowel/8_7)
endphoneme

phoneme 8:
  vowel starttype #@ endtype #@
  length 330
  FMT(vowel/8_4)
endphoneme

// ä
phoneme &
  vowel starttype #a endtype #a
  length 175
  FMT(vowel/&)
endphoneme

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

// ö
phoneme Y
  vowel starttype #@ endtype #@
  length 165
  FMT(vowel/y#)
endphoneme

phoneme Y:
  vowel starttype #@ endtype #@
  length 330
  FMT(vowel/y#)
endphoneme

// ü
phoneme y
  vowel starttype #u endtype #u
  length 145
  FMT(vowel/y)
endphoneme

phoneme y:
  vowel starttype #u endtype #u
  length 290
  FMT(vowel/y)
endphoneme



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


phoneme &i
  vowel starttype #a endtype #i
  length 315
  long
  FMT(vdiph/&i)
endphoneme

phoneme Yi
  vowel starttype #@ endtype #i
  length 305
  long
  FMT(vdiph/@i)
endphoneme

phoneme yi
  vowel starttype #u endtype #i
  length 285
  long
  FMT(vdiph/yi)
endphoneme


// phoneme oe

// phoneme ue

// phoneme qe

// phoneme xe

// phoneme ce

// phoneme qa

// phoneme ca


//phoneme 8u
//  vowel starttype #@ endtype #u
//  length 310
//  long
//  FMT(vdiph/8u)
//endphoneme

// phoneme xu




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


phoneme v        // approximant, not fricative
  vcd lbd frc
  lengthmod 6
  voicingswitch f
  Vowelin  f1=0  f2=1000 -300 -200  f3=-300 100
  Vowelout f1=0  f2=1000 -500 -300  f3=-300 60  len=50
  IF nextPh(isPause2) THEN
    FMT(voc/v_)
  ENDIF
  FMT(voc/v)
endphoneme


phoneme t        // dental variant of /t/
  vls dnt stop lengthenstop
  voicingswitch d
  lengthmod 5
  Vowelin f1=1  f2=1500 -250 250  f3=-100 80  amp=20
  Vowelout f1=0 f2=1500 -300 250  f3=-100 80  rms=20

  IF nextPh(isPause2) THEN
    WAV(ustop/t_dnt, 60)
  ENDIF
  WAV(ustop/t_hi, 80)
endphoneme


phoneme d
  vcd dnt stop
  voicingswitch t
  lengthmod 5
  Vowelin f1=2  f2=1700 -100 200  f3=0 80
  Vowelout f1=2 f2=1700 -100 200  f3=0 80 rms=20

  IF PreVoicing THEN
    FMT(d/xd)
  ENDIF

  IF nextPh(isPause2) THEN
    FMT(d/d_)  addWav(x/d_)
  ELIF nextPh(r) THEN
    FMT(d/dr) addWav(x/d_dnt, 60)
  ENDIF

  FMT(d/d) addWav(x/d_dnt, 60)
endphoneme



phoneme p
  import_phoneme base2/p
  voicingswitch b
endphoneme


phoneme r   // used for [r] when not preceding a vowel
  liquid
  lengthmod 2
  IF nextPh(n) THEN
    FMT(r3/r_n) addWav(r3/rx)
  ENDIF
  FMT(r3/r_) addWav(r3/rx)
endphoneme

phoneme k          // tasasemad kl�klsud
  vls vel stop
  lengthmod 5
  voicingswitch g
  Vowelin f1=0  f2=2300 200 400  f3=-100 80
  Vowelout f1=0 f2=2300 300 400  f3=-100 80  rms=20
  IF nextPh(isPause) THEN
    WAV(ustop/k_unasp)
  ENDIF
  IF nextPh(#i) OR nextPh(l^) THEN
    WAV(ustop/ki, 40)
  ENDIF
  IF nextPh(l) THEN
    WAV(ustop/kl, 40)
  ENDIF
  IF nextPh(r) THEN
    WAV(ustop/kr, 40)
  ENDIF
  IF nextPh(k) THEN
    WAV(ustop/k_unasp, 10)
  ENDIF
  WAV(ustop/k_unasp, 20)   // weaker
endphoneme


phoneme s2  // second part of long [s]
  import_phoneme consonants/s2
endphoneme


phoneme h
  vls glt apr
  lengthmod 3

  IF nextPh(#@) THEN
    WAV(h/h@)
  ELIF nextPh(#a) THEN
    WAV(h/ha)
  ELIF nextPh(#e) THEN
    WAV(h/he)
  ELIF nextPh(#i) THEN
    WAV(h/hi)
  ELIF nextPh(#o) THEN
    WAV(h/ho)
  ELIF nextPh(#u) THEN
    WAV(h/hu)
  ENDIF
  WAV(h/h_, 70)  // no vowel following
endphoneme


// Palatalized versions of consonants

phoneme s^
  vls alv frc sibilant palatal
  voicingswitch z
  lengthmod 3
  Vowelin  f1=0  f2=1700 -300 300  f3=-100 80
  Vowelout f1=0  f2=1700 -300 250  f3=-100 80  rms=20

  WAV(ufric/s_pal)
endphoneme

phoneme t^
  vls pal stop palatal
  lengthmod 5
  voicingswitch d^
  Vowelin f1=0  f2=2700 400 600  f3=300 80 rate len=70
  Vowelout f1=1  f2=2700 400 600  f3=200 70 len=50 colr=1
  IF nextPh(isPause2) THEN
    WAV(ustop/t_pzd, 60)
  ENDIF
  WAV(ustop/t_hi, 80)
endphoneme

phoneme d^
  vcd alv stop palatal
  lengthmod 5
  voicingswitch t^
  Vowelin f1=2  f2=2700 400 600  f3=200 80 rate len=80
  Vowelout f1=2 f2=2700 400 600  f3=200 80 rate len=100 colr=1

  IF PreVoicing THEN
    FMT(d/xd_pzd)
  ENDIF

  IF nextPh(isPause2) THEN
    FMT(d/d_) addWav(x/d_pzd, 40)
  ELIF nextPh(isRhotic) THEN
    FMT(d/dr) addWav(x/d_pzd, 80)
  ENDIF

  FMT(d/d) addWav(x/d_pzd, 80)
endphoneme
