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

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