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 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  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) OR prevPh(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(isWordStart) THEN
  21. FMT(vowel/V_3)
  22. RETURN
  23. ENDIF
  24. IF thisPh(isNotStressed) THEN
  25. IF prevPh(H) THEN
  26. ChangePhoneme(@)
  27. ENDIF
  28. IF thisPh(isWordEnd) THEN
  29. ChangePhoneme(NULL)
  30. ENDIF
  31. IF prev2PhW(isVowel) AND NOT nextVowel(isFlag1) THEN
  32. IF nextPhW(isNotVowel) AND nextPh(isWordEnd) THEN
  33. // don't delete schwa before a word-final consonant
  34. ELSE
  35. ChangePhoneme(NULL)
  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) OR prevPh(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. IF nextPhW(j) THEN
  111. FMT(vowel/a_5)
  112. ENDIF
  113. FMT(vowel/aa_9)
  114. endphoneme
  115. phoneme a
  116. vowel long starttype #a endtype #a
  117. length 130
  118. FMT(vowel/a#_3)
  119. endphoneme
  120. phoneme o:
  121. vowel long starttype #o endtype #o
  122. length 227
  123. FMT(vowel/o_2)
  124. endphoneme
  125. phoneme o
  126. vowel starttype #o endtype #o
  127. length 130
  128. FMT(vowel/o)
  129. endphoneme
  130. phoneme O:
  131. vowel long starttype #o endtype #o
  132. length 210
  133. FMT(vowel/oo_4)
  134. endphoneme
  135. phoneme O
  136. vowel starttype #o endtype #o
  137. length 130
  138. FMT(vowel/0)
  139. endphoneme
  140. phoneme U
  141. vowel starttype #u endtype #u
  142. length 120
  143. FMT(vowel/uu_bck)
  144. endphoneme
  145. phoneme u:
  146. vowel long starttype #u endtype #u
  147. length 230
  148. FMT(vowel/u_bck)
  149. endphoneme
  150. // Nasal vowels
  151. //=============
  152. phoneme i~
  153. vowel long starttype #i endtype #i
  154. length 220
  155. FMT(vnasal/i_n2)
  156. endphoneme
  157. phoneme I~
  158. vowel long starttype #i endtype #i
  159. length 170
  160. FMT(vnasal/ii_n)
  161. endphoneme
  162. phoneme e~
  163. vowel long starttype #e endtype #e
  164. length 220
  165. FMT(vnasal/e_n)
  166. endphoneme
  167. phoneme E~
  168. vowel long starttype #e endtype #e
  169. length 220
  170. FMT(vnasal/ee_n2)
  171. endphoneme
  172. phoneme a~
  173. vowel long starttype #a endtype #a
  174. length 220
  175. FMT(vnasal/&_n)
  176. endphoneme
  177. phoneme V~
  178. vowel long starttype #@ endtype #@
  179. length 220
  180. FMT(vnasal/V_n)
  181. endphoneme
  182. phoneme O~
  183. vowel long starttype #o endtype #o
  184. length 220
  185. FMT(vnasal/oo_n2)
  186. endphoneme
  187. phoneme o~
  188. vowel long starttype #o endtype #o
  189. length 220
  190. FMT(vnasal/o_n)
  191. endphoneme
  192. phoneme U~
  193. vowel starttype #u endtype #u
  194. length 170
  195. FMT(vnasal/u_n)
  196. endphoneme
  197. phoneme u~
  198. vowel long starttype #u endtype #u
  199. length 220
  200. FMT(vnasal/u_n)
  201. endphoneme
  202. // Diphthongs
  203. //===========
  204. phoneme aI
  205. vowel long starttype #@ endtype #i
  206. length 240
  207. long
  208. FMT(vdiph/&i)
  209. endphoneme
  210. phoneme aU
  211. vowel long starttype #a endtype #u
  212. length 240
  213. long
  214. FMT(vdiph/aau_3)
  215. endphoneme
  216. // CONSONANTS
  217. //===========
  218. phoneme v // approximant, not fricative
  219. import_phoneme base/v#
  220. voicingswitch f
  221. endphoneme
  222. phoneme H // use for full "h"
  223. import_phoneme base/h
  224. endphoneme
  225. // bilabial plosives
  226. //==================
  227. phoneme p
  228. import_phoneme consonants/p-
  229. endphoneme
  230. phoneme p#
  231. import_phoneme consonants/ph
  232. endphoneme
  233. phoneme b // this is [b]
  234. import_phoneme base/b
  235. endphoneme
  236. phoneme b#
  237. vcd blb stop
  238. lengthmod 5
  239. voicingswitch p#
  240. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
  241. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
  242. IF PreVoicing THEN
  243. FMT(b/xb)
  244. ENDIF
  245. FMT( b/b@2) addWav(ustop/p_asp, 70)
  246. endphoneme
  247. // dental plosives
  248. //==================
  249. phoneme t // dental variant of /t/
  250. import_phoneme base/t[
  251. voicingswitch d
  252. endphoneme
  253. phoneme t# // dental variant of /t/
  254. vls dnt stop
  255. lengthmod 2
  256. voicingswitch d
  257. Vowelin f1=0 f2=1500 -300 300 f3=-100 80 amp=16
  258. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
  259. IF nextPh(isPause2) THEN
  260. WAV(ustop/t_dnt, 35)
  261. ENDIF
  262. WAV(ustop/t_dnt, 50)
  263. endphoneme
  264. phoneme d // dental variant of /d/
  265. import_phoneme base/d[
  266. voicingswitch t
  267. endphoneme
  268. phoneme d#
  269. vcd dnt stop
  270. lengthmod 5
  271. voicingswitch t#
  272. Vowelin f1=0 f2=1500 -300 300 f3=-100 80
  273. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
  274. IF PreVoicing THEN
  275. FMT(d/xd)
  276. ENDIF
  277. FMT(d/xd3) addWav(ustop/t_dnt, 40)
  278. endphoneme
  279. // retroflex plosives
  280. //===================
  281. phoneme t.
  282. vls rfx stop
  283. lengthmod 2
  284. ipa ʈ
  285. voicingswitch d.
  286. Vowelin f1=0 f2=1800 -300 300 f3=-400 80
  287. Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
  288. WAV(ustop/t_short)
  289. endphoneme
  290. phoneme t.#
  291. vls rfx stop
  292. lengthmod 2
  293. ipa ʈU+02B0
  294. voicingswitch d.#
  295. Vowelin f1=0 f2=1800 -300 300 f3=-400 80
  296. Vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
  297. // WAV(ustop/th_rfx)
  298. WAV(ustop/t)
  299. endphoneme
  300. phoneme d.
  301. vcd rfx stop
  302. lengthmod 5
  303. voicingswitch t.
  304. ipa ɖ
  305. Vowelin f1=1 f2=1800 -300 300 f3=-400 80
  306. Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
  307. IF PreVoicing THEN
  308. FMT(d/xdr)
  309. ENDIF
  310. IF nextPh(isPause2) THEN
  311. FMT(d/d_) addWav(x/d_)
  312. ENDIF
  313. FMT(d/dr) addWav(x/d)
  314. endphoneme
  315. phoneme d.#
  316. vcd rfx stop
  317. lengthmod 5
  318. ipa ɖU+02B0
  319. voicingswitch t.#
  320. Vowelin f1=1 f2=1800 -300 300 f3=-400 80
  321. Vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
  322. IF PreVoicing THEN
  323. FMT(d/xdr)
  324. ENDIF
  325. FMT(d/dr) addWav(ustop/t)
  326. // FMT(d/dr) addWav(ustop/th_rfx)
  327. endphoneme
  328. // palatal plosives
  329. //=================
  330. // also try [tS] and [dZ]
  331. phoneme c
  332. import_phoneme base/c
  333. endphoneme
  334. phoneme c#
  335. CALL base/tS;
  336. ipa cU+02B0
  337. endphoneme
  338. phoneme J
  339. import_phoneme base/J
  340. endphoneme
  341. phoneme J#
  342. vcd pal afr sibilant
  343. lengthmod 5
  344. voicingswitch c#
  345. Vowelin f1=0 f2=2700 400 600 f3=300 80 rate len=70
  346. Vowelout f1=0 f2=2700 400 600 f3=300 80 colr=1
  347. IF PreVoicing THEN
  348. FMT(dzh/xdz_pzd)
  349. ENDIF
  350. FMT(dzh/xdz_pzd) addWav(ustop/ts_pzd)
  351. endphoneme
  352. // velar plosives
  353. //==================
  354. phoneme k
  355. import_phoneme consonants/k-
  356. voicingswitch g
  357. endphoneme
  358. phoneme k#
  359. import_phoneme consonants/k#
  360. voicingswitch g#
  361. endphoneme
  362. phoneme g
  363. import_phoneme base/g
  364. voicingswitch k
  365. endphoneme
  366. phoneme g#
  367. vcd dnt stop
  368. lengthmod 5
  369. voicingswitch k#
  370. Vowelin f1=1 f2=2300 200 300 f3=-150 80 rms=20
  371. Vowelout f1=0 f2=2300 300 400 f3=-150 80 rms=20
  372. IF PreVoicing THEN
  373. FMT(g2/xg)
  374. ENDIF
  375. IF nextPh(isPause2) THEN
  376. FMT(g2/xg) addWav(ustop/k_asp, 35)
  377. ENDIF
  378. FMT(g2/xg) addWav(ustop/k_asp, 50)
  379. endphoneme
  380. //================
  381. phoneme #X2 // click, use for indicating combining long vowels
  382. vls alv frc sibilant
  383. lengthmod 3
  384. WAV(ustop/percus02, 60)
  385. endphoneme
  386. phoneme r
  387. liquid rhotic
  388. lengthmod 3
  389. IF thisPh(isWordEnd) THEN
  390. CALL base/r/
  391. ELSE
  392. IF prevPhW(isVowel) THEN
  393. IF nextPhW(isNotVowel) OR nextPhW(V) THEN
  394. ChangePhoneme(*)
  395. ENDIF
  396. ENDIF
  397. CALL base/r
  398. ENDIF
  399. ipa ɾ
  400. endphoneme