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

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