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

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