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

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