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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  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, 60) //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 nextPhW(N) OR nextPhW(c) OR nextPhW(t[) THEN
  135. length 80
  136. ELIF nextPhW(m) THEN
  137. length 177
  138. ELIF nextPhW(n) THEN
  139. length 141
  140. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  141. length 240
  142. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) AND NOT nextPhW(N) AND NOT nextPhW(c) AND NOT nextPhW(t[) THEN
  143. length 240
  144. ELSE
  145. length 120
  146. ENDIF
  147. FMT(vnasal/u_n) //vowel/u_5)
  148. endphoneme
  149. phoneme y
  150. vwl starttype #u endtype #u
  151. IF nextPh(kh) OR nextPh(N) THEN
  152. length 120
  153. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  154. length 240
  155. ELSE
  156. length 180
  157. ENDIF
  158. FMT(vowel/u#_5)
  159. endphoneme
  160. phoneme @
  161. vwl starttype #@ endtype #a
  162. IF nextPh(kh) OR nextPh(N) OR nextPh(n^) OR nextPh(c) THEN
  163. length 120
  164. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  165. length 240
  166. ELSE
  167. length 180
  168. ENDIF
  169. // FMT(vowel/V) //vowel/@_2)
  170. FMT(vietnam/V)
  171. endphoneme
  172. phoneme @:
  173. vwl starttype #@ endtype #@
  174. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  175. length 240
  176. ELSE
  177. length 180
  178. ENDIF
  179. FMT(vowel/@_2)
  180. endphoneme
  181. // Diphthongs
  182. //===========
  183. phoneme aI
  184. vwl starttype #a endtype #i
  185. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  186. length 240
  187. ELSE
  188. length 200
  189. ENDIF
  190. FMT(vdiph/&i_2)
  191. endphoneme
  192. phoneme a:I
  193. vwl starttype #a endtype #i
  194. length 240 //250
  195. FMT(vdiph/ai)
  196. endphoneme
  197. phoneme @I
  198. vwl starttype #@ endtype #i
  199. length 240 //250
  200. FMT(vdiph/@i)
  201. endphoneme
  202. phoneme @:I
  203. vwl starttype #@ endtype #i
  204. length 240 //250
  205. FMT(vdiph/y#i)
  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/ei)
  215. endphoneme
  216. phoneme EI
  217. vwl starttype #e endtype #i
  218. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  219. length 240
  220. ELSE
  221. length 200
  222. ENDIF
  223. FMT(vdiph/eei)
  224. endphoneme
  225. phoneme OI
  226. vwl starttype #o endtype #i
  227. length 240
  228. FMT(vdiph/ooi_4)
  229. endphoneme
  230. phoneme oI
  231. vwl starttype #o endtype #i
  232. length 240
  233. FMT(vdiph/oi)
  234. endphoneme
  235. phoneme uI
  236. vwl starttype #u endtype #i
  237. length 240
  238. FMT(vdiph/ui)
  239. endphoneme
  240. phoneme yI
  241. vwl starttype #u endtype #i
  242. length 240
  243. FMT(vdiph/u-i)
  244. endphoneme
  245. phoneme aU
  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/aau_4)
  253. endphoneme
  254. phoneme a:U
  255. vwl starttype #a 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/au)
  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/eu)
  271. endphoneme
  272. phoneme EU
  273. vwl starttype #e 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(vdiph/eeu)
  280. endphoneme
  281. phoneme iU
  282. vwl starttype #i 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(vdiph2/iu)
  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_3)
  298. endphoneme
  299. phoneme @:U
  300. vwl starttype #@ endtype #u
  301. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  302. length 240
  303. ELSE
  304. length 200
  305. ENDIF
  306. FMT(vdiph/@u)
  307. endphoneme
  308. phoneme i@
  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/ii@_3)
  316. endphoneme
  317. phoneme y@
  318. vwl starttype #i 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/y-y#)
  325. endphoneme
  326. phoneme u@
  327. vwl starttype #u endtype #@
  328. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  329. length 240
  330. ELSE
  331. length 200
  332. ENDIF
  333. FMT(vdiph2/uu@)
  334. endphoneme
  335. // Addition Dipthongs
  336. phoneme o# // ông
  337. vwl starttype #o endtype #o
  338. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  339. length 240
  340. ELSE
  341. length 200
  342. ENDIF
  343. FMT(vnasal/a#u_n)
  344. endphoneme
  345. phoneme O# // ong
  346. vwl starttype #o endtype #o
  347. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  348. length 240
  349. ELIF nextPh(k) THEN
  350. length 140
  351. ELSE
  352. length 200
  353. ENDIF
  354. FMT(vnasal/&u_n)
  355. endphoneme
  356. phoneme o@
  357. vwl starttype #o endtype #a
  358. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  359. length 240
  360. ELSE
  361. length 200
  362. ENDIF
  363. FMT(vdiph2/oa)
  364. endphoneme
  365. phoneme o&
  366. vwl starttype #o endtype #o
  367. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  368. length 240
  369. ELSE
  370. length 200
  371. ENDIF
  372. FMT(vietnam/oe)
  373. endphoneme
  374. phoneme iE // iê : viết, giệc
  375. vwl starttype #i endtype #e
  376. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  377. length 240
  378. ELSE
  379. length 200
  380. ENDIF
  381. FMT(vietnam/ie_2)
  382. endphoneme
  383. phoneme Oi // oai sound
  384. vwl starttype #o endtype #i
  385. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  386. length 240
  387. ELSE
  388. length 200
  389. ENDIF
  390. FMT(vdiph/ooi_3)
  391. endphoneme
  392. // Vowel and Dipthong for south dialect
  393. phoneme O- // ô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(vnasal/oi_n)
  401. endphoneme
  402. phoneme @- // ơi southern sound
  403. vwl starttype #o endtype #i
  404. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  405. length 240
  406. ELSE
  407. length 180
  408. ENDIF
  409. FMT(vdiph/@i_3)
  410. endphoneme
  411. phoneme u- // u southern sound
  412. vwl starttype #u endtype #u
  413. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  414. length 240
  415. ELSE
  416. length 180
  417. ENDIF
  418. FMT(vowel/u_3,70)
  419. endphoneme
  420. phoneme kh
  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/k_unasp) //ufric/x, 50)
  426. endphoneme
  427. phoneme k
  428. vls vel frc
  429. lengthmod 3
  430. Vowelin f1=0 f2=2300 200 400 f3=200 80 len=30
  431. Vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20
  432. WAV(ustop/c)
  433. endphoneme
  434. phoneme N // si**ng**
  435. vcd lbv nas
  436. Vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk
  437. lengthmod 12 // longer than 'n'
  438. IF thisPh(isWordEnd) THEN
  439. length 163
  440. ENDIF
  441. FMT(n/nm)
  442. endphoneme
  443. phoneme l
  444. liquid
  445. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  446. //lengthmod 7
  447. //IF nextPh(isNotVowel) THEN
  448. // ChangePhoneme(l/2)
  449. //ENDIF
  450. //CALL vowelstart_l
  451. FMT(l/l_vi)
  452. endphoneme
  453. phoneme t
  454. vls alv stp
  455. //voicingswitch d
  456. lengthmod 2
  457. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  458. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  459. WAV(vietnam/th, 50)
  460. endphoneme
  461. phoneme cr
  462. vls pla afr sib
  463. //voicingswitch dZ
  464. lengthmod 2
  465. Vowelin f1=0 f2=2300 200 400 f3=-100 80 len=15
  466. WAV(vietnam/tr,10)
  467. endphoneme
  468. phoneme d_
  469. vcd alv stp
  470. // lengthmod 5
  471. ipa ɗ
  472. length 50
  473. Vowelin f1=1 f2=1700 -300 300 f3=-100 80 len=15
  474. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk len=30
  475. WAV(vietnam/dd)
  476. endphoneme
  477. phoneme c
  478. vls pal stp pzd
  479. //voicingswitch J
  480. lengthmod 2
  481. length 50
  482. Vowelin f1=0 f2=2700 400 600 f3=300 80 len=15 brk
  483. Vowelout f1=1 f2=2700 400 600 f3=200 70 len=15 colr=1
  484. WAV(vietnam/ch,5)
  485. endphoneme
  486. phoneme p
  487. vls blb stp
  488. lengthmod 2
  489. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  490. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  491. WAV(ustop/p_unasp_,10)
  492. endphoneme
  493. phoneme t[ // dental variant of /t/
  494. IF thisPh(isWordEnd) THEN
  495. vls alv stp
  496. voicingswitch d
  497. lengthmod 2
  498. length 5
  499. Vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 len=15
  500. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 len=15
  501. WAV(ustop/t, 50)
  502. ELSE
  503. vls dnt stp
  504. voicingswitch d[
  505. lengthmod 2
  506. length 5
  507. Vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 len=15
  508. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 len=15
  509. IF nextPh(isPause2) THEN
  510. WAV(ustop/t_unasp2, 5)
  511. ENDIF
  512. WAV(ustop/t_hi, 70)
  513. ENDIF
  514. endphoneme
  515. phoneme w
  516. liquid
  517. lengthmod 7
  518. starttype #u
  519. IF nextPh(isVowel) THEN
  520. NextVowelStarts
  521. VowelStart(w/w@)
  522. VowelStart(w/wa)
  523. VowelStart(w/we)
  524. VowelStart(w/wi)
  525. VowelStart(w/wo)
  526. VowelStart(w/wu)
  527. EndSwitch
  528. VowelEnding(w/xw, -30)
  529. IF nextPh(isVowel) AND prevPhW(t[) THEN
  530. FMT(vnasal/u_n, 60)
  531. ENDIF
  532. IF prevPhW(isNasal) THEN
  533. FMT(w/w)
  534. ELSEIF prevPhW(h) THEN
  535. // none, [hw]
  536. ELSE
  537. FMT(w/_w)
  538. ENDIF
  539. ELSE
  540. // no vowel follows
  541. Vowelout len=50
  542. IF prevPh(#i) THEN
  543. FMT(w/iw_)
  544. ENDIF
  545. FMT(w/w_)
  546. ENDIF
  547. endphoneme