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_catalan 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. //====================================================
  2. // Catalan - based on Spanish and Base2
  3. //====================================================
  4. // in our project we decided not to use elisions, but they could be managed here by using "ipa NULL"
  5. // vowels
  6. //=============
  7. phoneme a
  8. vwl starttype #a endtype #a
  9. length 180
  10. IF thisPh(isUnstressed) THEN
  11. ChangePhoneme(@)
  12. ENDIF
  13. FMT(vowel/a_6)
  14. endphoneme
  15. phoneme a2 // don't reduce
  16. vwl starttype #a endtype #a
  17. length 180
  18. FMT(vowel/a_6)
  19. endphoneme
  20. phoneme e
  21. vwl starttype #e endtype #e
  22. length 170
  23. IF thisPh(isUnstressed) THEN
  24. ChangePhoneme(@)
  25. ENDIF
  26. FMT(vowel/e)
  27. endphoneme
  28. phoneme e2 // don't reduce
  29. vwl starttype #e endtype #e
  30. length 170
  31. FMT(vowel/e)
  32. endphoneme
  33. phoneme E
  34. vwl starttype #e endtype #e
  35. length 180
  36. IF thisPh(isUnstressed) THEN
  37. ChangePhoneme(@)
  38. ENDIF
  39. FMT(vowel/e_mid)
  40. endphoneme
  41. phoneme E2 // don't reduce
  42. vwl starttype #e endtype #e
  43. length 180
  44. ChangeIfUnstressed(e2)
  45. FMT(vowel/e_mid)
  46. endphoneme
  47. phoneme O
  48. vwl starttype #o endtype #o
  49. length 170
  50. IF thisPh(isUnstressed) THEN
  51. IF thisPh(isWordEnd) AND nextPh(isVowel) THEN
  52. IF nextPh(i) THEN
  53. ChangePhoneme(u)
  54. ELSE
  55. ChangePhoneme(w)
  56. ENDIF
  57. ELIF thisPh(isWordStart) AND prevPh(isVowel) THEN
  58. ChangePhoneme(w)
  59. ELSE
  60. ChangePhoneme(u)
  61. ENDIF
  62. ENDIF
  63. FMT(vowel/oo)
  64. endphoneme
  65. phoneme o
  66. vwl starttype #o endtype #o
  67. length 170
  68. IF thisPh(isUnstressed) THEN
  69. IF thisPh(isWordEnd) AND nextPh(isVowel) THEN
  70. IF nextPh(i) THEN
  71. ChangePhoneme(u)
  72. ELSE
  73. ChangePhoneme(w)
  74. ENDIF
  75. ELIF thisPh(isWordStart) AND prevPh(isVowel) THEN
  76. ChangePhoneme(w)
  77. ELSE
  78. ChangePhoneme(u)
  79. ENDIF
  80. ENDIF
  81. FMT(vowel/o)
  82. endphoneme
  83. phoneme o2
  84. vwl starttype #o endtype #o
  85. length 170
  86. FMT(vowel/o)
  87. endphoneme
  88. phoneme O2
  89. vwl starttype #o endtype #o
  90. length 170
  91. FMT(vowel/oo)
  92. endphoneme
  93. phoneme U
  94. vwl starttype #u endtype #u
  95. unstressed
  96. length 160
  97. FMT(vowel/uu_2)
  98. endphoneme
  99. phoneme u
  100. vwl starttype #u endtype #u
  101. length 160
  102. IF thisPh(isUnstressed) THEN
  103. IF thisPh(isWordEnd) THEN
  104. IF nextPh(isVowel) THEN
  105. IF nextPh(i) THEN
  106. ELSE
  107. ChangePhoneme(w)
  108. ENDIF
  109. ENDIF
  110. ELIF thisPh(isWordStart) THEN
  111. IF prevPh(isVowel) THEN
  112. ChangePhoneme(w)
  113. ENDIF
  114. ENDIF
  115. ENDIF
  116. FMT(vowel/u_bck)
  117. endphoneme
  118. phoneme i
  119. vwl starttype #i endtype #i
  120. length 170
  121. IF thisPh(isUnstressed) THEN
  122. IF thisPh(isWordEnd) THEN
  123. IF nextPh(isVowel) THEN
  124. IF nextPh(u) THEN
  125. ELSE
  126. ChangePhoneme(j)
  127. ENDIF
  128. ENDIF
  129. ELIF thisPh(isWordStart) THEN
  130. IF prevPh(isVowel) THEN
  131. ChangePhoneme(j)
  132. ENDIF
  133. ENDIF
  134. ENDIF
  135. FMT(vowel/i)
  136. endphoneme
  137. // nasals
  138. //==============
  139. phoneme M
  140. vls lbd nas
  141. ipa ɱ
  142. IF nextPh(v) THEN
  143. ChangePhoneme(m)
  144. ENDIF
  145. endphoneme
  146. phoneme m
  147. vcd blb nas
  148. Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk
  149. lengthmod 4
  150. IF KlattSynth THEN
  151. Vowelin f1=0 f2=1000 -50 -200 f3=-200 80
  152. IF nextPh(isPause2) THEN
  153. FMT(klatt/m_)
  154. ENDIF
  155. FMT(klatt/m)
  156. ENDIF
  157. NextVowelStarts
  158. VowelStart(m/m@)
  159. VowelStart(m/ma)
  160. VowelStart(m/me)
  161. VowelStart(m/mi)
  162. VowelStart(m/mo)
  163. VowelStart(m/mu)
  164. EndSwitch
  165. IF nextPh(f) OR nextPh(v) THEN
  166. ChangePhoneme(M)
  167. ENDIF
  168. IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN
  169. FMT(m/mj)
  170. ELIF prevPh(isPause) THEN
  171. FMT(m/_m)
  172. ELIF nextPh(isNotVowel) THEN
  173. FMT(m/m_)
  174. ENDIF
  175. endphoneme
  176. phoneme n
  177. vcd alv nas
  178. Vowelout f1=2 f2=1500 -300 250 f3=-100 80 rms=20 brk
  179. lengthmod 4
  180. IF KlattSynth THEN
  181. Vowelin f1=0 f2=1500 -200 200 f3=0 80
  182. FMT(klatt/n)
  183. ENDIF
  184. NextVowelStarts
  185. VowelStart(n/n@)
  186. VowelStart(n/na)
  187. VowelStart(n/ne)
  188. VowelStart(n/ni)
  189. VowelStart(n/no)
  190. VowelStart(n/nu)
  191. EndSwitch
  192. IF nextPh(f) THEN
  193. ChangePhoneme(M)
  194. ELIF nextPh(k) OR nextPh(g) THEN
  195. ChangePhoneme(N)
  196. ELIF nextPh(p) OR nextPh(b) OR nextPh(v) OR nextPh(m) THEN
  197. ChangePhoneme(m)
  198. ELIF nextPh(l^) OR nextPh(n^) THEN
  199. ChangePhoneme(n^)
  200. ENDIF
  201. IF prevPh(isNotVowel) AND nextPhW(isLiquid) THEN
  202. FMT(n/nj)
  203. ELIF prevPh(isPause) OR prevPh(n) THEN
  204. FMT(n/_n)
  205. ELIF nextPh(isNotVowel) THEN
  206. FMT(n/n_)
  207. ENDIF
  208. endphoneme
  209. phoneme l
  210. import_phoneme en/l // use 'dark' [l] after a vowel
  211. endphoneme
  212. // fricatives
  213. //================
  214. phoneme s
  215. vls alv frc sib
  216. voicingswitch z
  217. lengthmod 3
  218. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  219. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  220. IF prevPh(isPalatal) OR nextPh(S) OR nextPh(Z) THEN
  221. IF prevPh(j) THEN
  222. ELIF nextPh(isVoiced) THEN
  223. ChangePhoneme(Z)
  224. ELSE
  225. ChangePhoneme(S)
  226. ENDIF
  227. ENDIF
  228. IF thisPh(isWordEnd) THEN
  229. IF nextPh(isVoiced) THEN
  230. ChangePhoneme(z)
  231. ENDIF
  232. ENDIF
  233. IF nextPh(isPause) THEN
  234. WAV(ufric/s_)
  235. ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN
  236. WAV(ufric/s!)
  237. ENDIF
  238. WAV(ufric/s)
  239. endphoneme
  240. phoneme z
  241. vcd alv frc sib
  242. voicingswitch s
  243. lengthmod 6
  244. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  245. IF prevPh(isPalatal) OR nextPh(Z) THEN
  246. IF prevPh(j) THEN
  247. ELSE
  248. ChangePhoneme(Z)
  249. ENDIF
  250. ENDIF
  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. FMT(voc/z_) addWav(ufric/s_, 70)
  257. ENDIF
  258. FMT(voc/z) addWav(ufric/s_, 85)
  259. endphoneme
  260. phoneme f
  261. vls lbd frc
  262. voicingswitch v
  263. lengthmod 3
  264. Vowelout f1=0 f2=1000 -500 -350 f3=-200 80
  265. IF thisPh(isWordStart) THEN
  266. ELSE
  267. IF nextPh(isVoiced) THEN
  268. IF thisPh(isWordEnd) THEN
  269. ipa v
  270. ELSE
  271. IF nextPh(isVowel) OR nextPh(l) OR nextPh(**) OR nextPh(R) THEN
  272. ELSE
  273. ipa v
  274. ENDIF
  275. ENDIF
  276. ENDIF
  277. ENDIF
  278. IF nextPh(isPause) THEN
  279. WAV(ufric/f_)
  280. ENDIF
  281. WAV(ufric/f)
  282. endphoneme
  283. phoneme v // = b
  284. vcd blb stp
  285. IF thisPh(isWordEnd) THEN
  286. IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  287. ELIF prevPh(m) THEN
  288. ELSE
  289. ChangePhoneme(p)
  290. ENDIF
  291. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
  292. ChangePhoneme(b)
  293. ELIF nextPh(isVoiced) THEN
  294. IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
  295. IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN
  296. ChangePhoneme(B)
  297. ELSE
  298. ChangePhoneme(b)
  299. ENDIF
  300. ELSE
  301. ChangePhoneme(b)
  302. ENDIF
  303. ELSE
  304. ChangePhoneme(p)
  305. ENDIF
  306. CALL base1/b
  307. endphoneme
  308. // R
  309. //=====================
  310. phoneme R
  311. liquid trl
  312. lengthmod 6
  313. ipa r
  314. IF thisPh(isWordEnd) AND nextPh(R) THEN
  315. ipa NULL
  316. ENDIF
  317. Vowelin f1=0 f2=1600 -300 300 f3=-200 80
  318. Vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk
  319. FMT(r3/r_trill2) addWav(r3/r_trill2.wav, 65)
  320. endphoneme
  321. // plosives (oclusives)
  322. // ====================
  323. phoneme b
  324. vcd blb stp
  325. IF thisPh(isWordEnd) THEN
  326. IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  327. ELIF prevPh(m) THEN
  328. ELSE
  329. ChangePhoneme(p)
  330. ENDIF
  331. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
  332. ELIF nextPh(isVoiced) THEN
  333. IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
  334. IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN
  335. ChangePhoneme(B)
  336. ENDIF
  337. ENDIF
  338. ELSE
  339. ChangePhoneme(p)
  340. ENDIF
  341. CALL base1/b
  342. endphoneme
  343. phoneme g
  344. vcd vel stp
  345. lengthmod 5
  346. voicingswitch k
  347. Vowelin f1=2 f2=2300 200 300 f3=-300 80
  348. Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
  349. IF thisPh(isWordEnd) THEN
  350. IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  351. ELSE
  352. ChangePhoneme(k)
  353. ENDIF
  354. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
  355. ELIF nextPh(isVoiced) THEN
  356. IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
  357. IF prevPh(isVowel) OR prevPh(isLiquid) OR prevPh(isVFricative) THEN
  358. ChangePhoneme(Q)
  359. ENDIF
  360. ENDIF
  361. ELSE
  362. ChangePhoneme(k)
  363. ENDIF
  364. IF PreVoicing THEN
  365. FMT(g/xg)
  366. ENDIF
  367. IF nextPh(isPause2) THEN
  368. FMT(g/g_) addWav(x/g_)
  369. ENDIF
  370. FMT(g/g) addWav(x/g2)
  371. endphoneme
  372. phoneme d
  373. vcd dnt stp
  374. IF thisPh(isWordEnd) THEN
  375. IF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  376. ELSE
  377. ChangePhoneme(t)
  378. ENDIF
  379. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // keep sonority
  380. ELIF nextPh(isVoiced) THEN
  381. IF nextPh(isVowel) OR nextPh(isRhotic) OR nextPh(l) OR nextPh(j) OR nextPh(w) THEN
  382. IF prevPh(isVowel) OR prevPh(**) OR prevPh(R) OR prevPh(j) OR prevPh(w) OR prevPh(isVFricative) THEN
  383. ChangePhoneme(D)
  384. ENDIF
  385. ENDIF
  386. ELSE
  387. ChangePhoneme(t)
  388. ENDIF
  389. CALL base2/d
  390. endphoneme
  391. phoneme p
  392. vls blb stp
  393. lengthmod 2
  394. voicingswitch b
  395. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80
  396. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
  397. IF nextPh(isPause2) THEN
  398. WAV(ustop/p_unasp_, 80)
  399. ELIF nextPh(isRhotic) THEN
  400. WAV(ustop/pr)
  401. ELIF nextPh(l) THEN
  402. WAV(ustop/pl)
  403. ELIF thisPh(isWordStart) THEN // don't change it if it's word start
  404. ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  405. IF nextPh(w) OR nextPh(j) THEN
  406. ELSE
  407. ChangePhoneme(b)
  408. ENDIF
  409. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
  410. ChangePhoneme(b)
  411. ENDIF
  412. WAV(ustop/p_unasp)
  413. endphoneme
  414. phoneme t // dental variant of /t/
  415. vls dnt stp
  416. lengthmod 2
  417. voicingswitch d
  418. Vowelin f1=0 f2=1600 -300 300 f3=-100 80
  419. Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20
  420. IF nextPh(isPause2) THEN
  421. WAV(ustop/t_dnt, 30)
  422. ELIF thisPh(isWordStart) THEN // don't change it if it's word start
  423. ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  424. IF nextPh(**) OR nextPh(w) OR nextPh(j) THEN
  425. ELSE
  426. ChangePhoneme(d)
  427. ENDIF
  428. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
  429. ChangePhoneme(d)
  430. ENDIF
  431. WAV(ustop/t_dnt2, 60)
  432. endphoneme
  433. phoneme k
  434. vls vel stp
  435. lengthmod 2
  436. voicingswitch g
  437. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  438. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  439. IF nextPh(isPause2) THEN
  440. WAV(ustop/k_)
  441. ELIF nextPh(isRhotic) THEN
  442. WAV(ustop/kr)
  443. ELIF thisPh(isWordStart) THEN // don't change it if it's word start
  444. ELIF nextPh(isVoiced) AND nextPh(isNotVowel) THEN
  445. IF nextPh(w) OR nextPh(j) THEN
  446. ELIF nextPh(n) OR nextPh(d) OR nextPh(z) THEN
  447. ChangePhoneme(g)
  448. ELIF thisPh(isWordEnd) THEN
  449. ChangePhoneme(g)
  450. ENDIF
  451. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
  452. ChangePhoneme(g)
  453. ENDIF
  454. WAV(ustop/k_unasp, 70)
  455. endphoneme
  456. phoneme tS
  457. vls pla afr sib
  458. voicingswitch dZ
  459. lengthmod 2
  460. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  461. IF thisPh(isWordEnd) AND nextPh(isVoiced) THEN
  462. ChangePhoneme(dZ)
  463. ELIF nextPh(s) AND nextPh(isWordEnd) AND next2Ph(isVoiced) THEN // sonority propagation
  464. ChangePhoneme(dZ)
  465. ENDIF
  466. WAV(ustop/tsh)
  467. endphoneme