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

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