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

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