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

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