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.2KB

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