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_vietnam 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. //====================================================
  2. // Vietnamese Phonemes
  3. //====================================================
  4. phoneme 1 // ngang tone: level
  5. stress
  6. Tone(30, 28, envelope/p_level, NULL) // 28 29
  7. endphoneme
  8. phoneme 2 // huyền tone: low falling
  9. stress
  10. Tone(20, 8, envelope/p_fall, NULL) //20 8
  11. endphoneme
  12. phoneme 3 // sắc Tone(rising
  13. stress
  14. Tone(30, 55, envelope/p_rise, NULL) // 30 60
  15. endphoneme
  16. phoneme 4 // hỏi Tone(curve (dipping rising)
  17. stress
  18. Tone(10, 31, envelope/p_fallrise, NULL) //33 31
  19. endphoneme
  20. phoneme 5 // ngã tone: broken (creaking rising)
  21. stress
  22. Tone(34, 60,envelope/p_214, envelope/vi_5amp) // 28,58 20 80
  23. endphoneme
  24. phoneme 6 // nặng Tone(drop (constricted)
  25. stress
  26. //length 150 // ignore because it make too short sound 75 // reduce the length of the vowel
  27. Tone(34, 10, envelope/p_512, envelope/vi_6amp) //40 20
  28. endphoneme
  29. phoneme 7 // Tone(1 (ngang) at end of clause
  30. stress
  31. Tone(30, 28, envelope/p_fall, NULL) //40 20
  32. endphoneme
  33. // Vowels
  34. //=======
  35. phoneme a
  36. vwl starttype #@ endtype #@
  37. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  38. length 240
  39. ELSE
  40. length 140
  41. ENDIF
  42. FMT(vowel/a_4) //a_4)
  43. endphoneme
  44. phoneme a:
  45. vwl starttype #a endtype #a
  46. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd)THEN
  47. length 240
  48. ELIF nextPh(n^) OR nextPh(c) THEN
  49. length 100
  50. ELSE
  51. length 140 //200
  52. ENDIF
  53. FMT(vowel/a_8)
  54. endphoneme
  55. phoneme E
  56. vwl starttype #e endtype #e
  57. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  58. length 240
  59. ELSE
  60. length 140
  61. ENDIF
  62. FMT(vowel/e_e) //ee_3)
  63. endphoneme
  64. phoneme e
  65. vwl starttype #e endtype #e
  66. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  67. length 240
  68. ELSE
  69. length 140
  70. ENDIF
  71. FMT(vowel/e)
  72. endphoneme
  73. phoneme i
  74. vwl starttype #i endtype #i
  75. IfNextVowelAppend(;)
  76. IF prevPhW(w) THEN
  77. VowelStart(w/wi)
  78. ENDIF
  79. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  80. length 240
  81. ENDIF
  82. IF nextPh(n^) OR nextPh(c) THEN
  83. length 100
  84. FMT(vnasal/ii_n)
  85. ELSE
  86. length 140
  87. FMT(vowel/i_4)
  88. ENDIF
  89. endphoneme
  90. phoneme O
  91. vwl starttype #o endtype #o
  92. IF nextPh(kh) OR nextPh(N) THEN
  93. length 80
  94. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  95. length 240
  96. ELSE
  97. length 140
  98. ENDIF
  99. FMT(vdiph2/o_oo) //vowel/oo)
  100. endphoneme
  101. phoneme O+
  102. vwl starttype #o endtype #o
  103. IF nextPh(kh) OR nextPh(N) THEN
  104. length 80
  105. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  106. length 240
  107. ELSE
  108. length 140
  109. ENDIF
  110. FMT(vowel/o) //vowel/oo)
  111. endphoneme
  112. phoneme o
  113. vwl starttype #o endtype #o
  114. IF nextPh(kh) OR nextPh(N) THEN
  115. length 110
  116. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  117. length 240
  118. ELSE
  119. length 140
  120. ENDIF
  121. FMT(vowel/o) // o_2)
  122. endphoneme
  123. phoneme u
  124. vwl starttype #u endtype #u
  125. IF nextPh(kh) OR nextPh(N) THEN // hear as ung sound
  126. length 120
  127. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  128. length 240
  129. ELSE
  130. length 140
  131. ENDIF
  132. FMT(vnasal/u_n,60) //vowel/u_5)
  133. endphoneme
  134. phoneme y
  135. vwl starttype #u endtype #u
  136. IF nextPh(kh) OR nextPh(N) THEN
  137. length 120
  138. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  139. length 240
  140. ELSE
  141. length 140
  142. ENDIF
  143. FMT(vowel/u#_5)
  144. endphoneme
  145. phoneme @
  146. vwl starttype #@ endtype #a
  147. IF nextPh(kh) OR nextPh(N) OR nextPh(n^) OR nextPh(c) THEN
  148. length 120
  149. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  150. length 240
  151. ELSE
  152. length 140
  153. ENDIF
  154. FMT(vowel/V) //vowel/@_2)
  155. endphoneme
  156. phoneme @:
  157. vwl starttype #@ endtype #@
  158. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  159. length 240
  160. ELSE
  161. length 140
  162. ENDIF
  163. FMT(vowel/@_2)
  164. endphoneme
  165. // Diphthongs
  166. //===========
  167. phoneme aI
  168. vwl starttype #a endtype #i
  169. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  170. length 240
  171. ELSE
  172. length 140
  173. ENDIF
  174. FMT(vdiph/&i_2)
  175. endphoneme
  176. phoneme a:I
  177. vwl starttype #a endtype #i
  178. length 240 //250
  179. FMT(vdiph/ai)
  180. endphoneme
  181. phoneme @I
  182. vwl starttype #@ endtype #i
  183. length 240 //250
  184. FMT(vdiph/@i)
  185. endphoneme
  186. phoneme @:I
  187. vwl starttype #@ endtype #i
  188. length 240 //250
  189. FMT(vdiph/y#i)
  190. endphoneme
  191. phoneme eI
  192. vwl starttype #e endtype #i
  193. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  194. length 240
  195. ELSE
  196. length 140
  197. ENDIF
  198. FMT(vdiph/ei)
  199. endphoneme
  200. phoneme EI
  201. vwl starttype #e endtype #i
  202. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  203. length 240
  204. ELSE
  205. length 140
  206. ENDIF
  207. FMT(vdiph/eei)
  208. endphoneme
  209. phoneme OI
  210. vwl starttype #o endtype #i
  211. length 240
  212. FMT(vdiph/ooi_4)
  213. endphoneme
  214. phoneme oI
  215. vwl starttype #o endtype #i
  216. length 240
  217. FMT(vdiph/oi)
  218. endphoneme
  219. phoneme uI
  220. vwl starttype #u endtype #i
  221. length 240
  222. FMT(vdiph/ui)
  223. endphoneme
  224. phoneme yI
  225. vwl starttype #u endtype #i
  226. length 240
  227. FMT(vdiph/u-i)
  228. endphoneme
  229. phoneme aU
  230. vwl starttype #a endtype #u
  231. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  232. length 240
  233. ELSE
  234. length 140
  235. ENDIF
  236. FMT(vdiph/aau_4)
  237. endphoneme
  238. phoneme a:U
  239. vwl starttype #a endtype #u
  240. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  241. length 240
  242. ELSE
  243. length 140
  244. ENDIF
  245. FMT(vdiph/au)
  246. endphoneme
  247. phoneme eU
  248. vwl starttype #e endtype #u
  249. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  250. length 240
  251. ELSE
  252. length 140
  253. ENDIF
  254. FMT(vdiph/eu)
  255. endphoneme
  256. phoneme EU
  257. vwl starttype #e endtype #u
  258. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  259. length 240
  260. ELSE
  261. length 140
  262. ENDIF
  263. FMT(vdiph/eeu)
  264. endphoneme
  265. phoneme iU
  266. vwl starttype #i endtype #u
  267. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  268. length 240
  269. ELSE
  270. length 140
  271. ENDIF
  272. FMT(vdiph2/iu)
  273. endphoneme
  274. phoneme @U
  275. vwl starttype #@ endtype #u
  276. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  277. length 240
  278. ELSE
  279. length 140
  280. ENDIF
  281. FMT(vdiph/@u_3)
  282. endphoneme
  283. phoneme @:U
  284. vwl starttype #@ endtype #u
  285. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  286. length 240
  287. ELSE
  288. length 140
  289. ENDIF
  290. FMT(vdiph/@u)
  291. endphoneme
  292. phoneme i@
  293. vwl starttype #i endtype #@
  294. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  295. length 240
  296. ELSE
  297. length 140
  298. ENDIF
  299. FMT(vdiph2/ii@_3)
  300. endphoneme
  301. phoneme y@
  302. vwl starttype #i endtype #@
  303. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  304. length 240
  305. ELSE
  306. length 140
  307. ENDIF
  308. FMT(vdiph2/y-y#)
  309. endphoneme
  310. phoneme u@
  311. vwl starttype #u endtype #@
  312. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  313. length 240
  314. ELSE
  315. length 140
  316. ENDIF
  317. FMT(vdiph2/uu@)
  318. endphoneme
  319. // Addition Dipthongs
  320. phoneme o# // ông
  321. vwl starttype #o endtype #o
  322. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  323. length 240
  324. ELSE
  325. length 140
  326. ENDIF
  327. FMT(vnasal/a#u_n)
  328. endphoneme
  329. phoneme O# // ong
  330. vwl starttype #o endtype #o
  331. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  332. length 240
  333. ELSE
  334. length 140
  335. ENDIF
  336. FMT(vnasal/&u_n)
  337. endphoneme
  338. phoneme o@
  339. vwl starttype #o endtype #a
  340. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  341. length 240
  342. ELSE
  343. length 140
  344. ENDIF
  345. FMT(vdiph2/oa)
  346. endphoneme
  347. phoneme o&
  348. vwl starttype #o endtype #o
  349. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  350. length 240
  351. ELSE
  352. length 140
  353. ENDIF
  354. FMT(vietnam/oe)
  355. endphoneme
  356. phoneme iE // iê : viết, giệc
  357. vwl starttype #i endtype #e
  358. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  359. length 240
  360. ELSE
  361. length 140
  362. ENDIF
  363. FMT(vietnam/ie_2)
  364. endphoneme
  365. phoneme Oi // oai sound
  366. vwl starttype #o endtype #i
  367. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  368. length 240
  369. ELSE
  370. length 140
  371. ENDIF
  372. FMT(vdiph/ooi_3)
  373. endphoneme
  374. // Vowel and Dipthong for south dialect
  375. phoneme O- // ôi southern sound
  376. vwl starttype #o endtype #i
  377. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  378. length 240
  379. ELSE
  380. length 140
  381. ENDIF
  382. FMT(vnasal/oi_n)
  383. endphoneme
  384. phoneme @- // ơi southern sound
  385. vwl starttype #o endtype #i
  386. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  387. length 240
  388. ELSE
  389. length 140
  390. ENDIF
  391. FMT(vdiph/@i_3)
  392. endphoneme
  393. phoneme u- // u southern sound
  394. vwl starttype #u endtype #u
  395. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  396. length 240
  397. ELSE
  398. length 140
  399. ENDIF
  400. FMT(vowel/u_3,70)
  401. endphoneme
  402. phoneme kh
  403. vls vel frc
  404. lengthmod 3
  405. Vowelin f1=0 f2=2300 200 400 f3=200 80 len=30
  406. Vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20
  407. WAV(ustop/k_unasp) //ufric/x, 50)
  408. endphoneme
  409. phoneme l
  410. liquid
  411. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  412. //lengthmod 7
  413. //IF nextPh(isNotVowel) THEN
  414. // ChangePhoneme(l/2)
  415. //ENDIF
  416. //CALL vowelstart_l
  417. FMT(l/l_vi)
  418. endphoneme
  419. phoneme t
  420. vls alv stp
  421. //voicingswitch d
  422. lengthmod 2
  423. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  424. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  425. WAV(vietnam/th, 50)
  426. endphoneme
  427. phoneme cr
  428. vls pla afr sib
  429. //voicingswitch dZ
  430. lengthmod 2
  431. Vowelin f1=0 f2=2300 200 400 f3=-100 80 len=15
  432. WAV(vietnam/tr,10)
  433. endphoneme
  434. phoneme d_
  435. vcd alv stp
  436. // lengthmod 5
  437. ipa ɗ
  438. Vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=15
  439. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk len=30
  440. WAV(vietnam/dd)
  441. endphoneme
  442. phoneme c
  443. vls pal stp pzd
  444. //voicingswitch J
  445. lengthmod 2
  446. length 2
  447. Vowelin f1=0 f2=2700 400 600 f3=300 80 len=15 brk
  448. Vowelout f1=1 f2=2700 400 600 f3=200 70 len=15 colr=1
  449. WAV(vietnam/ch,5)
  450. endphoneme
  451. phoneme p
  452. vls blb stp
  453. lengthmod 2
  454. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  455. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  456. WAV(ustop/p_unasp_,10)
  457. endphoneme
  458. phoneme t[ // dental variant of /t/
  459. vls dnt stp
  460. voicingswitch d[
  461. lengthmod 2
  462. length 5
  463. Vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 len=15
  464. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 len=15
  465. IF nextPh(isPause2) THEN
  466. WAV(ustop/t_unasp2, 5)
  467. ENDIF
  468. WAV(ustop/t_hi, 70)
  469. endphoneme