eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ph_hindi 7.7KB

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