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_french 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. //====================================================
  2. // French
  3. //====================================================
  4. // Updated 2010-02-25 Michel Such <[email protected]>
  5. phoneme #l virtual
  6. // Used for l and l/
  7. endphoneme
  8. phoneme #r virtual
  9. // Used for r and r/2
  10. endphoneme
  11. phoneme : // Lengthen previous vowel by "length"
  12. virtual
  13. length 40 // shorter than for fr-ca
  14. endphoneme
  15. procedure vowelstart_r
  16. NextVowelStarts
  17. VowelStart(vwl_fr/r@)
  18. VowelStart(vwl_fr/ra, -30)
  19. VowelStart(vwl_fr/re)
  20. VowelStart(vwl_fr/ri)
  21. VowelStart(vwl_fr/ro)
  22. VowelStart(vwl_fr/ru)
  23. EndSwitch
  24. endprocedure
  25. phoneme r
  26. liquid rhotic uvl
  27. starttype #r endtype #r
  28. lengthmod 7
  29. IF nextPh(isNotVowel) THEN
  30. ChangePhoneme(r/2)
  31. ENDIF
  32. IF nextPh(isStressed) THEN
  33. length 45
  34. ENDIF
  35. VowelEnding(vwl_fr/xr)
  36. CALL vowelstart_r
  37. IF prevPh(isPause) OR prevPhW(r/2) THEN
  38. FMT(vwl_fr/_r)
  39. ELIF prevPhW(p) OR prevPhW(k) THEN
  40. length 50
  41. FMT(vwl_fr/tr)
  42. ELIF prevPhW(t) THEN
  43. length 45
  44. FMT(vwl_fr/tr) addWav(r3/rx,30)
  45. ELIF prevPhW(f) OR prevPhW(g) OR prevPhW(v) THEN
  46. length 40
  47. ENDIF
  48. IF thisPh(isWordStart) THEN
  49. IF prevPh(isVowel) OR prevPh(isPause) OR prevPh(#l) OR prevPh(r/2) THEN
  50. FMT(vwl_fr/_r)
  51. ENDIF
  52. FMT(vwl_fr/_r2) addWav(r3/rx, 15)
  53. ENDIF
  54. FMT(vwl_fr/r) addWav(r3/rx,25)
  55. endphoneme
  56. phoneme r2 // silent unless followed by vowel
  57. liquid rhotic uvl
  58. starttype #r endtype #r
  59. lengthmod 7
  60. Vowelin f1=0 f2=1600 -300 300 f3=-200 80
  61. Vowelout f1=2 f2=1600 -300 300 f3=-300 80
  62. IF nextPh(isNotVowel) THEN
  63. ChangePhoneme(NULL)
  64. ENDIF
  65. VowelEnding(vwl_fr/xr)
  66. CALL vowelstart_r
  67. FMT(vwl_fr/r)
  68. endphoneme
  69. phoneme r/2 // variant of [r] when not preceding a vowel
  70. liquid rhotic uvl
  71. starttype #r endtype #r
  72. Vowelout f1=2 f2=1600 -300 300 f3=-300 100 len=50
  73. lengthmod 2
  74. PrevVowelEndings
  75. VowelEnding(vwl_fr/r_@)
  76. VowelEnding(vwl_fr/r_a)
  77. VowelEnding(vwl_fr/r_e)
  78. VowelEnding(vwl_fr/r_i)
  79. VowelEnding(vwl_fr/r_o)
  80. VowelEnding(vwl_fr/r_u)
  81. EndSwitch
  82. IF prevPh(t) OR prevPh(p) OR prevPh(k) OR prevPh(d) THEN
  83. FMT(vwl_fr/trr)
  84. ENDIF
  85. IF thisPh(isWordEnd) THEN
  86. FMT(vwl_fr/r_) addWav(r3/rx, 20)
  87. ENDIF
  88. IF prevPh(isVowel) THEN
  89. length 80
  90. FMT(vwl_fr/r_) addWav(r3/rx, 20)
  91. ENDIF
  92. FMT(vwl_fr/r_)
  93. endphoneme
  94. phoneme l
  95. liquid
  96. lengthmod 7
  97. IF nextPh(isNotVowel) THEN
  98. ChangePhoneme(l/)
  99. ENDIF
  100. NextVowelStarts
  101. VowelStart(l/l@)
  102. VowelStart(l/la, -10)
  103. VowelStart(l/le, -15)
  104. VowelStart(l/li, -15)
  105. VowelStart(l/lo, -10)
  106. VowelStart(l/lu, -20)
  107. EndSwitch
  108. IF prevPh(#@) THEN
  109. VowelEnding(l/xl, -50)
  110. ELIF prevPh(isVowel) THEN
  111. VowelEnding(l/xl, -40)
  112. ENDIF
  113. IF prevPh(isPause) OR thisPh(isWordStart) THEN
  114. VowelEnding(NULL)
  115. FMT(l/_l)
  116. ENDIF
  117. IF prevPh(r/2) THEN
  118. FMT(l/_l)
  119. ENDIF
  120. IF prevPh(t) THEN
  121. FMT(l/tl)
  122. ENDIF
  123. IF prevPh(l/) THEN
  124. FMT(l/l_long) // double l, make it longer
  125. ENDIF
  126. FMT(l/l)
  127. endphoneme
  128. phoneme l/ // used for [l] when not before a vowel
  129. liquid
  130. lengthmod 7
  131. IF nextPh(isVowel) THEN
  132. ChangePhoneme(l)
  133. ENDIF
  134. PrevVowelEndings
  135. VowelEnding(l/l_@)
  136. VowelEnding(l/l_a)
  137. VowelEnding(l/l_e)
  138. VowelEnding(l/l_i)
  139. VowelEnding(l/l_o)
  140. VowelEnding(l/l_u, -20)
  141. EndSwitch
  142. IF prevPh(i) THEN
  143. FMT(l/l_)
  144. ENDIF
  145. FMT(l/_l)
  146. endphoneme
  147. // Vowels
  148. //=======
  149. phoneme @
  150. vowel starttype #@ endtype #@
  151. length 170
  152. FMT(vowel/@_hgh)
  153. endphoneme
  154. phoneme @2
  155. vowel starttype #@ endtype #@
  156. length 160
  157. FMT(vowel/@_fr)
  158. endphoneme
  159. phoneme a
  160. vowel starttype #a endtype #a
  161. length 170
  162. IF prevPh(l) THEN
  163. VowelStart(l/la, -15)
  164. ENDIF
  165. IF prevPhW(u) THEN
  166. length 140
  167. FMT(vowel/a_5)
  168. ENDIF
  169. FMT(vowel/a_6)
  170. endphoneme
  171. phoneme e
  172. vowel starttype #e endtype #e
  173. length 170
  174. IF nextPh(l/) THEN
  175. VowelEnding(l/xl, -20)
  176. ENDIF
  177. IF nextPh(isVowel) THEN
  178. length 200
  179. ENDIF
  180. FMT(vowel/e_8)
  181. endphoneme
  182. phoneme E
  183. vowel starttype #e endtype #e
  184. length 170
  185. FMT(vowel/e_mid)
  186. endphoneme
  187. phoneme E2 // Between e and E
  188. vowel starttype #e endtype #e
  189. length 170
  190. FMT(vowel/e_9)
  191. endphoneme
  192. phoneme i
  193. vowel starttype #i endtype #i
  194. length 160
  195. IfNextVowelAppend(;)
  196. FMT(vowel/i_2)
  197. endphoneme
  198. phoneme i- // shorter
  199. vowel starttype #i endtype #i
  200. length 110
  201. FMT(vowel/i_2)
  202. endphoneme
  203. phoneme i: // longer than i
  204. vowel starttype #i endtype #i
  205. length 240
  206. IfNextVowelAppend(;)
  207. FMT(vowel/i_3)
  208. endphoneme
  209. phoneme o
  210. vowel starttype #o endtype #o
  211. length 170
  212. ChangeIfUnstressed(o2)
  213. IF nextPh(r/2) THEN
  214. VowelEnding(vwl_fr/r_o)
  215. FMT(vowel/o_mid2)
  216. ENDIF
  217. FMT(vowel/o_8)
  218. endphoneme
  219. phoneme o2
  220. vowel starttype #o endtype #o
  221. length 170
  222. IF nextPh(r/2) THEN
  223. VowelEnding(vwl_fr/r_o)
  224. FMT(vowel/o_mid2)
  225. ENDIF
  226. IF nextPh(l/) THEN
  227. VowelEnding(l/l_o)
  228. FMT(vowel/o_mid2)
  229. ENDIF
  230. FMT(vowel/o)
  231. endphoneme
  232. phoneme O
  233. vowel starttype #o endtype #o
  234. length 170
  235. ChangeIfUnstressed(o2)
  236. FMT(vowel/o_mid2)
  237. endphoneme
  238. phoneme O2 // Like O but no reduceto
  239. vowel starttype #o endtype #o
  240. length 170
  241. FMT(vowel/o_mid2)
  242. endphoneme
  243. phoneme o3 // almost like english oU
  244. vowel starttype #@ endtype #u
  245. length 220
  246. FMT(vdiph/@u_3)
  247. endphoneme
  248. phoneme u
  249. vowel starttype #u endtype #u
  250. length 170
  251. IF nextPh(i) THEN
  252. Length 50
  253. ENDIF
  254. IF nextPhW(a) THEN
  255. length 110
  256. ENDIF
  257. FMT(vowel/u_bck2)
  258. endphoneme
  259. phoneme u: // slitely longer than u
  260. vowel starttype #u endtype #u
  261. length 240
  262. FMT(vowel/u_bck2)
  263. endphoneme
  264. phoneme y
  265. vowel starttype #u endtype #u
  266. length 170
  267. IF nextPh(l/) THEN
  268. VowelEnding(l/l_y, -30)
  269. ENDIF
  270. IF prevPh(#r) THEN
  271. VowelStart(vwl_fr/ry)
  272. ENDIF
  273. IF nextPh(r/2) THEN
  274. VowelEnding(vwl_fr/r_y)
  275. ENDIF
  276. IF nextPh(E~) THEN
  277. Length 120
  278. ENDIF
  279. FMT(vowel/y_2)
  280. endphoneme
  281. phoneme Y
  282. vowel starttype #@ endtype #@
  283. length 170
  284. ChangeIfUnstressed(W)
  285. IF prevPh(l) THEN
  286. VowelStart(l/l@, -20)
  287. ENDIF
  288. IF nextPh(l/) THEN
  289. VowelEnding(l/l_@, -20)
  290. ENDIF
  291. FMT(vowel/y#)
  292. endphoneme
  293. phoneme W
  294. vowel starttype #@ endtype #@
  295. length 180
  296. IF prevPh(l) THEN
  297. VowelStart(l/l@, -20)
  298. ENDIF
  299. IF nextPh(l/) THEN
  300. VowelEnding(l/l_@, -20)
  301. ENDIF
  302. FMT(vowel/@)
  303. endphoneme
  304. phoneme w^i
  305. vowel starttype #u endtype #i
  306. length 240
  307. IF prevPh(l) THEN
  308. VowelStart(l/lu, -20)
  309. ENDIF
  310. IF prevPh(#r) THEN
  311. VowelStart(vwl_fr/ry)
  312. ENDIF
  313. FMT(vdiph/yi_fr)
  314. endphoneme
  315. phoneme A~
  316. vowel starttype #a endtype #a
  317. length 190
  318. IF nextPh(r/2) THEN
  319. VowelEnding(vwl_fr/r_an)
  320. ENDIF
  321. IF prevPh(#r) THEN
  322. VowelStart(vwl_fr/raa, -10)
  323. ENDIF
  324. FMT(vnasal/aa_n4)
  325. endphoneme
  326. phoneme E~ // same as W~ for fr-fr
  327. vowel starttype #e endtype #e
  328. length 190
  329. IF nextPh(n2) THEN
  330. FMT(vowel/e_mid)
  331. ENDIF
  332. FMT(vnasal/W_n)
  333. endphoneme
  334. phoneme O~
  335. vowel starttype #o endtype #o
  336. length 190
  337. FMT(vnasal/o_n2)
  338. endphoneme
  339. phoneme W~
  340. vowel starttype #@ endtype #@
  341. length 190
  342. FMT(vnasal/W_n)
  343. endphoneme
  344. // These vowels map to others in fr-fr, but are distinct in fr-ca
  345. phoneme I // same as [i]
  346. import_phoneme fr/i
  347. endphoneme
  348. phoneme U // same as [u]
  349. import_phoneme fr/u
  350. endphoneme
  351. phoneme y" // same as [y]
  352. import_phoneme fr/y
  353. endphoneme
  354. phoneme E: // slightly longer than [E]
  355. import_phoneme E
  356. endphoneme
  357. phoneme A // same as [a]
  358. import_phoneme a
  359. endphoneme
  360. // CONSONANTS
  361. //===========
  362. // uses the consonants in file "phonemes", unless overridden here
  363. phoneme b
  364. vcd blb stop
  365. voicingswitch p
  366. lengthmod 5
  367. Vowelout f1=2 f2=1000 -500 -300 f3=-300 80 brk
  368. IF KlattSynth THEN
  369. CALL base/b
  370. RETURN
  371. ENDIF
  372. IF PreVoicing THEN
  373. FMT(b/xb)
  374. ENDIF
  375. IF nextPh(isPause2) OR nextPh(#l) THEN
  376. FMT(b/b_) addWav(x/b_)
  377. ENDIF
  378. FMT(b/b) addWav(x/b, 70)
  379. endphoneme
  380. phoneme d
  381. vcd alv stop
  382. voicingswitch t
  383. lengthmod 5
  384. Vowelin f1=0 f2=1700 -300 300 f3=-100 80 amp=20
  385. Vowelout f1=0 f2=1700 -300 300 f3=-100 80
  386. IF PreVoicing THEN
  387. FMT(d/xd)
  388. ENDIF
  389. IF nextPh(isPause2) OR nextPh(isPause) THEN
  390. FMT(d/d_) addWav(x/d_, 50)
  391. // ELIF nextPh(#r) THEN
  392. // FMT(d/dr) addWav(x/d, 50)
  393. ELIF prevPh(isPause) THEN
  394. FMT(d/d) addWav(x/d, 50)
  395. ENDIF
  396. FMT(d/d) addWav(x/d, 40)
  397. endphoneme
  398. phoneme g
  399. vcd vel stop
  400. voicingswitch k
  401. lengthmod 5
  402. Vowelin f1=2 f2=2300 200 300 f3=-300 80
  403. Vowelout f1=2 f2=2300 250 300 f3=-300 80 brk
  404. IF PreVoicing THEN
  405. FMT(g/xg)
  406. ENDIF
  407. IF nextPh(isPause2) THEN
  408. FMT(g/g_) addWav(x/g_)
  409. ENDIF
  410. FMT(g/g) addWav(x/g, 20)
  411. endphoneme
  412. phoneme k
  413. vls vel stop
  414. voicingswitch g
  415. lengthmod 2
  416. Vowelin f1=0 f2=2300 200 400 f3=-100 80
  417. Vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
  418. IF nextPh(isPause2) THEN
  419. WAV(ustop/k_)
  420. ELIF nextPh(#r) THEN
  421. length 50
  422. WAV(ustop/kr, 40)
  423. ELIF nextPh(#i) OR nextPh(;) THEN
  424. WAV(ustop/ki, 45)
  425. ELIF nextPh(#l) THEN
  426. WAV(ustop/kl, 45)
  427. ENDIF
  428. WAV(ustop/k, 40)
  429. endphoneme
  430. phoneme n2
  431. vcd alv nasal
  432. IF nextPh(isNotVowel) THEN
  433. ChangePhoneme(NULL)
  434. ENDIF
  435. ChangePhoneme(n)
  436. endphoneme
  437. phoneme p
  438. vls blb stop
  439. voicingswitch b
  440. lengthmod 2
  441. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  442. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  443. IF nextPh(isPause2) THEN
  444. WAV(ustop/p_, 70)
  445. ELIF nextPh(@-) THEN
  446. WAV(ustop/p_unasp, 60)
  447. ELIF nextPh(#l) THEN
  448. WAV(ustop/pl, 30)
  449. ELIF nextPh(#r) THEN
  450. length 50
  451. WAV(ustop/pr, 30)
  452. ENDIF
  453. WAV(ustop/p_unasp_, 90)
  454. endphoneme
  455. phoneme p2 // silent unless followed by vowel
  456. vls blb stop
  457. lengthmod 2
  458. Vowelin f1=0 f2=1000 -50 -100 f3=-200 80 amp=11
  459. Vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=22
  460. IF nextPh(isNotVowel) THEN
  461. ChangePhoneme(NULL)
  462. ENDIF
  463. WAV(ustop/p, 45)
  464. endphoneme
  465. phoneme s
  466. vls alv frc sibilant
  467. voicingswitch z
  468. lengthmod 3
  469. Vowelin f1=0 f2=1700 -300 300 f3=-100 80
  470. Vowelout f1=0 f2=1700 -300 250 f3=-100 80 rms=20
  471. IF nextPh(isPause) THEN
  472. WAV(ufric/s_, 45)
  473. ELIF nextPh(p) OR nextPh(t) OR nextPh(k) THEN
  474. WAV(ufric/s!, 45)
  475. ENDIF
  476. WAV(ufric/s, 45)
  477. endphoneme
  478. phoneme S
  479. vls pla frc sibilant
  480. voicingswitch Z
  481. lengthmod 3
  482. Vowelin f1=0 f2=1900 100 300 f3=-100 80
  483. Vowelout f1=0 f2=1900 100 300 f3=-100 80
  484. IF nextPh(isPause) THEN
  485. WAV(ufric/sh_, 45)
  486. ENDIF
  487. WAV(ufric/sh, 45)
  488. endphoneme
  489. phoneme t
  490. vls alv stop
  491. voicingswitch d
  492. lengthmod 2
  493. Vowelin f1=0 f2=1600 -300 300 f3=-100 80
  494. Vowelout f1=0 f2=1600 -300 250 f3=-100 80 brk
  495. IF nextPh(isPause2) THEN
  496. WAV(ustop/t_, 40)
  497. ELIF nextPh(r/2) THEN
  498. WAV(ustop/t_short, 50)
  499. ENDIF
  500. WAV(ustop/t_short, 40)
  501. endphoneme
  502. phoneme t2 // silent unless followed by vowel
  503. vls alv stop
  504. Vowelin f1=0 f2=1600 -300 300 f3=-100 80
  505. Vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20
  506. lengthmod 2
  507. IF nextPh(isNotVowel) THEN
  508. ChangePhoneme(NULL)
  509. ENDIF
  510. WAV(ustop/t_short, 30)
  511. endphoneme
  512. phoneme t3 // silent unless followed by vowel or pause
  513. vls alv stop
  514. lengthmod 2
  515. IF nextPh(isPause) THEN
  516. ChangePhoneme(t)
  517. ELIF nextPh(isNotVowel) THEN
  518. ChangePhoneme(NULL)
  519. ELSE
  520. ChangePhoneme(t2)
  521. ENDIF
  522. endphoneme
  523. phoneme v
  524. vcd lbd frc
  525. voicingswitch f
  526. lengthmod 6
  527. Vowelin f1=0 f2=1000 -300 -200 f3=-300 100
  528. Vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50
  529. IF KlattSynth THEN
  530. CALL base/v
  531. RETURN
  532. ENDIF
  533. IF nextPh(isPause2) THEN
  534. FMT(voc/v_) addWav(vocw/v)
  535. ENDIF
  536. IF thisPh(isWordStart) AND nextPhW(isLiquid) THEN
  537. Length 70
  538. ENDIF
  539. FMT(voc/v) addWav(vocw/v, 75)
  540. endphoneme
  541. phoneme z
  542. vcd alv frc sibilant
  543. voicingswitch s
  544. lengthmod 6
  545. Vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50
  546. IF nextPh(isPause2) OR nextPh(isPause) THEN
  547. FMT(voc/z_) addWav(ufric/s_, 45)
  548. ENDIF
  549. FMT(voc/z) addWav(ufric/s_, 45)
  550. endphoneme
  551. phoneme z2 // silent unless followed by vowel
  552. vcd alv frc sibilant
  553. IF nextPh(isVowel) THEN
  554. ChangePhoneme(z)
  555. ELSE
  556. ChangePhoneme(NULL)
  557. ENDIF
  558. endphoneme
  559. phoneme z3 // "six" and "dix". [s] before pause, [z] before vowel, else []
  560. vcd alv frc sibilant
  561. IF nextPh(isPause) THEN
  562. ChangePhoneme(s)
  563. ELIF nextPh(isVowel) THEN
  564. ChangePhoneme(z)
  565. ELSE
  566. ChangePhoneme(NULL)
  567. ENDIF
  568. endphoneme