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

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