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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993
  1. //====================================================
  2. // Vietnamese Phonemes
  3. //====================================================
  4. phoneme 1 // ngang tone: level
  5. stress
  6. Tone(27, 25, 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(20, 50, 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 nextPhW(p) THEN
  38. length 78
  39. ELIF nextPhW(t[) THEN
  40. length 84
  41. ELIF nextPhW(c) THEN
  42. length 82
  43. ELIF nextPhW(m) THEN
  44. length 90
  45. ELIF nextPhW(n) THEN
  46. length 100
  47. ELIF nextPhW(N) THEN
  48. length 90
  49. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  50. length 240
  51. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  52. length 140
  53. ELSE
  54. length 100
  55. ENDIF
  56. FMT(vietnam/a_2) //a_4)
  57. endphoneme
  58. phoneme a:
  59. vwl starttype #a endtype #a
  60. IF nextPhW(p) THEN
  61. length 142
  62. ELIF nextPhW(t[) THEN
  63. length 126
  64. ELIF nextPhW(c) THEN
  65. length 136
  66. ELIF nextPhW(m) THEN
  67. length 155
  68. ELIF nextPhW(n) THEN
  69. length 185
  70. ELIF nextPhW(N) THEN
  71. length 200
  72. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  73. length 300
  74. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  75. length 240
  76. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  77. length 333
  78. ELSE
  79. length 180
  80. ENDIF
  81. //FMT(vowel/a_8)
  82. FMT(vietnam/aa)
  83. endphoneme
  84. phoneme E
  85. vwl starttype #e endtype #e
  86. IF nextPhW(p) THEN
  87. length 143
  88. ELIF nextPhW(t[) THEN
  89. length 107
  90. ELIF nextPhW(c) THEN
  91. length 141
  92. ELIF nextPhW(m) THEN
  93. length 128
  94. ELIF nextPhW(n) THEN
  95. length 160
  96. ELIF nextPhW(N) THEN
  97. length 187
  98. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  99. length 300
  100. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  101. length 240
  102. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  103. length 352
  104. ELSE
  105. length 180
  106. ENDIF
  107. //FMT(vowel/e_e) //ee_3)
  108. FMT(vietnam/e_e_2)
  109. endphoneme
  110. phoneme e
  111. vwl starttype #e endtype #e
  112. IF nextPhW(p) THEN
  113. length 114
  114. ELIF nextPhW(t[) THEN
  115. length 126
  116. ELIF nextPhW(c) THEN
  117. length 140
  118. ELIF nextPhW(n^) THEN
  119. length 120
  120. ELIF nextPhW(m) THEN
  121. length 148
  122. ELIF nextPhW(n) THEN
  123. length 163
  124. ELIF nextPhW(N) THEN
  125. length 115
  126. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  127. length 300
  128. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  129. length 240
  130. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  131. length 324
  132. ELSE
  133. length 180
  134. ENDIF
  135. IF nextPh(n^) THEN
  136. FMT(vowel/e)
  137. ELSE
  138. FMT(vietnam/e, 150)
  139. ENDIF
  140. endphoneme
  141. phoneme e-
  142. vwl starttype #e endtype #a
  143. length 140
  144. FMT(vietnam/e_short_1)
  145. //FMT(vdiph/aai_3)
  146. endphoneme
  147. phoneme i
  148. vwl starttype #i endtype #i
  149. IfNextVowelAppend(;)
  150. IF prevPhW(w) THEN
  151. VowelStart(w/wi)
  152. ENDIF
  153. IF nextPhW(p) THEN
  154. length 131
  155. ELIF nextPhW(t[) THEN
  156. length 113
  157. ELIF nextPhW(c) OR nextPhW(n^) THEN
  158. length 72
  159. ELIF nextPhW(m) THEN
  160. length 120
  161. ELIF nextPhW(n) THEN
  162. length 128
  163. ELIF nextPhW(N) THEN
  164. length 97
  165. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  166. length 310
  167. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  168. length 240
  169. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  170. length 363
  171. ELSE
  172. length 180
  173. ENDIF
  174. IF nextPh(n^) OR nextPh(c) THEN
  175. //FMT(vnasal/ii_n)
  176. FMT(vietnam/i)
  177. ELSE
  178. //FMT(vowel/i_4)
  179. FMT(vietnam/i_2, 100)
  180. ENDIF
  181. endphoneme
  182. phoneme O
  183. vwl starttype #o endtype #o
  184. IF nextPhW(p) THEN
  185. length 129
  186. ELIF nextPhW(t[) THEN
  187. length 125
  188. ELIF nextPhW(c) THEN
  189. length 80
  190. ELIF nextPhW(m) THEN
  191. length 133
  192. ELIF nextPhW(n) THEN
  193. length 158
  194. ELIF nextPhW(N) THEN
  195. length 102
  196. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  197. length 300
  198. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  199. length 240
  200. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  201. length 331
  202. ELSE
  203. length 180
  204. ENDIF
  205. //FMT(vdiph2/o_oo) //vowel/oo)
  206. FMT(vietnam/oo)
  207. endphoneme
  208. phoneme O+
  209. vwl starttype #o endtype #o
  210. IF nextPh(kh) OR nextPh(N) THEN
  211. length 80
  212. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  213. length 240
  214. ELSE
  215. length 180
  216. ENDIF
  217. FMT(vowel/o) //vowel/oo)
  218. endphoneme
  219. phoneme o
  220. vwl starttype #o endtype #o
  221. IF nextPhW(p) THEN
  222. length 140
  223. ELIF nextPhW(t[) THEN
  224. length 113
  225. ELIF nextPhW(c) THEN
  226. length 88
  227. ELIF nextPhW(m) THEN
  228. length 134
  229. ELIF nextPhW(n) THEN
  230. length 168
  231. ELIF nextPhW(N) THEN
  232. length 99
  233. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  234. length 310
  235. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  236. length 240
  237. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  238. length 363
  239. ELSE
  240. length 180
  241. ENDIF
  242. //FMT(vowel/o) // o_2)
  243. FMT(vietnam/o_2)
  244. endphoneme
  245. phoneme u
  246. vwl starttype #u endtype #u
  247. IF nextPhW(p) THEN
  248. length 110
  249. ELIF nextPhW(t[) THEN
  250. length 94
  251. ELIF nextPhW(c) THEN
  252. length 83
  253. ELIF nextPhW(m) THEN
  254. length 141
  255. ELIF nextPhW(n) THEN
  256. length 177
  257. ELIF nextPhW(N) THEN
  258. length 80
  259. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  260. length 300
  261. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  262. length 240
  263. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  264. length 333
  265. ELSE
  266. length 180
  267. ENDIF
  268. //FMT(vnasal/u_n) //vowel/u_5)
  269. FMT(vietnam/u)
  270. endphoneme
  271. phoneme y
  272. vwl starttype #u endtype #u
  273. IF nextPhW(p) THEN
  274. length 102
  275. ELIF nextPhW(t[) THEN
  276. length 76
  277. ELIF nextPhW(c) THEN
  278. length 90
  279. ELIF nextPhW(m) THEN
  280. length 143
  281. ELIF nextPhW(n) THEN
  282. length 136
  283. ELIF nextPhW(N) THEN
  284. length 101
  285. ELIF nextPhW(w) OR nextPhW(j) THEN
  286. length 110
  287. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  288. length 300
  289. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  290. length 240
  291. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  292. length 328
  293. ELSE
  294. length 180
  295. ENDIF
  296. //FMT(vowel/u#_5)
  297. FMT(vietnam/y_2, 60)
  298. endphoneme
  299. phoneme @
  300. vwl starttype #@ endtype #a
  301. IF nextPhW(p) THEN
  302. length 123
  303. ELIF nextPhW(t[) THEN
  304. length 123
  305. ELIF nextPhW(c) THEN
  306. length 139
  307. ELIF nextPhW(m) THEN
  308. length 127
  309. ELIF nextPhW(n) THEN
  310. length 160
  311. ELIF nextPhW(N) THEN
  312. length 156
  313. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  314. length 240
  315. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  316. length 240
  317. ELSE
  318. length 180
  319. ENDIF
  320. // FMT(vowel/V) //vowel/@_2)
  321. FMT(vietnam/V_2)
  322. endphoneme
  323. phoneme @:
  324. vwl starttype #@ endtype #@
  325. IF nextPhW(p) THEN
  326. length 123
  327. ELIF nextPhW(t[) THEN
  328. length 123
  329. ELIF nextPhW(c) THEN
  330. length 139
  331. ELIF nextPhW(m) THEN
  332. length 127
  333. ELIF nextPhW(n) THEN
  334. length 160
  335. ELIF nextPhW(N) THEN
  336. length 156
  337. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  338. length 300
  339. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  340. length 240
  341. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  342. length 333
  343. ELSE
  344. length 180
  345. ENDIF
  346. //FMT(vowel/@_2)
  347. FMT(vietnam/@_2)
  348. endphoneme
  349. // Diphthongs
  350. //===========
  351. phoneme aI
  352. vwl starttype #a endtype #i
  353. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  354. length 240
  355. ELSE
  356. length 200
  357. ENDIF
  358. FMT(vdiph/&i_2)
  359. endphoneme
  360. phoneme a:I
  361. vwl starttype #a endtype #i
  362. length 240 //250
  363. FMT(vdiph/ai)
  364. endphoneme
  365. phoneme @I
  366. vwl starttype #@ endtype #i
  367. length 240 //250
  368. FMT(vdiph/@i)
  369. endphoneme
  370. phoneme @:I
  371. vwl starttype #@ endtype #i
  372. length 240 //250
  373. FMT(vdiph/y#i)
  374. endphoneme
  375. phoneme eI
  376. vwl starttype #e 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/ei)
  383. endphoneme
  384. phoneme EI
  385. vwl starttype #e endtype #i
  386. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  387. length 240
  388. ELSE
  389. length 200
  390. ENDIF
  391. FMT(vdiph/eei)
  392. endphoneme
  393. phoneme OI
  394. vwl starttype #o endtype #i
  395. length 240
  396. FMT(vdiph/ooi_4)
  397. endphoneme
  398. phoneme oI
  399. vwl starttype #o endtype #i
  400. length 240
  401. FMT(vdiph/oi)
  402. endphoneme
  403. phoneme uI
  404. vwl starttype #u endtype #i
  405. length 240
  406. FMT(vdiph/ui)
  407. endphoneme
  408. phoneme yI
  409. vwl starttype #u endtype #i
  410. length 240
  411. FMT(vdiph/u-i)
  412. endphoneme
  413. phoneme aU
  414. vwl starttype #a endtype #u
  415. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  416. length 240
  417. ELSE
  418. length 200
  419. ENDIF
  420. FMT(vdiph/aau_4)
  421. endphoneme
  422. phoneme a:U
  423. vwl starttype #a endtype #u
  424. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  425. length 240
  426. ELSE
  427. length 200
  428. ENDIF
  429. FMT(vdiph/au)
  430. endphoneme
  431. phoneme eU
  432. vwl starttype #e endtype #u
  433. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  434. length 240
  435. ELSE
  436. length 200
  437. ENDIF
  438. FMT(vdiph/eu)
  439. endphoneme
  440. phoneme EU
  441. vwl starttype #e endtype #u
  442. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  443. length 240
  444. ELSE
  445. length 200
  446. ENDIF
  447. FMT(vdiph/eeu)
  448. endphoneme
  449. phoneme iU
  450. vwl starttype #i endtype #u
  451. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  452. length 240
  453. ELSE
  454. length 200
  455. ENDIF
  456. FMT(vdiph2/iu)
  457. endphoneme
  458. phoneme @U
  459. vwl starttype #@ endtype #u
  460. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  461. length 240
  462. ELSE
  463. length 200
  464. ENDIF
  465. FMT(vdiph/@u_3)
  466. endphoneme
  467. phoneme @:U
  468. vwl starttype #@ endtype #u
  469. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  470. length 240
  471. ELSE
  472. length 200
  473. ENDIF
  474. FMT(vdiph/@u)
  475. endphoneme
  476. phoneme i@
  477. vwl starttype #i endtype #@
  478. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  479. length 240
  480. ELSE
  481. length 200
  482. ENDIF
  483. FMT(vdiph2/ii@_3)
  484. endphoneme
  485. phoneme y@
  486. vwl starttype #i endtype #@
  487. IF nextPhW(p) THEN
  488. length 123
  489. ELIF nextPhW(t[) THEN
  490. length 123
  491. ELIF nextPhW(c) THEN
  492. length 139
  493. ELIF nextPhW(m) THEN
  494. length 127
  495. ELIF nextPhW(n) THEN
  496. length 180
  497. ELIF nextPhW(N) THEN
  498. length 156
  499. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  500. length 240
  501. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  502. length 240
  503. ELSE
  504. length 200
  505. ENDIF
  506. //FMT(vdiph2/y-y#)
  507. FMT(vietnam/y@)
  508. endphoneme
  509. phoneme u@
  510. vwl starttype #u endtype #@
  511. IF nextPhW(p) THEN
  512. length 123
  513. ELIF nextPhW(t[) THEN
  514. length 123
  515. ELIF nextPhW(c) THEN
  516. length 139
  517. ELIF nextPhW(m) THEN
  518. length 127
  519. ELIF nextPhW(n) THEN
  520. length 160
  521. ELIF nextPhW(N) THEN
  522. length 156
  523. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  524. length 300
  525. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  526. length 240
  527. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  528. length 333
  529. ELSE
  530. length 240
  531. ENDIF
  532. //FMT(vdiph2/uu@)-
  533. FMT(vietnam/u@)
  534. endphoneme
  535. // Addition Dipthongs
  536. phoneme o# // ông
  537. vwl starttype #o endtype #o
  538. IF nextPhW(k) THEN
  539. length 120
  540. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  541. length 360
  542. ELIF nextPhW(N) THEN
  543. length 99
  544. ELIF nextPhW(k) THEN
  545. length 88
  546. ELSE
  547. length 200
  548. ENDIF
  549. //FMT(vnasal/a#u_n)
  550. FMT(vietnam/o#)
  551. endphoneme
  552. phoneme O# // ong
  553. vwl starttype #o endtype #o
  554. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  555. length 240
  556. ELIF nextPh(k) THEN
  557. length 140
  558. ELIF nextPh(N) THEN
  559. length 102
  560. ELSE
  561. length 200
  562. ENDIF
  563. //FMT(vnasal/&u_n)
  564. FMT(vietnam/O_short_2)
  565. endphoneme
  566. phoneme o@
  567. vwl starttype #o endtype #a
  568. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  569. length 240
  570. ELSE
  571. length 200
  572. ENDIF
  573. FMT(vdiph2/oa)
  574. endphoneme
  575. phoneme o&
  576. vwl starttype #o endtype #o
  577. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  578. length 240
  579. ELSE
  580. length 200
  581. ENDIF
  582. FMT(vietnam/oe)
  583. endphoneme
  584. phoneme iE // iê : viết, giệc
  585. vwl starttype #i endtype #e
  586. IF nextPhW(p) THEN
  587. length 114
  588. ELIF nextPhW(t[) THEN
  589. length 126
  590. ELIF nextPhW(c) THEN
  591. length 140
  592. ELIF nextPhW(n^) THEN
  593. length 120
  594. ELIF nextPhW(m) THEN
  595. length 148
  596. ELIF nextPhW(n) THEN
  597. length 163
  598. ELIF nextPhW(N) THEN
  599. length 115
  600. ELIF nextPhW(w) THEN
  601. length 100
  602. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  603. length 300
  604. ELIF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordStart) THEN
  605. length 240
  606. ELIF thisPh(isWordStart) AND thisPh(isWordEnd) THEN
  607. length 324
  608. ELSE
  609. length 180
  610. ENDIF
  611. FMT(vietnam/ie)
  612. endphoneme
  613. phoneme Oi // oai sound
  614. vwl starttype #o endtype #i
  615. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  616. length 240
  617. ELSE
  618. length 200
  619. ENDIF
  620. FMT(vdiph/ooi_3)
  621. endphoneme
  622. // Vowel and Dipthong for south dialect
  623. phoneme O- // ôi southern sound
  624. vwl starttype #o endtype #i
  625. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  626. length 240
  627. ELSE
  628. length 180
  629. ENDIF
  630. FMT(vnasal/oi_n)
  631. endphoneme
  632. phoneme @- // ơi southern sound
  633. vwl starttype #o endtype #i
  634. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  635. length 240
  636. ELSE
  637. length 180
  638. ENDIF
  639. FMT(vdiph/@i_3)
  640. endphoneme
  641. phoneme u- // u southern sound
  642. vwl starttype #u endtype #u
  643. IF thisPh(isFirstVowel) AND thisPh(isFinalVowel) AND thisPh(isWordEnd) THEN
  644. length 240
  645. ELSE
  646. length 180
  647. ENDIF
  648. FMT(vowel/u_3,70)
  649. endphoneme
  650. phoneme kh
  651. vls vel frc
  652. lengthmod 3
  653. Vowelin f1=0 f2=2300 200 400 f3=200 80 len=30
  654. Vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20
  655. WAV(ustop/k_unasp) //ufric/x, 50)
  656. endphoneme
  657. phoneme k
  658. vls vel stp
  659. lengthmod 3
  660. IF nextPhW(#u) THEN
  661. Vowelin f1=1 f2=600 -200 -400 f3=-200 80 amp=200 len=30 rms=200
  662. WAV(vietnam/c_2, 255)
  663. ELSE
  664. Vowelin f1=0 f2=2300 200 400 f3=200 80 len=30
  665. WAV(vietnam/c)
  666. ENDIF
  667. Vowelout f1=0 f2=2300 300 400 f3=200 80 rms=20
  668. //WAV(ustop/c)
  669. endphoneme
  670. phoneme N // si**ng**
  671. vcd lbv nas
  672. IF prevPhW(u@) THEN
  673. // do nothing
  674. ELSE
  675. Vowelout f1=3 f2=2300 300 400 f3=-200 80 len=40 rms=20 brk
  676. ENDIF
  677. lengthmod 9 // longer than 'n'
  678. IF thisPh(isWordEnd) THEN
  679. length 163
  680. ENDIF
  681. IF thisPh(isWordEnd) THEN
  682. FMT(n/nm, 50)
  683. ELSE
  684. FMT(nn/_nn)
  685. ENDIF
  686. endphoneme
  687. phoneme l
  688. liquid
  689. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  690. //lengthmod 7
  691. //IF nextPh(isNotVowel) THEN
  692. // ChangePhoneme(l/2)
  693. //ENDIF
  694. //CALL vowelstart_l
  695. FMT(l/l_vi)
  696. endphoneme
  697. phoneme t
  698. vls alv stp
  699. //voicingswitch d
  700. lengthmod 2
  701. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 len=15
  702. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  703. WAV(vietnam/th, 50)
  704. endphoneme
  705. phoneme cr
  706. vls pla afr sib
  707. //voicingswitch dZ
  708. lengthmod 2
  709. Vowelin f1=0 f2=2300 200 400 f3=-100 80 len=15
  710. WAV(vietnam/tr,10)
  711. endphoneme
  712. phoneme d_
  713. vcd alv stp
  714. // lengthmod 5
  715. ipa ɗ
  716. length 70
  717. Vowelin f1=1 f2=1500 -300 300 f3=-100 80 len=15
  718. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk len=30
  719. WAV(vietnam/dda_2, 200)
  720. endphoneme
  721. phoneme c
  722. vls pal stp pzd
  723. //voicingswitch J
  724. lengthmod 2
  725. length 50
  726. Vowelin f1=0 f2=2700 400 600 f3=300 80 len=15 brk
  727. Vowelout f1=1 f2=2700 400 600 f3=200 70 len=15 colr=1
  728. WAV(vietnam/ch,5)
  729. endphoneme
  730. phoneme p
  731. vls blb stp
  732. lengthmod 2
  733. length 15
  734. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  735. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  736. IF thisPh(isWordEnd) THEN
  737. WAV(ustop/p_unasp_, 10)
  738. ELSE
  739. WAV(ustop/p)
  740. ENDIF
  741. endphoneme
  742. phoneme t[ // dental variant of /t/
  743. IF thisPh(isWordEnd) THEN
  744. vls alv stp
  745. voicingswitch d
  746. lengthmod 2
  747. length 15
  748. IF prevPhW(#@) THEN
  749. Vowelout f1=0 f2=1200 -50 50 f3=50 80 rms=20 len=15
  750. ELIF prevPhW(y@) THEN
  751. Vowelout f1=2 f2=1200 -100 150 f3=150 80 rms=20 len=15
  752. ELIF prevPhW(#i) THEN
  753. Vowelout f1=0 f2=2000 -300 250 f3=-50 80 rms=20 len=15
  754. ELIF prevPhW(E) THEN
  755. Vowelout f1=0 f2=1900 -200 200 f3=-100 80 rms=20 len=15
  756. ELIF prevPhW(e) OR prevPhW(iE) THEN
  757. Vowelout f1=2 f2=1800 -400 250 f3=-200 80 rms=20 len=15
  758. ELIF prevPhW(u) THEN
  759. Vowelout f1=2 f2=1000 -1000 250 f3=-400 80 rms=20 len=15
  760. ELIF prevPhW(y) THEN
  761. Vowelout f1=1 f2=1500 -300 250 f3=-400 80 rms=20 len=15
  762. ELIF prevPhW(#a) THEN
  763. Vowelout f1=2 f2=1500 -300 250 f3=-500 80 rms=20 len=15
  764. ELIF prevPhW(o) THEN
  765. Vowelout f1=2 f2=1000 -100 250 f3=-200 80 rms=20 len=15
  766. ELIF prevPhW(O) THEN
  767. Vowelout f1=1 f2=1000 -300 200 f3=-100 80 rms=20 len=15
  768. ELSE
  769. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 len=15
  770. ENDIF
  771. WAV(ustop/t_, 25)
  772. ELSE
  773. vls dnt stp
  774. voicingswitch d[
  775. lengthmod 2
  776. IF nextPhW(#u) THEN
  777. length 30
  778. ELSE
  779. length 15
  780. ENDIF
  781. Vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16 len=35
  782. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20 len=15
  783. IF nextPh(isPause2) THEN
  784. WAV(ustop/t_unasp2, 5)
  785. ENDIF
  786. WAV(ustop/t_hi, 70)
  787. ENDIF
  788. endphoneme
  789. phoneme w
  790. liquid
  791. starttype #u
  792. IF nextPh(isVowel) THEN
  793. length 20
  794. NextVowelStarts
  795. VowelStart(w/w@)
  796. VowelStart(w/wa)
  797. VowelStart(w/we)
  798. VowelStart(w/wi)
  799. VowelStart(w/wo)
  800. VowelStart(w/wu)
  801. EndSwitch
  802. VowelEnding(w/xw, -30)
  803. IF nextPh(isVowel) AND prevPhW(t[) THEN
  804. FMT(vnasal/u_n, 60) addWav(vietnam/w, 50)
  805. ELIF prevPhW(isNasal) THEN
  806. FMT(w/w)
  807. ELSEIF prevPhW(h) THEN
  808. // none, [hw]
  809. ELSE
  810. //FMT(w/_w) addWav(vietnam/w)
  811. FMT(vietnam/_w)
  812. ENDIF
  813. ELSE
  814. // no vowel follows
  815. length 80
  816. Vowelout len=20 rms=20
  817. //FMT(w/w_)
  818. FMT(vietnam/w_, 150)
  819. ENDIF
  820. endphoneme
  821. phoneme n^ // (a)nh
  822. vcd pal nas pzd
  823. ipa ɲ
  824. Vowelout f1=3 f2=2500 300 500 f3=100 80 len=45 brk rate
  825. lengthmod 4
  826. IF KlattSynth THEN
  827. VowelStart(klatt/n^@)
  828. FMT(klatt/n^)
  829. ENDIF
  830. NextVowelStarts
  831. VowelStart(n^/n^@)
  832. VowelStart(n^/n^a)
  833. VowelStart(n^/n^e)
  834. VowelStart(n^/n^i)
  835. VowelStart(n^/n^o)
  836. VowelStart(n^/n^u)
  837. EndSwitch
  838. IF thisPh(isWordEnd) THEN
  839. IF nextPhW(n^) THEN
  840. length 75
  841. ELIF prevPhW(n^) THEN
  842. length 100
  843. ENDIF
  844. FMT(vietnam/n^_)
  845. ELSE
  846. FMT(n^/_n^)
  847. ENDIF
  848. endphoneme
  849. phoneme h
  850. vls glt frc
  851. lengthmod 3
  852. ipa h
  853. IF nextPh(#@) THEN
  854. WAV(h/h@)
  855. ELIF nextPh(#a) THEN
  856. WAV(h/ha)
  857. ELIF nextPh(#e) THEN
  858. WAV(h/he)
  859. ELIF nextPh(#i) THEN
  860. WAV(vietnam/hi)
  861. ELIF nextPh(#o) THEN
  862. WAV(h/ho)
  863. ELIF nextPh(#u) THEN
  864. WAV(vietnam/hu, 25)
  865. ENDIF
  866. WAV(h/h_, 70) // no vowel following
  867. endphoneme