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

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