ph_hindi_base 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. //====================================================
  2. // Base for Hindi and other Indian languages
  3. //====================================================
  4. phoneme : // Lengthen the previous vowel by "length"
  5. virtual
  6. length 100
  7. endphoneme
  8. phoneme @
  9. vwl flag1 starttype #@ endtype #@
  10. length 130
  11. ChangeIfDiminished(@-)
  12. IF nextPh(H) OR prevPh(H) THEN
  13. FMT(vowel/@_low)
  14. ENDIF
  15. IF nextPh(j) THEN
  16. FMT(vowel/V_3)
  17. ENDIF
  18. FMT(vowel/@_bck)
  19. endphoneme
  20. phoneme V
  21. vwl flag1 starttype #@ endtype #@
  22. length 140
  23. IF thisPh(isWordStart) THEN
  24. FMT(vowel/V_3)
  25. RETURN
  26. ENDIF
  27. IF thisPh(isNotStressed) THEN
  28. length 130
  29. IF thisPh(isWordEnd) AND NOT thisPh(isFirstVowel) THEN
  30. ChangePhoneme(NULL)
  31. ENDIF
  32. IF prevPh(H) THEN
  33. ChangePhoneme(@)
  34. ENDIF
  35. IF prev2PhW(isVowel) AND NOT nextVowel(isFlag1) THEN
  36. IF thisPh(isFinalVowel) AND nextPhW(isNotVowel) THEN
  37. // don't delete schwa before a word-final consonant
  38. ELSE
  39. ChangePhoneme(NULL)
  40. ENDIF
  41. ENDIF
  42. IF prevPh(isPalatal) AND NOT nextPh(H) THEN
  43. ChangePhoneme(@3)
  44. ELSEIF prevPh(r) THEN
  45. ChangePhoneme(@2)
  46. ELSE
  47. ChangePhoneme(@)
  48. ENDIF
  49. ENDIF
  50. IF nextPh(H) OR prevPh(H) THEN
  51. FMT(vowel/@_low)
  52. ENDIF
  53. IF prevPh(w) THEN
  54. FMT(vowel/V_4)
  55. ENDIF
  56. FMT(vowel/V_3)
  57. endphoneme
  58. phoneme @2
  59. vwl flag1 starttype #@ endtype #@
  60. length 130
  61. FMT(vowel/@_low)
  62. endphoneme
  63. phoneme @3
  64. vwl flag1 starttype #@ endtype #@
  65. length 130
  66. ChangeIfDiminished(@-)
  67. FMT(vowel/@_3)
  68. endphoneme
  69. phoneme i:
  70. vwl lng starttype #i endtype #i
  71. length 230
  72. IF thisPh(isUnstressed) THEN
  73. ChangePhoneme(i)
  74. ENDIF
  75. IfNextVowelAppend(;)
  76. FMT(vowel/i_fnt)
  77. endphoneme
  78. phoneme i // as [i:] but not marked as 'long'
  79. vwl starttype #i endtype #i
  80. length 230
  81. IfNextVowelAppend(;)
  82. FMT(vowel/ii_6)
  83. endphoneme
  84. phoneme I
  85. vwl starttype #i endtype #i
  86. length 100
  87. IfNextVowelAppend(;)
  88. FMT(vowel/ii_3)
  89. endphoneme
  90. phoneme e:
  91. vwl lng starttype #e endtype #e
  92. length 220
  93. FMT(vowel/e_2)
  94. endphoneme
  95. phoneme e
  96. vwl starttype #e endtype #e
  97. length 140
  98. FMT(vowel/e_2)
  99. endphoneme
  100. phoneme E:
  101. vwl lng starttype #e endtype #e
  102. length 220
  103. FMT(vdiph/ee-e)
  104. endphoneme
  105. phoneme E
  106. vwl starttype #e endtype #e
  107. length 140
  108. FMT(vowel/e_mid)
  109. endphoneme
  110. phoneme &:
  111. vwl lng starttype #a endtype #a
  112. length 220
  113. FMT(vowel/&)
  114. endphoneme
  115. phoneme a:
  116. vwl lng starttype #a endtype #a
  117. length 200
  118. IF nextPhW(j) THEN
  119. FMT(vowel/a_5)
  120. ENDIF
  121. FMT(vowel/aa_9)
  122. endphoneme
  123. phoneme a
  124. vwl lng starttype #a endtype #a
  125. length 140
  126. FMT(vowel/a#_3)
  127. endphoneme
  128. phoneme o:
  129. vwl lng starttype #o endtype #o
  130. length 227
  131. FMT(vowel/o_2)
  132. endphoneme
  133. phoneme o
  134. vwl starttype #o endtype #o
  135. length 140
  136. FMT(vowel/o)
  137. endphoneme
  138. phoneme O:
  139. vwl lng starttype #o endtype #o
  140. length 210
  141. FMT(vowel/oo_4)
  142. endphoneme
  143. phoneme O
  144. vwl starttype #o endtype #o
  145. length 140
  146. FMT(vowel/0)
  147. endphoneme
  148. phoneme U
  149. vwl starttype #u endtype #u
  150. length 140
  151. FMT(vowel/uu_bck)
  152. endphoneme
  153. phoneme u:
  154. vwl lng starttype #u endtype #u
  155. length 230
  156. FMT(vowel/u_bck)
  157. endphoneme
  158. // Nasal vowels
  159. //=============
  160. phoneme i~
  161. vwl lng starttype #i endtype #i
  162. length 220
  163. FMT(vnasal/i_n2)
  164. endphoneme
  165. phoneme I~
  166. vwl lng starttype #i endtype #i
  167. length 170
  168. FMT(vnasal/ii_n)
  169. endphoneme
  170. phoneme e~
  171. vwl lng starttype #e endtype #e
  172. length 220
  173. FMT(vnasal/e_n)
  174. endphoneme
  175. phoneme E~
  176. vwl lng starttype #e endtype #e
  177. length 220
  178. FMT(vnasal/ee_n2)
  179. endphoneme
  180. phoneme a~
  181. vwl lng starttype #a endtype #a
  182. length 240
  183. FMT(vnasal/a_n)
  184. endphoneme
  185. phoneme V~
  186. vwl lng starttype #@ endtype #@
  187. length 220
  188. FMT(vnasal/V_n)
  189. endphoneme
  190. phoneme O~
  191. vwl lng starttype #o endtype #o
  192. length 220
  193. FMT(vnasal/oo_n2)
  194. endphoneme
  195. phoneme o~
  196. vwl lng starttype #o endtype #o
  197. length 220
  198. FMT(vnasal/o_n)
  199. endphoneme
  200. phoneme U~
  201. vwl starttype #u endtype #u
  202. length 170
  203. FMT(vnasal/u_n)
  204. endphoneme
  205. phoneme u~
  206. vwl lng starttype #u endtype #u
  207. length 220
  208. FMT(vnasal/u_n)
  209. endphoneme
  210. // Diphthongs
  211. //===========
  212. phoneme aI
  213. vwl lng starttype #@ endtype #i
  214. length 240
  215. lng
  216. FMT(vdiph/&i)
  217. endphoneme
  218. phoneme aU
  219. vwl lng starttype #a endtype #u
  220. length 240
  221. lng
  222. FMT(vdiph/aau_3)
  223. endphoneme
  224. // CONSONANTS
  225. //===========
  226. phoneme v // approximant, not fricative
  227. import_phoneme base1/v#
  228. voicingswitch f
  229. endphoneme
  230. phoneme H // use for full "h"
  231. import_phoneme base1/h
  232. endphoneme
  233. // bilabial plosives
  234. //==================
  235. phoneme p
  236. import_phoneme consonants/p-
  237. endphoneme
  238. phoneme p#
  239. import_phoneme consonants/ph
  240. endphoneme
  241. phoneme b // this is [b]
  242. import_phoneme base1/b
  243. endphoneme
  244. phoneme b#
  245. vcd blb stp
  246. lengthmod 5
  247. voicingswitch p#
  248. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
  249. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
  250. IF PreVoicing THEN
  251. FMT(b/xb)
  252. ENDIF
  253. FMT( b/b@2) addWav(ustop/p_asp, 70)
  254. endphoneme
  255. // dental plosives
  256. //==================
  257. phoneme t // dental variant of /t/
  258. import_phoneme base1/t[
  259. voicingswitch d
  260. endphoneme
  261. phoneme t# // dental variant of /t/
  262. vls dnt stp
  263. lengthmod 2
  264. voicingswitch d
  265. Vowelin f1=0 f2=1500 -300 300 f3=-100 80 amp=16
  266. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
  267. IF nextPh(isPause2) THEN
  268. WAV(ustop/t_dnt, 35)
  269. ENDIF
  270. WAV(ustop/t_dnt, 50)
  271. endphoneme
  272. phoneme d // dental variant of /d/
  273. import_phoneme base1/d[
  274. voicingswitch t
  275. endphoneme
  276. phoneme d#
  277. vcd dnt stp
  278. lengthmod 5
  279. voicingswitch t#
  280. Vowelin f1=0 f2=1500 -300 300 f3=-100 80
  281. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
  282. IF PreVoicing THEN
  283. FMT(d/xd)
  284. ENDIF
  285. FMT(d/xd3) addWav(ustop/t_dnt, 40)
  286. endphoneme
  287. // retroflex plosives
  288. //===================
  289. phoneme t.
  290. vls rfx stp
  291. lengthmod 2
  292. ipa ʈ
  293. voicingswitch d.
  294. Vowelin f1=0 f2=1800 -300 300 f3=-400 80
  295. Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
  296. WAV(ustop/t_short)
  297. endphoneme
  298. phoneme t.#
  299. vls rfx stp
  300. lengthmod 2
  301. ipa ʈU+02B0
  302. voicingswitch d.#
  303. Vowelin f1=0 f2=1800 -300 300 f3=-200 80
  304. Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
  305. IF nextPhW(t.#) THEN
  306. ChangePhoneme(t.)
  307. ENDIF
  308. WAV(ustop/th_rfx2, 80)
  309. endphoneme
  310. phoneme d.
  311. vcd rfx stp
  312. lengthmod 5
  313. voicingswitch t.
  314. ipa ɖ
  315. Vowelin f1=1 f2=1800 -300 300 f3=-400 80
  316. Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
  317. IF PreVoicing THEN
  318. FMT(d/xdr)
  319. ENDIF
  320. IF nextPh(isPause2) THEN
  321. FMT(d/d_) addWav(x/d_)
  322. ENDIF
  323. FMT(d/dr) addWav(x/d)
  324. endphoneme
  325. phoneme d.#
  326. vcd rfx stp
  327. lengthmod 5
  328. ipa ɖU+02B0
  329. voicingswitch t.#
  330. Vowelin f1=1 f2=1800 -300 300 f3=-400 80
  331. Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
  332. IF PreVoicing THEN
  333. FMT(d/xdr)
  334. ENDIF
  335. FMT(d/dr) addWav(ustop/t)
  336. // FMT(d/dr) addWav(ustop/th_rfx)
  337. endphoneme
  338. // palatal plosives
  339. //=================
  340. // also try [tS] and [dZ]
  341. phoneme c
  342. vls pla afr sib
  343. voicingswitch dZ
  344. lengthmod 2
  345. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  346. IF nextPh(isPause2) THEN
  347. WAV(ustop/tsh_)
  348. ENDIF
  349. WAV(ustop/tsh_unasp)
  350. endphoneme
  351. phoneme c#
  352. CALL base1/tS;
  353. ipa cU+02B0
  354. endphoneme
  355. phoneme J
  356. import_phoneme base1/J
  357. endphoneme
  358. phoneme J#
  359. vcd pal afr sib
  360. lengthmod 5
  361. voicingswitch c#
  362. Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70
  363. Vowelout f1=0 f2=2700 400 600 f3=300 80 colr=1
  364. IF PreVoicing THEN
  365. FMT(dzh/xdz_pzd)
  366. ENDIF
  367. FMT(dzh/xdz_pzd) addWav(ustop/ts_pzd)
  368. endphoneme
  369. // velar plosives
  370. //==================
  371. phoneme k
  372. import_phoneme consonants/k-
  373. voicingswitch g
  374. endphoneme
  375. phoneme k#
  376. import_phoneme consonants/k#
  377. voicingswitch g#
  378. endphoneme
  379. phoneme g
  380. import_phoneme base1/g
  381. voicingswitch k
  382. endphoneme
  383. phoneme g#
  384. vcd dnt stp
  385. lengthmod 5
  386. voicingswitch k#
  387. Vowelin f1=1 f2=2300 200 300 f3=-150 80 rms=20
  388. Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20
  389. IF PreVoicing THEN
  390. FMT(g2/xg)
  391. ENDIF
  392. IF nextPh(isPause2) THEN
  393. FMT(g2/xg) addWav(ustop/k_asp, 35)
  394. ENDIF
  395. FMT(g2/xg) addWav(ustop/k_asp, 50)
  396. endphoneme
  397. //================
  398. phoneme #X2 // click, use for indicating combining long vowels
  399. vls alv frc sib
  400. lengthmod 3
  401. WAV(ustop/percus02, 60)
  402. endphoneme
  403. phoneme r
  404. liquid rhotic
  405. lengthmod 3
  406. IF thisPh(isWordEnd) THEN
  407. CALL base1/r/
  408. ELSE
  409. IF prevPhW(isVowel) THEN
  410. IF nextPhW(isNotVowel) THEN
  411. IF nextPhW(isUStop) OR nextPhW(isVStop) THEN
  412. ChangePhoneme(*)
  413. ENDIF
  414. ENDIF
  415. IF nextPhW(V) THEN // [V] may be removed by ChangePhoneme(NULL)
  416. IF next2PhW(isUStop) OR next2PhW(isVStop) THEN
  417. ChangePhoneme(*)
  418. ENDIF
  419. ELSE
  420. IF nextPhW(isVowel) THEN
  421. ChangePhoneme(*)
  422. ENDIF
  423. ENDIF
  424. ENDIF
  425. CALL base1/r
  426. ENDIF
  427. ipa ɾ
  428. endphoneme