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

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