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_latvian 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. // IF thisPh(isStressed) THEN
  2. // FMT(vowel/..., 100)
  3. // ELIF thisPh(isDiminished) AND NOT prevVowel(isStressed) THEN
  4. // FMT(vowel/..., 50)
  5. // ELSE
  6. // FMT(vowel/..., 75)
  7. // ENDIF
  8. phoneme a
  9. vwl starttype #a endtype #a
  10. length 130
  11. FMT(vwl_lv/a, 100) // adjusted from aa_3
  12. endphoneme
  13. phoneme a:
  14. vwl starttype #a endtype #a
  15. length 310
  16. lng
  17. FMT(vwl_lv/aa, 90)
  18. endphoneme
  19. phoneme E
  20. vwl starttype #e endtype #e
  21. length 120
  22. FMT(vwl_lv/e2, 100)
  23. endphoneme
  24. phoneme E:
  25. vwl starttype #e endtype #e
  26. length 300
  27. FMT(vwl_lv/ee2, 100)
  28. endphoneme
  29. phoneme e
  30. vwl starttype #e endtype #e
  31. length 120
  32. FMT(vwl_lv/e, 100) // other alternative e_5
  33. endphoneme
  34. phoneme e:
  35. vwl starttype #e endtype #e
  36. length 300
  37. FMT(vwl_lv/ee, 100) // other alternative e_8
  38. endphoneme
  39. phoneme i
  40. vwl starttype #i endtype #i
  41. length 120
  42. FMT(vwl_lv/i, 110) // was i_6
  43. endphoneme
  44. phoneme i:
  45. vwl starttype #i endtype #i
  46. length 280
  47. FMT(vwl_lv/ii, 90) // was i_7
  48. endphoneme
  49. phoneme y // English y, short Latgalian "hard i"
  50. vwl starttype #i endtype #i
  51. length 120
  52. FMT(vwl_lv/y)
  53. endphoneme
  54. phoneme y: // Long Latgalian "hard i"
  55. vwl starttype #i endtype #i
  56. length 300
  57. FMT(vwl_lv/yy)
  58. endphoneme
  59. phoneme o
  60. vwl starttype #o endtype #o
  61. length 120
  62. FMT(vwl_lv/o, 90)
  63. endphoneme
  64. phoneme o:
  65. vwl starttype #o endtype #o
  66. length 300
  67. FMT(vwl_lv/oo, 75)
  68. endphoneme
  69. phoneme u
  70. vwl starttype #u endtype #u
  71. length 120
  72. FMT(vwl_lv/u, 140)
  73. endphoneme
  74. phoneme u:
  75. vwl starttype #u endtype #u
  76. length 300
  77. FMT(vwl_lv/uu, 120)
  78. endphoneme
  79. phoneme ai
  80. vwl starttype #a endtype #i
  81. length 280
  82. lng
  83. FMT(vdiph/aai, 100)
  84. endphoneme
  85. phoneme au
  86. vwl starttype #a endtype #u
  87. length 300
  88. lng
  89. FMT(vdiph/aau, 100)
  90. endphoneme
  91. phoneme ei
  92. vwl starttype #e endtype #i
  93. length 280
  94. lng
  95. FMT(vdiph/eei_2, 100)
  96. endphoneme
  97. phoneme ie
  98. vwl starttype #i endtype #e
  99. length 250
  100. lng
  101. FMT(vdiph2/ie_2, 100)
  102. endphoneme
  103. phoneme iu
  104. vwl starttype #i endtype #u
  105. length 250
  106. lng
  107. FMT(vdiph2/iu_2, 100)
  108. endphoneme
  109. phoneme ui
  110. vwl starttype #u endtype #i
  111. length 250
  112. lng
  113. FMT(vdiph/ui, 100)
  114. endphoneme
  115. phoneme uo
  116. vwl starttype #u endtype #a
  117. length 260
  118. lng
  119. FMT(vdiph2/uaa, 100)
  120. endphoneme
  121. phoneme uo` // shorter version of uo
  122. vwl starttype #u endtype #a
  123. length 150
  124. lng
  125. FMT(vdiph2/uaa, 100)
  126. endphoneme
  127. phoneme oi
  128. vwl starttype #o endtype #i
  129. length 250
  130. lng
  131. FMT(vdiph/ooi, 100)
  132. endphoneme
  133. phoneme ts
  134. vls alv afr nolink
  135. voicingswitch J
  136. length 55
  137. lengthmod 1
  138. WAV(ustop/ts2, 60)
  139. endphoneme
  140. phoneme tS
  141. vls pla afr sib
  142. voicingswitch dZ
  143. lengthmod 2
  144. length 80
  145. WAV(ustop/tsh,40)
  146. endphoneme
  147. phoneme n- // more voiced variant of n
  148. vwl starttype #a endtype #a
  149. ipa nU+0329
  150. lengthmod 4
  151. length 120
  152. FMT(n/n-syl)
  153. endphoneme
  154. phoneme h // more quiet version of standard h
  155. vls glt apr
  156. lengthmod 3
  157. ipa h
  158. IF nextPh(#a) THEN
  159. WAV(h/ha, 20)
  160. ELIF nextPh(#e) THEN
  161. WAV(h/he, 20)
  162. ELIF nextPh(#i) THEN
  163. WAV(h/hi, 20)
  164. ELIF nextPh(#o) THEN
  165. WAV(h/ho, 20)
  166. ELIF nextPh(#u) THEN
  167. WAV(h/hu, 20)
  168. ENDIF
  169. WAV(h/h_, 20) // no vowel following
  170. endphoneme
  171. phoneme R // Latvian hard r
  172. liquid trl
  173. lengthmod 6
  174. Vowelin f1=0 f2=1700 -300 300 f3=-300 80
  175. Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
  176. FMT(r3/r_trill) addWav(r3/r_trill.wav, 60)
  177. endphoneme
  178. phoneme r // Latvian soft r
  179. liquid trl
  180. lengthmod 6
  181. Vowelin f1=0 f2=1700 -300 300 f3=-300 80
  182. Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
  183. FMT(j/j_) addWav(r3/r_trill.wav, 25)
  184. endphoneme
  185. phoneme t
  186. vls alv stp //lengthenstop
  187. lengthmod 1
  188. voicingswitch d
  189. IF nextPh(isPause2) THEN
  190. WAV(ustop/t_dnt, 40)
  191. ENDIF
  192. WAV(ustop/t_dnt, 50)
  193. endphoneme
  194. phoneme p
  195. vls blb stp
  196. lengthmod 2
  197. voicingswitch b
  198. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
  199. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
  200. IF nextPh(isPause2) THEN
  201. WAV(ustop/p_unasp_, 80)
  202. ENDIF
  203. IF nextPh(l) THEN
  204. WAV(ustop/pl)
  205. ENDIF
  206. WAV(ustop/p_unasp, 120)
  207. endphoneme
  208. phoneme k
  209. vls vel stp
  210. lengthmod 2
  211. voicingswitch g
  212. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  213. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  214. IF nextPh(isPause2) THEN
  215. WAV(ustop/k_)
  216. ENDIF
  217. IF nextPh(#i) OR nextPh(l^) THEN
  218. WAV(ustop/ki)
  219. ENDIF
  220. IF nextPh(l) THEN
  221. WAV(ustop/kl)
  222. ENDIF
  223. WAV(ustop/k_unasp, 60) // weaker
  224. endphoneme
  225. phoneme c
  226. vls pal stp pzd
  227. voicingswitch J
  228. WAV(ustop/c, 80)
  229. endphoneme
  230. phoneme D // louder and shorter version of d
  231. vcd alv stp
  232. voicingswitch t
  233. length 10
  234. lengthmod 5
  235. Vowelin f1=1 f2=1700 -300 300 f3=-100 80
  236. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk
  237. IF PreVoicing THEN
  238. FMT(d/xd, 110)
  239. ENDIF
  240. IF nextPh(isPause2) THEN
  241. FMT(d/d_, 120) addWav(x/d_,110)
  242. ENDIF
  243. FMT(d/d, 110) addWav(x/d,110)
  244. endphoneme
  245. phoneme z` // Shortened version of z for diphthong dz
  246. vcd alv frc sib
  247. voicingswitch s
  248. length 10
  249. lengthmod 6
  250. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  251. IF KlattSynth THEN
  252. Vowelin f1=0 f2=1390 -300 300 f3=0 0
  253. Vowelout f1=1 f2=1390 -300 300 f3=-100 60 len=50 brk
  254. ENDIF
  255. IF nextPh(isPause2) THEN
  256. length 20
  257. FMT(voc/z_, 120) addWav(ufric/s_, 95)
  258. ENDIF
  259. FMT(voc/z, 110) addWav(ufric/s_, 100)
  260. endphoneme
  261. phoneme Z` // Shortened version of Z for diphthong dZ
  262. vcd pla frc sib
  263. voicingswitch S
  264. length 30
  265. lengthmod 6
  266. Vowelin f1=0 f2=2000 0 300 f3=-200 80
  267. Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk
  268. IF KlattSynth THEN
  269. IF nextPh(isPause2) THEN
  270. FMT(klatt/zh_, 70) addWav(vocw/zh, 70)
  271. ENDIF
  272. FMT(klatt/zh) addWav(vocw/zh, 130)
  273. ENDIF
  274. IF nextPh(isPause2) THEN
  275. FMT(voc/zh_, 80) addWav(vocw/zh, 70)
  276. ENDIF
  277. FMT(voc/zh) addWav(vocw/zh, 130)
  278. endphoneme
  279. phoneme > // lengthen previous vowel less than using ":"
  280. virtual
  281. length 20 // it actually seems working shorter, but anyway...
  282. endphoneme
  283. phoneme } // Tiny, 5ms non-linked pause (used between phonemes in word)
  284. pause
  285. // starttype _ endtype _
  286. // lengthmod 1
  287. nolink
  288. length 5
  289. endphoneme
  290. phoneme s
  291. vls alv frc sib
  292. voicingswitch z
  293. lengthmod 3
  294. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  295. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  296. WAV(ufric/s,60)
  297. endphoneme
  298. phoneme j // **y**es
  299. liquid pal starttype #i
  300. IF nextPhW(isVowel) THEN
  301. NextVowelStarts
  302. VowelStart(j/j@)
  303. VowelStart(j/ja)
  304. VowelStart(j/je)
  305. VowelStart(j/ji)
  306. VowelStart(j/jo)
  307. VowelStart(j/ju)
  308. EndSwitch
  309. VowelEnding(j/xj, 70) // In difference with English, vowel is lengthened, not shortened
  310. ELSE
  311. Vowelout len=127 // no vowel follows
  312. FMT(j/xj)
  313. ENDIF
  314. IF prevPh(isPause) THEN
  315. FMT(j/_j)
  316. ENDIF
  317. endphoneme
  318. phoneme l
  319. liquid
  320. IF nextPh(isNotVowel) THEN
  321. ChangePhoneme(l/)
  322. ENDIF
  323. IF nextPh(isNotVowel) THEN
  324. PrevVowelEndings
  325. VowelEnding(l/L1_@L)
  326. VowelEnding(l/L1_aL)
  327. VowelEnding(l/L1_eL)
  328. VowelEnding(l/L1_iL)
  329. VowelEnding(l/L1_oL)
  330. VowelEnding(l/L1_uL)
  331. EndSwitch
  332. FMT(l/l_)
  333. RETURN
  334. ENDIF
  335. CALL vowelstart_l
  336. IF prevPh(a) OR prevPh(a:) THEN
  337. VowelEnding(l/xl, 30) // FIXME
  338. ELSEIF prevPh(isVowel) THEN
  339. VowelEnding(l/xl, 10)
  340. ENDIF
  341. IF prevPh(isPause) THEN
  342. FMT(l/_l)
  343. ENDIF
  344. IF prevPh(t) THEN
  345. FMT(l/tl)
  346. ENDIF
  347. IF prevPh(l/) THEN
  348. FMT(l/l_long) // double l, make it longer
  349. ENDIF
  350. FMT(l/l)
  351. endphoneme