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.1KB

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