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

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