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_arabic 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. // short vowels
  2. phoneme a
  3. vowel starttype #a endtype #a
  4. unstressed
  5. length 180
  6. CALL ShortVowelLength
  7. IF prevPh(s[) OR prevPh(d[) OR prevPh(t[) OR prevPh(Z) THEN
  8. FMT(vowel/0_3)
  9. ELSE
  10. FMT(vowel/a#)
  11. ENDIF
  12. endphoneme
  13. phoneme i
  14. vowel starttype #i endtype #i
  15. length 140
  16. unstressed
  17. CALL ShortVowelLength
  18. FMT(vowel/i)
  19. endphoneme
  20. phoneme u
  21. vowel starttype #u endtype #u
  22. unstressed
  23. length 140
  24. CALL ShortVowelLength
  25. FMT(vowel/u)
  26. endphoneme
  27. phoneme : // lengthen previous vowel by "length"
  28. virtual
  29. length 200
  30. endphoneme
  31. // long vowels
  32. phoneme a:
  33. vowel starttype #a endtype #a
  34. length 300
  35. //CALL LongVowelLength
  36. IF prevPh(s[) OR prevPh(d[) OR prevPh(t[) OR prevPh(Z) THEN
  37. FMT(vowel/0_3)
  38. ELSE
  39. FMT(vowel/a#)
  40. ENDIF
  41. endphoneme
  42. phoneme i:
  43. vowel starttype #i endtype #i
  44. length 300
  45. //CALL LongVowelLength
  46. FMT(vowel/i)
  47. endphoneme
  48. phoneme u:
  49. vowel starttype #u endtype #u
  50. length 300
  51. //CALL LongVowelLength
  52. FMT(vowel/u)
  53. endphoneme
  54. // Redifine consnant for arabic
  55. phoneme l
  56. liquid
  57. lengthmod 7
  58. IF nextPh(isNotVowel) THEN
  59. ChangePhoneme(l/)
  60. ENDIF
  61. IF nextPh(isNotVowel) THEN
  62. // in case the next phoneme is no longer a vowel, in pass=2
  63. PrevVowelEndings
  64. VowelEnding(l/L1_@L, -60)
  65. VowelEnding(l/L1_aL, -40)
  66. VowelEnding(l/L1_eL, -30)
  67. VowelEnding(l/L1_iL, -30)
  68. VowelEnding(l/L1_oL, -40)
  69. VowelEnding(l/L1_uL, -40)
  70. EndSwitch
  71. FMT(l/l_)
  72. RETURN
  73. ENDIF
  74. CALL vowelstart_l
  75. IF prevPh(#@) THEN
  76. VowelEnding(l/xl, -50)
  77. ELIF prevPh(isVowel) THEN
  78. VowelEnding(l/xl, -40)
  79. ENDIF
  80. IF prevPh(isPause) THEN
  81. FMT(l/_l)
  82. ENDIF
  83. IF prevPh(t) THEN
  84. FMT(l/tl)
  85. ENDIF
  86. IF prevPh(l/) THEN
  87. FMT(l/l_long) // double l, make it longer
  88. ENDIF
  89. FMT(l/l)
  90. endphoneme
  91. phoneme w
  92. liquid
  93. lengthmod 7
  94. FMT(w/w_)
  95. endphoneme
  96. phoneme j
  97. liquid palatal
  98. lengthmod 7
  99. FMT(j/j_)
  100. endphoneme
  101. //*******************************************************************
  102. // NASAL CONSONANTS
  103. //*******************************************************************
  104. phoneme m
  105. vcd blb nasal
  106. Vowelout f1=2 f2=1000 -500 -350 f3=-200 80 brk
  107. lengthmod 4
  108. FMT(m/m_)
  109. endphoneme
  110. phoneme n
  111. vcd alv nasal
  112. Vowelout f1=2 f2=1700 -300 250 f3=-100 80 rms=20 brk
  113. lengthmod 4
  114. FMT(n/n_)
  115. endphoneme
  116. //*******************************************************************
  117. // VOICED STOPS
  118. //*******************************************************************
  119. phoneme b
  120. vcd blb stop
  121. voicingswitch p
  122. Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk
  123. lengthmod 7
  124. FMT(b/b) addWav(x/b)
  125. endphoneme
  126. phoneme d
  127. vcd alv stop
  128. voicingswitch t
  129. lengthmod 5
  130. Vowelin f1=1 f2=1700 -300 300 f3=-100 80
  131. Vowelout f1=2 f2=1700 -300 300 f3=-100 80 brk
  132. FMT(d/d) addWav(x/d)
  133. endphoneme
  134. phoneme d[
  135. vcd dnt stop
  136. voicingswitch t[
  137. lengthmod 5
  138. Vowelin f1=2 f2=1500 -300 300 f3=-150 80
  139. Vowelout f1=2 f2=1500 -300 300 f3=-150 80
  140. FMT(d/d) addWav(x/d_dnt, 100)
  141. endphoneme
  142. phoneme dZ
  143. vcd pla afr sibilant
  144. voicingswitch tS
  145. //lengthmod 8
  146. Vowelin f1=2 f2=2300 200 400 f3=100 80
  147. Vowelout f1=2 f2=2300 250 300 f3=100 80 brk
  148. FMT(dzh/dzh) addWav(x/dzh)
  149. endphoneme
  150. phoneme J
  151. vcd pal afr sibilant palatal
  152. voicingswitch c
  153. lengthmod 5
  154. Vowelin f1=2 f2=2700 400 600 f3=300 80 rate len=70
  155. Vowelout f1=2 f2=2700 400 600 f3=300 80 colr=1
  156. IF KlattSynth THEN
  157. IF nextPh(isPause2) THEN
  158. FMT(klatt/dz_pzd_) addWav(x/dzh, 35)
  159. ENDIF
  160. FMT(klatt/dz_pzd) addWav(x/dzh, 45)
  161. ENDIF
  162. FMT(dzh/dz_pzd) addWav(x/dzh, 45)
  163. endphoneme
  164. phoneme g
  165. vcd vel stop
  166. voicingswitch k
  167. lengthmod 5
  168. Vowelin f1=2 f2=2300 200 300 f3=-300 80
  169. Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
  170. FMT(g/g) addWav(x/g2, 150)
  171. endphoneme
  172. //*******************************************************************
  173. // VOICED fricatives
  174. //*******************************************************************
  175. phoneme D
  176. vcd dnt frc
  177. voicingswitch T
  178. lengthmod 6
  179. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  180. IF KlattSynth THEN
  181. Vowelin f1=0 f2=1290 -300 300 f3=0 0
  182. ENDIF
  183. FMT(voc/dh) addWav(vocw/dh)
  184. endphoneme
  185. phoneme z
  186. vcd alv frc sibilant
  187. //voicingswitch s
  188. lengthmod 1
  189. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  190. IF KlattSynth THEN
  191. Vowelin f1=0 f2=1390 -300 300 f3=0 0
  192. Vowelout f1=1 f2=1390 -300 300 f3=-100 60 len=50 brk
  193. ENDIF
  194. FMT(voc/z) addWav(ufric/s_, 85)
  195. endphoneme
  196. phoneme Z
  197. vcd pla frc sibilant
  198. voicingswitch S
  199. lengthmod 6
  200. Vowelin f1=0 f2=2000 0 300 f3=-200 80
  201. Vowelout f1=2 f2=2000 0 300 f3=-200 80 brk
  202. IF KlattSynth THEN
  203. IF nextPh(isPause2) THEN
  204. FMT(klatt/zh_) addWav(vocw/zh)
  205. ENDIF
  206. FMT(klatt/zh) addWav(vocw/zh, 130)
  207. ENDIF
  208. FMT(voc/zh) addWav(vocw/zh, 130)
  209. endphoneme
  210. //*******************************************************************
  211. // UNVOICED STOPS
  212. //*******************************************************************
  213. phoneme t
  214. vls alv stop
  215. voicingswitch d
  216. lengthmod 2
  217. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  218. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  219. WAV(ustop/t, 90)
  220. endphoneme
  221. phoneme t[ // dental variant of /t/
  222. vls dnt stop
  223. voicingswitch d[
  224. lengthmod 2
  225. Vowelin f1=1 f2=1500 -250 250 f3=-100 80 amp=16
  226. Vowelout f1=0 f2=1500 -300 250 f3=-100 80 rms=20
  227. WAV(ustop/t_dnt, 35)
  228. endphoneme
  229. phoneme k
  230. vls vel stop
  231. voicingswitch g
  232. lengthmod 2
  233. Vowelin f1=0 f2=2300 200 300 f3=-200 80
  234. Vowelout f1=0 f2=2300 300 400 f3=-200 80 rms=20
  235. IF KlattSynth THEN
  236. Vowelout f1=0 f2=2300 200 300 f3=-200 80 rms=20
  237. ENDIF
  238. WAV(ustop/k)
  239. endphoneme
  240. phoneme q
  241. vls uvl stop
  242. lengthmod 2
  243. Vowelin f1=1 f2=1700 0 200 f3=-300 80 gpaus f4 rms=30
  244. Vowelout f1=1 f2=1700 -100 200 f3=-300 80 f4 rms=35
  245. WAV(ustop/q, 48)
  246. endphoneme
  247. //*******************************************************************
  248. // UNVOICED fricatives
  249. //*******************************************************************
  250. phoneme f
  251. vls lbd frc
  252. voicingswitch v
  253. lengthmod 3
  254. Vowelout f1=0 f2=1000 -500 -350 f3=-200 80
  255. WAV(ufric/f)
  256. endphoneme
  257. phoneme T
  258. vls dnt frc
  259. voicingswitch D
  260. lengthmod 3
  261. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  262. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  263. WAV(ufric/th)
  264. endphoneme
  265. phoneme s
  266. vls alv frc sibilant
  267. voicingswitch z
  268. lengthmod 3
  269. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  270. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  271. WAV(ufric/s)
  272. endphoneme
  273. phoneme S
  274. vls pla frc sibilant
  275. voicingswitch Z
  276. lengthmod 3
  277. Vowelin f1=0 f2=2100 100 300 f3=-100 80
  278. Vowelout f1=0 f2=2100 100 300 f3=-100 80
  279. WAV(ufric/sh)
  280. endphoneme
  281. phoneme x
  282. vls vel frc
  283. voicingswitch Q
  284. lengthmod 3
  285. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  286. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  287. //WAV(ufric/x)
  288. WAV(vwl_ar/kha)
  289. endphoneme
  290. phoneme h
  291. vls glt apr
  292. lengthmod 3
  293. ipa h
  294. WAV(h/h_, 70) // no vowel following
  295. endphoneme
  296. // Added specific consnant to arabic
  297. phoneme H // arabic Hah
  298. vls phr frc
  299. ipa U+0127
  300. lengthmod 5
  301. WAV(vwl_ar/H2)
  302. endphoneme
  303. phoneme Z // arabic ZAH .Todo
  304. vls phr frc
  305. lengthmod 5
  306. voicingswitch z
  307. WAV(vwl_ar/ZH4)
  308. endphoneme
  309. phoneme E // arabic Ain
  310. vls phr frc
  311. //ipa U+0127
  312. //voicingswitch a
  313. lengthmod 5
  314. //WAV(vwl_ar/AN2,50)
  315. WAV(vwl_ar/ain2)
  316. endphoneme
  317. phoneme G //arabic Ghain
  318. //vcd uvl frc
  319. vls uvl frc
  320. lengthmod 3
  321. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  322. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  323. voicingswitch R
  324. //lengthmod 5
  325. //ipa U+0280
  326. WAV(vwl_ar/ghain6)
  327. //FMT(voc/Q_ulv) addWav(vwl_ar/gh, 100)
  328. //FMT(voc/Q_ulv) addWav(vwl_ar/ghain3, 100)
  329. endphoneme
  330. phoneme d[ //arabic Dhad
  331. vls dnt stop
  332. voicingswitch d
  333. length 120
  334. WAV(vwl_ar/da7)
  335. endphoneme
  336. phoneme s[
  337. vls dnt stop
  338. //voicingswitch s
  339. lengthmod 7
  340. WAV(vwl_ar/SA1)
  341. endphoneme
  342. phoneme r
  343. liquid rhotic
  344. ipa ?
  345. lengthmod 7
  346. IF nextPh(a) OR nextPh(a:) THEN
  347. FMT(r/ra)
  348. ENDIF
  349. FMT(r/r_)
  350. endphoneme
  351. procedure ShortVowelLength
  352. //IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN // voiced
  353. IF prevPhW(isNotVowel) AND nextPhW(isNotVowel) THEN // consonants
  354. length 140
  355. RETURN
  356. //ENDIF
  357. ELSE
  358. IF prevPh(isStressed) THEN
  359. length 160
  360. ELSE
  361. length 175
  362. ENDIF
  363. ENDIF
  364. endprocedure
  365. procedure LongVowelLength
  366. //IF prevPhW(isVoiced) AND nextPhW(isVoiced) THEN // voiced
  367. IF nextPhW(:) THEN
  368. length 300
  369. RETURN
  370. //ENDIF
  371. ELIF prevPhW(isNotVowel) AND nextPhW(isNotVowel) THEN // consonants
  372. length 340
  373. RETURN
  374. //ENDIF
  375. ELSE
  376. IF prevPh(isStressed) THEN
  377. length 360
  378. ELSE
  379. length 375
  380. ENDIF
  381. ENDIF
  382. endprocedure