
// Phonemes for Tamil
// This inherits from ph_hindi


phoneme @
  vowel  starttype #@  endtype #@
  length 130
  FMT(vowel/V_2)
endphoneme

phoneme a
  vowel  starttype #a  endtype #a
  length 130
  ChangeIfNotStressed(V)
  FMT(vowel/a)
endphoneme

phoneme V
  vowel  starttype #@  endtype #@
  ipa ʌ
  length 130
  IF nextPh(isWordEnd) AND nextPh(m) THEN
    ChangePhoneme(@)
  ENDIF
  FMT(vowel/V_3)
endphoneme

phoneme V#    // omit if the next phoneme is a vowel
  vowel  starttype #@  endtype #@
  length 130
  IF nextPhW(isVowel) OR nextPhW(#) THEN
    ChangePhoneme(NULL)
  ENDIF
  ChangePhoneme(V)
endphoneme

phoneme a:
  vowel  starttype #a  endtype #a
  length 300
  FMT(vowel/a_5)
endphoneme


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


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


phoneme i
  vowel  starttype #i  endtype #i
  length 130
  IF thisPh(isWordEnd) AND thisPh(isNotStressed) THEN
    FMT(vowel/ii_5)
  ENDIF
  FMT(vowel/i_6)
endphoneme


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



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


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


phoneme u
  vowel  starttype #u  endtype #u
  length 110
  ChangeIfNotStressed(U)
  FMT(vowel/u_6)
endphoneme

phoneme u2   // as [u] but don't reduce
  vowel  starttype #u  endtype #u
  length 110
  FMT(vowel/u_6)
endphoneme

phoneme U
  vowel  starttype #u  endtype #u
  ipa ʉ
  length 110
  FMT(vowel/u#_3)
endphoneme

phoneme u:
  vowel  starttype #u  endtype #u
  length 280
  IF prevPhW(isVel) THEN
  ELSE
    ChangeIfNotStressed(U:)
  ENDIF
  FMT(vowel/u_6)
endphoneme

phoneme U:
  vowel  starttype #u  endtype #u
  ipa ʉ
  length 270
  FMT(vowel/u#_3)
endphoneme


phoneme aI
  vowel  starttype #a  endtype #i
  length 280
  FMT(vdiph/ai_8)
endphoneme

phoneme aU
  vowel  starttype #a  endtype #u
  length 270
  FMT(vdiph/au)
endphoneme



phoneme t
  import_phoneme base2/t    // dental
endphoneme

// ?? This is standard [v].  Should be it [v] without the fricative noise?
phoneme v
  import_phoneme base/v
endphoneme

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

phoneme #    // a NULL phoneme for 'virama'
  virtual
  ChangePhoneme(NULL)
endphoneme

phoneme z.
  CALL base/z.
  ipa U+027B
endphoneme

phoneme r
  import_phoneme base/r
endphoneme

