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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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 120
  11. FMT(vwl_lv/a, 100) // adjusted from aa_3
  12. endphoneme
  13. phoneme a:
  14. vwl starttype #a endtype #a
  15. length 300
  16. long
  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 300
  47. FMT(vwl_lv/ii, 100) // was i_7
  48. endphoneme
  49. phoneme o
  50. vwl starttype #o endtype #o
  51. length 120
  52. FMT(vwl_lv/o, 90)
  53. endphoneme
  54. phoneme o:
  55. vwl starttype #o endtype #o
  56. length 300
  57. FMT(vwl_lv/oo, 75)
  58. endphoneme
  59. phoneme u
  60. vwl starttype #u endtype #u
  61. length 120
  62. FMT(vwl_lv/u, 140)
  63. endphoneme
  64. phoneme u:
  65. vwl starttype #u endtype #u
  66. length 300
  67. FMT(vwl_lv/uu, 120)
  68. endphoneme
  69. phoneme ai
  70. vwl starttype #a endtype #i
  71. length 250
  72. long
  73. FMT(vdiph/aai, 100)
  74. endphoneme
  75. phoneme au
  76. vwl starttype #a endtype #u
  77. length 275
  78. long
  79. FMT(vdiph/aau, 100)
  80. endphoneme
  81. phoneme ei
  82. vwl starttype #e endtype #i
  83. length 250
  84. long
  85. FMT(vdiph/eei_2, 100)
  86. endphoneme
  87. phoneme ie
  88. vwl starttype #i endtype #e
  89. length 250
  90. long
  91. FMT(vdiph2/ie_2, 100)
  92. endphoneme
  93. phoneme iu
  94. vwl starttype #i endtype #u
  95. length 250
  96. long
  97. FMT(vdiph2/iu_2, 100)
  98. endphoneme
  99. phoneme ui
  100. vwl starttype #u endtype #i
  101. length 250
  102. long
  103. FMT(vdiph/ui, 100)
  104. endphoneme
  105. phoneme uo
  106. vwl starttype #u endtype #a
  107. length 260
  108. long
  109. FMT(vdiph2/uaa, 100)
  110. endphoneme
  111. phoneme o` // shorter version of uo
  112. vwl starttype #u endtype #a
  113. length 180
  114. long
  115. FMT(vdiph2/uaa, 100)
  116. endphoneme
  117. phoneme oi
  118. vwl starttype #o endtype #i
  119. length 250
  120. long
  121. FMT(vdiph/ooi, 100)
  122. endphoneme
  123. phoneme ts
  124. vls alv afr nolink
  125. voicingswitch J
  126. length 55
  127. lengthmod 1
  128. WAV(ustop/ts2, 60)
  129. endphoneme
  130. phoneme tS
  131. vls pla afr sibilant
  132. voicingswitch dZ
  133. lengthmod 2
  134. length 80
  135. WAV(ustop/tsh,40)
  136. endphoneme
  137. phoneme n-
  138. vwl starttype #a endtype #a
  139. ipa nU+0329
  140. lengthmod 4
  141. length 120
  142. FMT(n/n-syl)
  143. endphoneme
  144. phoneme R // Latvian hard r
  145. liquid
  146. trill
  147. lengthmod 6
  148. Vowelin f1=0 f2=1700 -300 300 f3=-300 80
  149. Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
  150. FMT(r3/r_trill) addWav(r3/r_trill.wav, 60)
  151. endphoneme
  152. phoneme r // Latvian soft r
  153. liquid
  154. trill
  155. lengthmod 6
  156. Vowelin f1=0 f2=1700 -300 300 f3=-300 80
  157. Vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
  158. FMT(j/j_) addWav(r3/r_trill.wav, 25)
  159. endphoneme
  160. phoneme t
  161. vls alv stop //lengthenstop
  162. lengthmod 1
  163. voicingswitch d
  164. IF nextPh(isPause2) THEN
  165. WAV(ustop/t_dnt, 40)
  166. ENDIF
  167. WAV(ustop/t_dnt, 50)
  168. endphoneme
  169. phoneme p
  170. vls blb stop
  171. lengthmod 2
  172. voicingswitch b
  173. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
  174. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
  175. IF nextPh(isPause2) THEN
  176. WAV(ustop/p_unasp_, 80)
  177. ENDIF
  178. IF nextPh(l) THEN
  179. WAV(ustop/pl)
  180. ENDIF
  181. WAV(ustop/p_unasp, 120)
  182. endphoneme
  183. phoneme k
  184. vls vel stop
  185. lengthmod 2
  186. voicingswitch g
  187. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  188. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  189. IF nextPh(isPause2) THEN
  190. WAV(ustop/k_)
  191. ENDIF
  192. IF nextPh(#i) OR nextPh(l^) THEN
  193. WAV(ustop/ki)
  194. ENDIF
  195. IF nextPh(l) THEN
  196. WAV(ustop/kl)
  197. ENDIF
  198. WAV(ustop/k_unasp, 60) // weaker
  199. endphoneme
  200. phoneme c
  201. vls pal stop palatal
  202. voicingswitch J
  203. WAV(ustop/c, 80)
  204. endphoneme
  205. phoneme D // louder and shorter version of d
  206. vcd alv stop
  207. voicingswitch t
  208. length 10
  209. lengthmod 5
  210. Vowelin f1=1 f2=1700 -300 300 f3=-100 80
  211. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk
  212. IF PreVoicing THEN
  213. FMT(d/xd, 110)
  214. ENDIF
  215. IF nextPh(isPause2) THEN
  216. FMT(d/d_, 120) addWav(x/d_,110)
  217. ENDIF
  218. FMT(d/d, 110) addWav(x/d,110)
  219. endphoneme
  220. phoneme z` // Shortened version of z for diphthong dz
  221. vcd alv frc sibilant
  222. voicingswitch s
  223. length 10
  224. lengthmod 6
  225. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  226. IF KlattSynth THEN
  227. Vowelin f1=0 f2=1390 -300 300 f3=0 0
  228. Vowelout f1=1 f2=1390 -300 300 f3=-100 60 len=50 brk
  229. ENDIF
  230. IF nextPh(isPause2) THEN
  231. length 20
  232. FMT(voc/z_, 120) addWav(ufric/s_, 95)
  233. ENDIF
  234. FMT(voc/z, 110) addWav(ufric/s_, 100)
  235. endphoneme
  236. phoneme Z` // Shortened version of Z for diphthong dZ
  237. vcd pla frc sibilant
  238. voicingswitch S
  239. length 30
  240. lengthmod 6
  241. Vowelin f1=0 f2=2000 0 300 f3=-200 80
  242. Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk
  243. IF KlattSynth THEN
  244. IF nextPh(isPause2) THEN
  245. FMT(klatt/zh_, 70) addWav(vocw/zh, 70)
  246. ENDIF
  247. FMT(klatt/zh) addWav(vocw/zh, 130)
  248. ENDIF
  249. IF nextPh(isPause2) THEN
  250. FMT(voc/zh_, 80) addWav(vocw/zh, 70)
  251. ENDIF
  252. FMT(voc/zh) addWav(vocw/zh, 130)
  253. endphoneme
  254. phoneme > // lengthen previous vowel less than using ":"
  255. virtual
  256. length 30 // it actually seems working shorter, but anyway...
  257. endphoneme
  258. phoneme } // Tiny, 5ms non-linked pause (used between phonemes in word)
  259. pause
  260. // starttype _ endtype _
  261. // lengthmod 1
  262. nolink
  263. length 5
  264. endphoneme
  265. // TODO should use this with correct lengthening
  266. //phoneme l
  267. // liquid
  268. // unstressed
  269. // dnt
  270. // length 150
  271. // FMT(vwl_hi/l-voc)
  272. //endphoneme
  273. phoneme s
  274. vls alv frc sibilant
  275. voicingswitch z
  276. lengthmod 3
  277. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  278. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  279. WAV(ufric/s,60)
  280. endphoneme