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

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