From 6a325e778114a4761205cf14c997e24bf3785556 Mon Sep 17 00:00:00 2001 From: jonsd Date: Mon, 18 Jun 2007 12:12:25 +0000 Subject: [PATCH] [1.26.06] Fixed check for dot in abbreviations, for multibyte characters. Defined a Revision number macro in speak_lib.h for interface changes. Changes to formant rate smoothing so that it's proportional to frequency. Add phoneme translations for mbrola "it3" "it4" Italian voices. Added rule in *_rules files for "word starts with capital letter". git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@49 d46cf337-b52f-0410-862d-fd96e6ae7743 --- dictsource/af_list | 15 ++++---- dictsource/af_rules | 41 ++++++++++++++++---- dictsource/de_list | 25 ++++++++++-- dictsource/de_rules | 57 +++++++++++++++++++++++----- dictsource/dict_phonemes | 19 +++++----- dictsource/en_list | 3 ++ dictsource/en_rules | 7 ++-- dictsource/hu_list | 37 +++++++++++++----- dictsource/hu_rules | 41 +++++++++++++++----- dictsource/it_rules | 4 ++ dictsource/la_rules | 16 +++++--- phsource/compile_report | 14 +++---- phsource/mbrola/it3 | 44 +++++++++++++++++++++ phsource/mbrola/la1 | 35 ++++++++--------- phsource/ph_af | 12 +++++- phsource/ph_hungarian | 2 +- phsource/ph_italian | 27 +++++++++++-- phsource/phonemes | 4 ++ phsource/r/r | Bin 677 -> 677 bytes phsource/vowel/i_en | Bin 6752 -> 6754 bytes src/compiledict.cpp | 3 ++ src/dictionary.cpp | 27 +++++++++---- src/espeakedit.cpp | 25 ++++++++++-- src/extras.cpp | 40 +++++++++---------- src/intonation.cpp | 38 ++++++++++--------- src/main.h | 1 + src/menus.cpp | 2 + src/options.cpp | 3 ++ src/options.h | 3 ++ src/speak_lib.cpp | 3 ++ src/speak_lib.h | 6 +++ src/spect.cpp | 15 ++++++++ src/synth_mbrola.cpp | 4 +- src/synthdata.cpp | 2 +- src/synthesize.cpp | 42 +++++++++++++++++--- src/tr_languages.cpp | 5 ++- src/translate.cpp | 10 ----- src/translate.h | 6 ++- src/voice.h | 2 +- src/voices.cpp | 38 +++++++++++++------ src/wavegen.cpp | 2 +- windows/windows_dll/src/speak_lib.h | 24 +++++++----- 42 files changed, 517 insertions(+), 187 deletions(-) create mode 100644 phsource/mbrola/it3 diff --git a/dictsource/af_list b/dictsource/af_list index c6f66b24..1769bd4f 100755 --- a/dictsource/af_list +++ b/dictsource/af_list @@ -139,6 +139,7 @@ grange x2rA:nsi gustav gustaf jacobus jako@bWs jacques ZA:k +jane _^_EN jean ZA~n jesus ji:sWs joey dZ@Ui @@ -154,6 +155,7 @@ louw l'@U maria mar'ia martin m'A:rt@n michiel $2 +mostert m'Ost@rt natasha n%at'aSa paul p@Ul paulus p@UlWs @@ -233,15 +235,15 @@ omdat $pause sodat $pause voordat $pause nadat $pause -totdat $pause +totdat tOdat $pause as ,as $pause soos $pause -solank $pause +solank s%o@laNk $pause sodra $pause sowel so@v'&l sedert $pause alhoewel alhuv'&l $pause -tensy $pause +tensy $2 $pause aangesien $pause wie $pause wanneer $pause @@ -332,6 +334,7 @@ bv beIf'o@rbe@lt aanbid $2 aanstaande $2 agenda ax2'Enda + aikôna %aik'O:na algehele alx2@h,e@l@ alles al@s alternatiewe $4 @@ -363,11 +366,11 @@ darem dar@m derde d&:rd@ dekade dEk'A:d@ deurgaans $1 -diegene dix2,e@n@ dikwels dIkv@ls diplomasie d@plo@mas'i dusver dWsf&r +eenkeer $1 effense Ef@ns@ ekself %&ks'&lf ekstra $1 @@ -424,7 +427,6 @@ joernalis $3 kafee kaf'e@ kantoor $2 kapitaal kapit'A:l -kollega kul'e@x2a komaan kOmA:n komberse kOmb'&rs@ kombers kOmb'&rs @@ -493,7 +495,6 @@ oorspronklike $2 oranje $2 patriotisme patri|ut'Ism@ -parlement parl@m'Ent penorent pEno@rEnt per pIr persent p@rsEnt @@ -552,7 +553,7 @@ verantwoordelikheid f@rantv'o@rd@l@keIt verdere f&rd@r@ vere fe@r@ vererger f@r&rg@r -ver f&r +ver f'&:r verg f&rx2 vergete f@rx2e@t@ vergewe f@rx2e@v@ diff --git a/dictsource/af_rules b/dictsource/af_rules index a274c405..00ad359d 100755 --- a/dictsource/af_rules +++ b/dictsource/af_rules @@ -22,6 +22,7 @@ agter (dogt %ax2t@r // move default stress: agterdogtig and derivitives &) agtig 'ax2t@x2 // this string almost always carries stress on a a (riA 'A: // akwarium/barium/estuarium/herbarium/seminaria + @C) as (_ as // shorten final a of words ending in -as: rigtingvas/jonkmanskas, etc. C) asie 'A:si a (CAA %a @@ -301,6 +302,7 @@ de (moCr d%E // demokraat/demokrasie/-ë/demokraties/demografie dekade (n dEkad'E dekade (s dEk'A:d@ + dekant (_ d@kant //try fix suidekant _) deli (ka d%El%i // delikaat/delikate @) dend (er d@nd // beduidender/behoudender @@ -598,6 +600,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _mens) e @ //mense at start of compounds _mens) e (k @ //force correct behaviour before k @kom) e (ns_ @ //fix words ending in komens + suid) e @ //suidekant, suidewind etc. @C) e (wa_ @ // goederewa/kolewa/ossewa/troepewa Ab) e (wa @ //bewaking/bewaring in compounds polisiebewaking @C) e (waen @ // plurals and diminutives of some of the above @@ -621,6 +624,8 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar eval (u %iv%al // evaluasie/evalueer/evaluering + werk) e (rs @ //fix werkers in compounds werkershuis etc. + v) e (nno @ //vennoot and friends .group f @@ -658,6 +663,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar ga (lAC x2%a // galant/galery/galon/galop //re-enable following rule to get [g@] at end of words C) ge (_ g@ + gene (_ x2e@n@ // gene/diegene genre Z'A~nr@ //genre and compounds gese (_ x2'e@s@ //Portugese, and others @@ -808,7 +814,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) inge (@P4 'Inx2@ // prefix inge always has stress on 1st slb inge (wing 'Inx2e@ // see rule: _) inge (@P4 @nx2@ @C) inge (_ @N@ - ings INs // begrotingsrede/ontvangslokaal/geringste + ing (s IN // begrotingsrede/ontvangslokaal/geringste _) ing (@ 'Inx2 // ingaan/ingang/ingiet/ingly/ingroei/ingreep... &) ige (_ Ix2@ @C) iger (CA @x2@r // twintiger-/dertiger-/veertigerjare, etc. @@ -959,6 +965,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar klere kl'e@r@ kklere =kl'e@r@ knip (A knIp? // knipogie/geknipoog/ + kollega kul'e@x2a //kollega and compounds ko (kon k%u // fix 1st o sound and move default stress: kokon and compounds kommando k%umandu // move stress, fix o sounds: kommando and compounds ko (pie@ k%u // kopiereg/kopie @@ -1031,12 +1038,15 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar lewe (C le@v@ // belewenis/lewendig/agtergeblewenes libe (ra l@b@ // liberaal/liberale/liberalis/-me ligen l@x2'En + _) li (g lI // fix stress: liggaam/liggies/ligte liggaamlik l@x2A:ml@k // stress liggaamlik/-e/-heid &) lik (_S3 l@k &) like (_S4 l@k@ &) likes (_S5 l@k@s &) liker (_S5 l@k@r &) likste (_S6 l@kst@ + liter (A l@t@r //literatuur and others, but literbottel + linker lINk@r // blinkertjies/many compounds with linker and klinker @) ll (_N _^_EN // Words ending in -ll are English _) losge (@P5 l'Osx2@ @@ -1098,6 +1108,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) melodi (eu ,mEludi //melodieus _) melodie mElud'i _) melo (dr m'Elu //melodrama etc. + _) metel me@t@l // vermetel/-e/-es/-heid... mme (C m@ mme (tjie mi // lemmetjie/stemmetjie and similar ment m'Ent @@ -1175,8 +1186,9 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) na (C_ n'a //three-letter words starting with na na ( n%a_ // naef/naewe/nawiteit nami (bi n%amI // Namibië/Namibiese - na (tal ,na' //natal and compunds + na (tal ,na' //natal and compounds _) n (AA n // for words starting with naa, etc. + namakwa n%amakw%a //namakwa and compounds nasio naSiu _) nag (C n'ax2 _) nag (raad n'A:x2 //nagraads and compounds @@ -1203,6 +1215,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) nage (@P4 n'A:x2@ nasionale naSEun'A:l@ + n (_n //cause one n sound kan nie doen nie etc. &) nele (_ n'e@l@ s) nes (K nEs // onheilsnes/rowersnes nese (_ n'e@s@ //japannese soedannese stres and e sound @@ -1261,6 +1274,8 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar ondjie OINci ontjie OINci ontering %Onte@r@N //ontering in compounds montering etc. + onvoor (s %Onf%o@r //stress: onvoorsiens, onvoorstelbaar etc. + onvoor (w %Onf%o@r //stress: onvoorwaardelik etc. offi (sier %Of@ // move default stress: offisier and compounds ograaf ux2r'A:f // biograaf/demograaf/fotograaf ografie ux2raf'i // biografie/demografie/fotografie @@ -1347,6 +1362,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) onderge (@P7 'On@rx2@ ontevrede Ont@fr'e@d@ + oombliklik o@mbl'Ikl@k // stress: oombliklik/e oorbluf o@rbl'Wf // stress: oorbluf/te oor (blyw %o@r // move default stress: oorblywend/-e @@ -1416,8 +1432,9 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar pa (niek p%a // paniek/paniekerig pantser pants@r // fix e sound in compounds starting with pantser pa (pier p%a // papier and compounds - + parle (ment p%arl@ // move default stress and fix e sound: parlement and compounds, eg. pa (tat p@ // patat/warmpatat/wurgpatat + patie (_ p%at'i //words ending in patie has stress at end + a sound para (C ,para //paralel, paragraaf etc. parade (K p@rA:d@ // parade and compounds par (C@ p%ar // (ge)parkeer/parkeerplek/party(keer/maal...)/parfuum/parmantig @@ -1476,10 +1493,12 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar pro (blA pr%u // probleem/probleme profesie prOf@s'i // fix vowel sounds and move stress pro (CA pr%u // probeer/produk/proses/professie/provinsie + prokie pro@k%i //sprokie and compounds prosa pr'o@sa //prosa and compounds proses (_ prus'Es //proses at end of word projek pruj'Ek + proku (rA pr%Ok%y // prokureur and compounds/prokurasie prominen prOmin'En // prominent/e/prominensie propag ,prOpax2 @@ -1567,13 +1586,14 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar reke (nA re@k@ // rekenaar/sakrekenaar/rekenaarprogram/hoofrekene rekord r'EkOrt o) rene r@n@ // eersgeborene/uitverkorenes - rivier r@f'ir + rivier r@f'i:r re (geer r@ // regeer/geregeer; stress to end reger (A r@x2e@r // regering/regerende resensie r@s'E:nsi resensent r@s@ns'Ent respek r@spEk respek (teer r@sp%Ek // stress to end + _) ri (g rI // stress on 1st slb.: rigting/-loos/-vas, etc. rond (r rOnt // grondreuk/grondrel/rondreis/-rol/-ry rugby r'Wgbi &) rele (_ r'e@l@ @@ -1752,6 +1772,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) ta (mb t%a // tamboer and compounds/tambotie and compounds _) tant (e tA~nt // nasalise taverne t%af&rn@ // fix stress and 1st e sound: taverne and compounds + te (_ t@ //fix ligte, berigte and others te (aa t@ // beroerteaanval/geboorteaanwas/lenteaand... _) tekere t@ke@r@ // move default stress and correct e sounds tele (C t%&l@ // telefoneer/telekommunikasie, etc. @@ -1882,6 +1903,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar u (CA y uu y ui Yy + uiwe Yyv@ //druiwesap and many others uie (C Yy@ // graansuierdiens/kruiersloon/kuiergas/luierbroekie/sluierdoek/suierklep/getuienis uy Yy @@ -1951,6 +1973,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar _) veronge (@P7 f@r'O:Nx2@ verbete f@rb'e@t@ // verbete/verbetenheid verte (l f@rt& // oorvertelling/rondvertel and similar + verter (A f@rte@r // spysvertering and compounds/spysverterende ver (velA f@r // vervelig/verveling (see: _) ver (@P3 f@r vi (cto@ v%i // fix v and i sounds: victoriaans/-e video v'idi;u //video and compounds @@ -1971,6 +1994,7 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar volk (ing fOlk // bevolking: exception to: vo (lC f%O volk (s fOlk // volksliedere/volksbeweging/volksleier and similar vo (lle_ fO // exception to: vo (lC f%O + volle (dig f%Ole@ // fix stress and e sound: (on)volledig/-e/-heid... vo (ller fO // exception to: vo (lC f%O vol (hou_ fOl // exception to: vo (lC f%O vol (maan fOl // exception to: vo (lC f%O @@ -2083,12 +2107,15 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar .group + êre (_ '&&:r@ // hulle always take stress + + ə @ // char.replacement for 'n _C) è (_ E // dè/nè ê e: ê (r &: - ®e 3: + îe 3: ge) ë (rf & // oorgeëf/-de ïgnoreer ix2nur'e@r // geïgnoreer ï (n @ // geïnteresseerd @@ -2103,8 +2130,8 @@ C) ensie (_ @) enswaar (dig @nsv'A:r // noemenswaardige/bejammerenswaar $ dOl@r % p@rs'Ent & _|amp&rsant - £ p@Unt - € Y@ru + £ p@Unt + € Y@ru / stre@p @ beI_: \\ trystre@p diff --git a/dictsource/de_list b/dictsource/de_list index dea4360d..72c09d9a 100644 --- a/dictsource/de_list +++ b/dictsource/de_list @@ -416,6 +416,8 @@ anomalie $2 antik ant'i:k archaik a*k'A:Ik arie $alt +arpeggier a*pEdZ'i:* +arrangier a*aNZ'i:@ arterie $alt asphalt $2 außerdem aUs3de:m @@ -424,6 +426,7 @@ avenue av@n'y: balkan $1 balkon $2 +bandagier bandaZ'i:@ beben be:b@n beere be:*@ bestie bEstI@ @@ -440,17 +443,20 @@ dahlie $alt deshalb $2 dezember $2 diadem di:ad'e:m +direkt $2 +dividend di:vi:d'Ent +dragier d@-*aZ'i:* +dritte d@-*It@ duett du:'Et -direkt $2 -dritte d@-*It@ - -extravagant $1 +ebendaher e:b@ndah'e:r +ebendahin e:b@ndah'In einander aIn'and3 einerlei aIn@*laI einig aInIC $only einige aInIg@ $u+ einiges aInIg@s $u+ +enagier EngaZ'i:* endivie $alt endlich EntlIC episkopal e:pIsko:p'A:l @@ -458,6 +464,7 @@ erde e:*d@ erst e:*st ersten e:*st@n erstmal e:*stma:l +extravagant $1 extrem Ekstr'e:m feuerrot $3 @@ -478,10 +485,14 @@ grazie $alt handy handI heimat haImat +herberg hE*bE*g historie $alt hm h@m hostie $alt +illegitim Ile:gi:t'i:m +illiberal Ili:b@*'A:l +illoyal IlOajA:l immobilie $alt indem Ind'e:m inden Ind'e:n @@ -489,6 +500,9 @@ inder Ind3 indes Ind'Es indessen Ind'Es@n injurie $alt +inka INkA: +inkaisch INkA:IS +inkonstant $1 insbesondere $3 interess Int@*'Es @@ -506,11 +520,13 @@ lakaienhaft l%akaInhaft lappalie $alt lilie $alt linie $alt +logier lo:Z'i:* luetisch lu:'e:tIS machen max@n marginalie $alt materie $alt +menagier me:naZ'i:* menuette mEnu:'Et minut $2 mikrofiche maIk@-*o:fIS @@ -520,6 +536,7 @@ modell mo:d'El mumie $alt nebulos $3 +negligier ne:gli:Z'i:* oberen o:b@*@n oboe o:bo:@ diff --git a/dictsource/de_rules b/dictsource/de_rules index 7069b1ba..e0f3212c 100644 --- a/dictsource/de_rules +++ b/dictsource/de_rules @@ -54,9 +54,12 @@ a (_ A: a (C_ A: + @) a (bl_ 'A: + @) a (bel_ 'A: s) a (g A: @l) a (g A: scl) a (g A: + sor) a (ch A: s) a (m_ A: s) a (mkeit A: a (isier a @@ -71,6 +74,7 @@ n) al (_ 'A:l &kan) al (_ ,A:l &sign) al (_ ,A:l + r) al (_ 'A:l @) an (_ 'A:n ein) an (der 'an @) ant (_ 'ant @@ -194,8 +198,23 @@ design _^_EN dge (_ _^_EN _) dia d,i:a + _) diver d%i:vE* + _) dort (C@P4 d'O*t drive _^_EN _) drug _^_EN + _) durch (@P5 d'U*C + _) durch (b d%U*C + _) durch (f d%U*C + _) durch (kr d%U*C + _) durch (la d%U*C + _) durchque d%U*Ckve: + _) durch (schau d%U*C + _) durch (st d%U*C + _) durch (su d%U*C + _) durch (tre d%U*C + _) durch (w d%U*C + _) durch (wachP5 d'U*C + _) durchweg dUrCve:k .group e @@ -275,12 +294,16 @@ @@) erisch @*IS &) erung (_ =@*UN + _) e (ff %E _) eil (aP3 'aIl _) eil (fP3 'aIl _) ein (@P3 _!'aIn ein (and _|%aIn _) eine (r@ aIn@ _) einig aInIg + _) e (lek %e: + _) elektro (@P7 e:l'Ekt@-*o: + _) elen e:lEn mod) e (l@ E s) e (lig e: _) emp (@P3 _|%Emp @@ -290,10 +313,13 @@ _) ent (@P3 _|%Ent _) enten Ent@n _) ent (er Ent + &) e (nz_ 'E _) epi (@ ,e:pi: _) epi (sk e:pI _) er (@P2 _|%E* _) er (gie E* + &) er (ig_ @* + &) er (igst @* _) er (beK E* _) er (HC E* // lC, mC, nC, rC _) ergeb (nis E*g'e:b @@ -305,6 +331,7 @@ _) entert _^_EN er (dig e:* _) erob (er %E*o:b + @) ett (_ 'Et @) eur (_ 'Y:* euse (_ 'Y:z@ eusen (_ 'Y:z@n @@ -353,6 +380,7 @@ gehen ge:@n _) geh (eX ge: general ge:nE*'al + general (is ge:n@*al _) g (ener g _) g (eo+ g _) ge (orP2 g@ @@ -382,6 +410,9 @@ _) herunter (P8 hE*'Unt3 _) hervor (P6 hE*f'Or _) hier (@ h%i:* + _) hilf (@P4 h'Ilf + _) hilfs (@P5 h'Ilfs + _) hilfe (@P5 h'Ilf@ _) hinab (P5 hIn'ab _) hinan (P5 hIn'an @@ -402,6 +433,7 @@ _) hinter (@ h,Int3 _) hoch (@P4 h'o:x hoch ho:x + homogen h,o:mo:ge:n _) hyper _^_EN @@ -418,6 +450,8 @@ @) i (ng I &CC) i (_ =i: + @) i (bl_ 'i: + @) i (bel_ 'i: ib (t_ i:p @) i (at_ I @@ -449,8 +483,12 @@ polit) ik 'i:k @) ik (el_ 'i:k + _) illeg ,Ile:g + _) i (llu %I + _) i (mag I r) i (na_ 'i: @) ing (_N _^_EN + _) in (k %In _) inter Int@* @) ion (_ j'o:n @) io (n Io: @@ -462,6 +500,7 @@ @) ite (_ 'i:t@ @) ität (_S4 i:t'E:t + &) ium (_ =i:Um @s) i (v_ 'i: @t) i (v_ 'i: @@ -473,6 +512,7 @@ &) ie (ll_ i:,E &) ie (r_ 'i: + u) ie (r_ _|'i: &) ie (rlich 'i: r) ien (@ IEn &) ien (_ =I@n @@ -486,16 +526,10 @@ s) ien (_ 'i:@n t) ien (_ 'i:@n &) iens (_ =I;@ns - &) ient (_ =I;@nt + &) ient (_ I'Ent + &) ienz (_ I'Ents sch) ie (n i: -// @) ieren 'i:*@n @) ie (reX 'i: -// @) iere (_ 'i:*@ -// @) ierer (_ 'i:*3 -// @) ieret (_ 'i:*@t -// @) ierest (_ 'i:*@st -// @) ierst (_ 'i:*st -// @) iert (_ 'i:*t ierungs 'i:*UNs ierung 'i:*UN bakter) ie =I@ @@ -580,7 +614,7 @@ mitt (eC mIt mitt (l mIt _) mo (rb m%O - _) motor mo:to:* + _) motor m%o:to:* _) ms _^_EN musik m%u:zi:k @@ -631,6 +665,8 @@ r) oo (m u: z) oo (m u: &t) or (_ =o:* + &) oren (_ 'o:*@n + st) o (ss o: @@ -675,6 +711,8 @@ _) r @-* _) rh @-* + rangier @-*A:NZ'i:* + .group s _) s (_ Es s s @@ -823,6 +861,7 @@ _) u (rl u: _) u (rv u: us (_ Us + _d) u (sch u: _) user _^_EN ol) u (t_ u: diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index 54a0080c..ff1f076a 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -3,10 +3,11 @@ Phonemes which are used in the *_rules and *_list files Dictionary af_dict -& 3: @ @- @L @U a A: -aI AI aU A~ E e: e@ eI -e~ I i iu O O: o@ OI -oI o~ u uI W y Y@ Yy +& &: 3: @ @- @L @U a +A: aI AI aU A~ E e: e@ +eI e~ I i iu O O: o@ +OI oI o~ u uI W y Y@ +Yy - : ; b c d dZ f g h j k l m n N @@ -46,9 +47,9 @@ E E2 E: e: I i: O o: OI U u: W y y: Y: * : ; b C C2 d D -f g h j k l m n -N p pF r s S t tS -ts v x z Z +dZ f g h j k l m +n N p pF r s S t +tS ts v x z Z Dictionary el_dict @@ -157,8 +158,8 @@ o: u u: y Y y: Y: * : b c C d dZ f g h j J k l m n -N n^ p r R R2 s S -s2 t tS ts v z Z z2 +N n^ p R s S s2 t +tS ts v z Z z2 Dictionary it_dict diff --git a/dictsource/en_list b/dictsource/en_list index 25dc9676..875a7130 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -935,6 +935,7 @@ hatred heItrId hazardous haz3d@s hedgehog hEdZh0g hehe hi:h'i: +heifer hEf@ helium hi:li@m helix hi:lIks hello h@loU @@ -1582,6 +1583,7 @@ scaring ske@rIN scenic si:nIk scald sk0ld sclera skli@r@ +scythe saID seabed si:bEd sealion si:laI@n seance seI0ns @@ -2242,6 +2244,7 @@ Pandora $2 Penelope p@nEl@pI2 Phoebe fi:bi: Rachel reItS@L +Reilly raIlI2 Rica ri:ka2 Robert r0b3t Roderick r0drIk diff --git a/dictsource/en_rules b/dictsource/en_rules index 13291f70..5f5802d9 100644 --- a/dictsource/en_rules +++ b/dictsource/en_rules @@ -4860,10 +4860,11 @@ _C) y aI _C) y (ph aI _C) y (st I - _CC) y aI + XC) y aI _CCC) y aI CC) y (n_ I - Cr) y I2 +// Cr) y I2 + _sC) y aI c) y (cl aI c) y (clic_ aI bic) y (cl I @@ -4872,6 +4873,7 @@ h) y (Cr aI c) y (lin I th) y (l_ aI + fl) y aI gl) y (ph I k) y (l_ aI n) y (l_ aI @@ -4882,7 +4884,6 @@ @C) y (mAn_ I d) y (nas I w) y (n I - cr) y (CC I gl) y (ce I d) yse (n Is@ f) y (_ aI diff --git a/dictsource/hu_list b/dictsource/hu_list index 9fa3a6e3..a09047fa 100644 --- a/dictsource/hu_list +++ b/dictsource/hu_list @@ -15,7 +15,7 @@ _10 ti:z _1X tizEn _20 hu:s _2X huson -_3X hArmints +_3X hARmints _4X nEJvEn _5X YtvEn _6X hAtvAn @@ -53,7 +53,8 @@ ifj ifjAb: $dot mta $abbrev pl pe:lda:ul $dot stb SAtYb:i $dot -ú.n u:JnEvEzEt: +u.n u:JnEvEzEt: $dot +ú.n u:JnEvEzEt: $dot vö v'EZd||_'Yss2E ii kEttY: $abbrev @@ -163,10 +164,32 @@ szor $u szer $u ször $u +ellen $u // against +elé $u // before +óta $u // since + +sok $u // many +kevés $u // few +se $u $pause // neither +sem $u $pause // nor +miatt $u $pause // because + +ban $u +ben $u +hoz $u +hez $u +höz $u +ig $u +nál $u +nél $u +tól $u +től $u + // word pairs -(hogy az) hoJ,Az +(hogy az) h,oJ,Az +(hogy aki) h,oJ,Aki // Verbs @@ -262,9 +285,5 @@ _. pont // Names -Engels ENgEls -Kéthly ke:thli -ricárd RiCARd -richard RiCARd -Szamuelly sAmuElli -Szamuely sAmuElli +ricárd RiCa:Rd +richard RiCa:Rd diff --git a/dictsource/hu_rules b/dictsource/hu_rules index d7b7ac5c..230a55eb 100644 --- a/dictsource/hu_rules +++ b/dictsource/hu_rules @@ -14,14 +14,14 @@ b b bb b: - biz (A b'iz, // TEST + biz (A b'iz, // bizalmas etc. .group c c ts cc ts: cs tS ccs tS: - cz ts + !) cz ts // in names which start with a capital letter anar) ch (i C hierar) ch (i C @@ -31,6 +31,7 @@ hierar) ch (i C pszy) ch C mün) ch (en C maso) ch (istA C + szé) ch tS kilen) c (sz ts kvar) c (sz ts @@ -49,6 +50,8 @@ hierar) ch (i C _szé) ché (ny tSe: _sto) ck (holm k + _) church tSYRtS + .group d d d @@ -139,6 +142,11 @@ _minde) gy (ik J: lly jj lj jj + C) ly (_ li + _kéth) ly li +szamue) lly lli +szamue) ly lli + mi) ll (i l @@ -167,6 +175,9 @@ _minde) gy (ik J: .group o o o + _r) oose (velt u:z + + .group ó ó o: @@ -185,11 +196,11 @@ _minde) gy (ik J: qu kv .group r - r R2 - A) r (A R2 - C) r (A R2 - r (C R2 - rr R2* + r R + A) r (A R + C) r (A R + r (C R + rr RR .group s s S @@ -204,6 +215,10 @@ _munká) s S sz (öld Sz va) s (zabl S|| + _) semmelweiss sEmmElvEjs + engel) s s + + _) saar sAAR .group t @@ -237,6 +252,8 @@ _munká) s S C) tyj c A) tyj (A c: + _ka) ty (n ti + .group u u u @@ -289,9 +306,15 @@ _szára) zs (ág z2S .group - $ dolla:r + $ dolla:R + ä e + æ e + ß s + ç tS + ñ n^ + ø Y - . pont + . pont . (. _: \.) . diff --git a/dictsource/it_rules b/dictsource/it_rules index cbc238b0..b21b92a6 100644 --- a/dictsource/it_rules +++ b/dictsource/it_rules @@ -185,6 +185,10 @@ _) n(_ Enne n n n (g N + n (ge n + n (gé n + n (gè n + n (gi n n (k N .group o diff --git a/dictsource/la_rules b/dictsource/la_rules index 819cdd22..bebba7df 100644 --- a/dictsource/la_rules +++ b/dictsource/la_rules @@ -10,10 +10,12 @@ // used. I and V were used for both the vowels /i/ and /u/, and the semivowels /j/ and // /w/. Here the distinction between U and the V for /u/ and /w/ is assumed, as is the // case in most modern texts. Also long vowels are indicated with macrons. Diaresis is -// used to prevent a diphtong being formed +// used to prevent a diphtong being formed. Y with macron has to be replaced by 'yy', +// since this character is incompatible with older unicode versions. -.L01 ae au eu oe a e i o u y ā ē ī ō ū ë ü é + +.L01 ae au eu oe a e i o u yy y ā ē ī ō ū ë ü é .L02 ng qu pr tr cr chr br dr gr pl cl bl gl ph th ch .group a @@ -41,6 +43,7 @@ .group c c k cc k: + cch k: // e.g. bracchium ch k @@ -75,6 +78,7 @@ g g gg g: g (n N + ggu (A g:w // Does this ever occur? gu (A gw //g @@ -159,6 +163,7 @@ .group p p p pp p: + pph p: ph p @@ -182,6 +187,7 @@ .group t t t tt t: + tth t: //Does this occur? It does at least across word boundaries e.g. leget Thyni th t @@ -195,7 +201,7 @@ u (x+ U // Cases in which 'u' is pronounced as the semi-vowel /w/ A) u (A++ w - _) u (++ w + _) u (A+ w .group ū @@ -214,8 +220,8 @@ .group y - y y - yy y: + y y // Kirshenbaum I. + yy y: // Should be y with macron, which is not present in older Unicode versions .group z diff --git a/phsource/compile_report b/phsource/compile_report index 13134906..3e16ac74 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -8,7 +8,7 @@ en_sc 39 146 en_rp 34 144 en_wm 30 144 - af 37 127 + af 38 128 cy 29 122 de 30 121 eo 13 108 @@ -24,7 +24,7 @@ hr 19 129 sr 2 129 ru 36 124 - it 12 114 + it 15 116 la 21 114 es 6 114 pt 28 131 @@ -126,7 +126,7 @@ 1 l/l_3 de 2 l/la base 2 l/le base - 1 l/L_eL_af af + 2 l/L_eL_af af 2 l/li base 4 l/l_long base fr la ro 2 l/lo base @@ -438,7 +438,7 @@ 1 vowel/aa_7 nl 4 vowel/a_en en fr 1 vowel/@_bck hi - 15 vowel/e base2 en en_n af cy eo fr hu hr it la pt ++ + 16 vowel/e base2 en en_n af cy eo fr hu hr it la pt ++ 2 vowel/e# en_sc 6 vowel/e_2 en_sc de hi sv no 1 vowel/e_3 hu @@ -448,7 +448,7 @@ 8 vowel/ee_1 base2 en en_n pl la sv no zh_yue 3 vowel/ee_2 en cy nl 1 vowel/ee#_2 sv - 3 vowel/ee_3 af pt vi + 4 vowel/ee_3 af pt vi 3 vowel/ee_6 en_n sk sv 13 vowel/e_mid en_rp en_wm fr_ca hi hu sk cs hr it es pt_pt no ++ 10 vowel/e_mid2 af de fi nl sk ro el sw @@ -471,7 +471,7 @@ 2 vowel/ii_4 en_rp 6 vowel/ii_en en en_n 5 vowel/@_low hi ro no - 11 vowel/o base2 en en_wm de fr hi it la pt_pt sv + 12 vowel/o base2 en en_wm de fr hi it la pt_pt sv 4 vowel/o_2 cy hi hu no 2 vowel/o-_2 en_n en_wm 2 vowel/o_3 en_sc @@ -507,7 +507,7 @@ 1 vowel/u_5 sw 3 vowel/u_6 en_rp pt_pt 1 vowel/u_7 vi - 16 vowel/u_bck base2 cy fi fr_ca hi hu nl pl sk hr it pt ++ + 17 vowel/u_bck base2 cy fi fr_ca hi hu nl pl sk hr it pt ++ 2 vowel/uu en en_wm 3 vowel/uu_2 base2 de la 1 vowel/uu_3 af diff --git a/phsource/mbrola/it3 b/phsource/mbrola/it3 new file mode 100644 index 00000000..35b336bf --- /dev/null +++ b/phsource/mbrola/it3 @@ -0,0 +1,44 @@ +// for voices "it3" "it4" + +0 r/ NULL 0 r +0 w/ NULL 0 w +0 l/ NULL 0 l +0 j/ NULL 0 i +0 ; NULL 0 NULL +0 @- NULL 0 NULL +0 * NULL 0 r +0 R NULL 0 r +0 _| NULL 0 _ + + +0 p : 50 p p +0 b : 50 b b +0 t : 50 t t +0 d : 50 d d +0 k : 50 k k +0 g : 50 g g + +1 d z 0 dz +0 n^ NULL 0 J +0 l^ NULL 0 L +0 N NULL 0 ng +0 n f 0 nf +0 w2 NULL 0 w + + +0 aI NULL 60 a1 i +0 aU NULL 60 a1 u +0 oI NULL 60 o1 i + +0 i NULL 0 i1 +0 e NULL 0 e1 +0 e/ NULL 0 e +0 E NULL 0 E1 +0 a NULL 0 a1 +0 a/ NULL 0 a +0 O NULL 0 O1 +0 o NULL 0 o1 +0 o/ NULL 0 o +0 u NULL 0 u1 +0 U NULL 0 u + diff --git a/phsource/mbrola/la1 b/phsource/mbrola/la1 index a151652c..f3b4f2f2 100644 --- a/phsource/mbrola/la1 +++ b/phsource/mbrola/la1 @@ -3,32 +3,33 @@ 0 ; NULL 0 NULL 0 @- NULL 0 NULL 0 * NULL 0 r -1 R * 0 rr +1 R * 0 r: 0 R NULL 0 r 1 p 0 p_h 1 t 0 t_h 1 k 0 k_h -0 p : 0 pp -0 b : 0 bb -0 t : 0 tt -0 d : 0 dd -0 k : 0 kk -0 g : 0 gg +0 p : 0 p: +0 b : 0 b: +0 t : 0 t: +0 d : 0 d: +0 k : 0 k: +0 g : 0 g: -9 f f 0 ff -9 s s 0 ss -9 z z 0 zz -9 m m 0 mm -9 n n 0 nn +9 f f 0 f: +9 s s 0 s: +9 z z 0 z: +9 m m 0 m: +9 n n 0 n: -9 j/ j 0 jj +9 j/ j 0 j: 0 j/ NULL 0 j 0 l/ NULL 0 l -9 l/2 l 0 ll +9 l/2 l 0 l: 0 l/2 NULL 0 l -0 aI NULL 0 ae -0 aU NULL 0 au -0 oI NULL 0 oe +0 aI NULL 0 aE +0 aU NULL 0 aU +0 oI NULL 0 oE +0 EU NULL 60 E U diff --git a/phsource/ph_af b/phsource/ph_af index fba9fa9f..534a67fc 100644 --- a/phsource/ph_af +++ b/phsource/ph_af @@ -64,6 +64,14 @@ phoneme & // more open [E] endphoneme +phoneme &: // more open [E] longer + vowel starttype (e) endtype (e) + length 280 + formants vowel/ee_3 + before l/2 DFT-30+l/L_eL_af +endphoneme + + phoneme @L // syllabic L vowel starttype (@) endtype l length 160 @@ -119,7 +127,7 @@ endphoneme phoneme @U vowel starttype (@) endtype (u) - length 220 + length 170 formants vdiph/Vu endphoneme @@ -205,7 +213,7 @@ endphoneme phoneme O: vowel starttype (o) endtype (o) - length 240 + length 280 formants vowel/oo_1 endphoneme diff --git a/phsource/ph_hungarian b/phsource/ph_hungarian index 2c34380b..42a34491 100644 --- a/phsource/ph_hungarian +++ b/phsource/ph_hungarian @@ -76,7 +76,7 @@ endphoneme phoneme y: vowel starttype (u) endtype (u) - length 220 + length 270 formants vowel/y before r/ vwl_de/r_y+70 endphoneme diff --git a/phsource/ph_italian b/phsource/ph_italian index d7be7903..8b0d562b 100644 --- a/phsource/ph_italian +++ b/phsource/ph_italian @@ -23,14 +23,22 @@ phoneme e vowel starttype (e) endtype (e) length 170 formants vowel/e + reduceto e/ 4 endphoneme +phoneme e/ + vowel starttype (e) endtype (e) + length 170 + formants vowel/e +endphoneme + + phoneme E vowel starttype (e) endtype (e) length 170 formants vowel/e_mid - reduceto e 4 // [E] only in stressed syllables +// reduceto e/ 3 // [E] only in stressed syllables ? endphoneme @@ -46,6 +54,13 @@ phoneme o vowel starttype (o) endtype (o) length 170 formants vowel/o + reduceto o/ 4 +endphoneme + +phoneme o/ + vowel starttype (o) endtype (o) + length 170 + formants vowel/o endphoneme @@ -53,8 +68,7 @@ phoneme O vowel starttype (o) endtype (o) length 170 formants vowel/oo_4 -// formants vowel/0 - reduceto o 4 // [O] only in stressed syllables +// reduceto o/ 3 // [O] only in stressed syllables ? endphoneme @@ -62,6 +76,13 @@ phoneme u vowel starttype (u) endtype (u) length 160 formants vowel/u_bck + reduceto U 4 +endphoneme + +phoneme U + vowel starttype (u) endtype (u) + length 160 + formants vowel/u_bck endphoneme diff --git a/phsource/phonemes b/phsource/phonemes index c7258866..2528161c 100644 --- a/phsource/phonemes +++ b/phsource/phonemes @@ -1233,3 +1233,7 @@ include ph_zh_yue phonemetable sw base include ph_swahili + + +phonemetable f_en base +include pf_english diff --git a/phsource/r/r b/phsource/r/r index 4e34c5a568176b17b9268b1b397e7bb97af6c6a5..e9b567cf5b6144af4bceef105c185d513c5926a5 100644 GIT binary patch delta 112 zcmZ3=x|DT7m<{&_h73jqAlSgd!1aJp2h4V0V_<#2_yEkV;bvfgu;2Yp;QPS@6MrD> aF!>ha>B+H-UW^+iCWuP|6~Z-PQ3wDyv>t~5 delta 126 zcmZ3=x|DT7*yMSPoW?#Z54ayN>M$|@fdg9x+XKc2VD=7f2383B-TwvrKbTK<>-Hp+ diff --git a/phsource/vowel/i_en b/phsource/vowel/i_en index 0e21942b87bb21c9a4e4e751eecf1ea1cb0b2871..d60570d50fdea06d49a4287105ead2c195e8d158 100644 GIT binary patch delta 147 zcmaE0^2kIWIKb68B-k~Og@J(~Gd?wMBi~N}7M2AJ44b(H-!d~huq>GTTSVHsmVtq3 z9uNXmF)%PP@b)k+VFWQPI1PADFg^gYS-3NJA3)h6ybIuL2L1|mn7D(~iOKnbvYYEf X_b~I`U|`_N0BeYIP1x)%Dai-`R|X<& delta 99 zcmaE4^1y^IIKb68B-k~OiGhJ3(`uu@PXQLzd8Q7Vc?I7xGXupY{}qvzwE;37Fg{=e sQVg6xau4GkF#8qT;n!-N=h;U02HDb8~^|S diff --git a/src/compiledict.cpp b/src/compiledict.cpp index 22d88059..94c61790 100755 --- a/src/compiledict.cpp +++ b/src/compiledict.cpp @@ -651,6 +651,9 @@ void copy_rule_string(char *string, int &state) case '#': c = RULE_DEL_FWD; break; + case '!': + c = RULE_CAPITAL; + break; case 'T': c = RULE_ALT1; break; diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 4d561955..1d66f8a3 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -1342,7 +1342,7 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int if(v_stress > 0) *output++ = stress_phonemes[v_stress]; // mark stress of all vowels except 0 (unstressed) - while((ph->reduce_to != 0) && !(dictionary_flags & FLAG_FOUND)) + while((ph->reduce_to != 0) && (((dictionary_flags & FLAG_FOUND)==0) || (langopts.param[LOPT_REDUCE] & 1))) { // this vowel can be reduced to another if the stress is below a specified value int reduce = 0; @@ -1368,8 +1368,9 @@ void Translator::SetWordStress(char *output, unsigned int dictionary_flags, int } if(max_stress == 1) max_stress = 0; - if(unstressed_word && langopts.param[LOPT_KEEP_UNSTR_VOWEL] && (v_stress >= max_stress)) + if(unstressed_word && (langopts.param[LOPT_REDUCE] & 0x2) && (v_stress >= max_stress)) { + // don't reduce the most stressed syllable in an unstressed word reduce = 0; } @@ -2071,6 +2072,13 @@ void Translator::MatchRule(char *word[], const char *group, char *rule, MatchRec failed = 1; break; + case RULE_CAPITAL: + if(word_flags & FLAG_FIRST_UPPER) + match.points += 1; + else + failed = 1; + break; + case '.': // dot in pre- section, match on any dot before this point in the word for(p=pre_ptr; *p != ' '; p--) @@ -2802,23 +2810,28 @@ int Translator::LookupDictList(char *word1, char *ph_out, unsigned int *flags, i int found; char *word2; unsigned char c; + int nbytes; + int c2; char word[N_WORD_BYTES]; length = 0; word2 = word1; - while((word2[1]==' ') && (word2[2]=='.')) + + while((word2[nbytes = utf8_in(&c2,word2,0)]==' ') && (word2[nbytes+1]=='.')) { // look for an abbreviation of the form a.b.c // try removing the spaces between the dots and looking for a match - word[length++] = word2[0]; + memcpy(&word[length],word2,nbytes); + length += nbytes; word[length++] = '.'; - word2 += 4; + word2 += nbytes+3; } if(length > 0) { // found an abbreviation containing dots - word[length] = word2[0]; - word[length+1] = 0; + nbytes = utf8_in(&c2,word2,0); + memcpy(&word[length],word2,nbytes); + word[length+nbytes] = 0; found = LookupDict2(word,word2,ph_out,flags,end_flags); if(found) { diff --git a/src/espeakedit.cpp b/src/espeakedit.cpp index d6eb9d0c..d13e7de4 100755 --- a/src/espeakedit.cpp +++ b/src/espeakedit.cpp @@ -192,6 +192,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxMDIParentFrame) EVT_MENU(MENU_PATH1, MyFrame::OnOptions) EVT_MENU(MENU_PATH2, MyFrame::OnOptions) EVT_MENU(MENU_PATH3, MyFrame::OnOptions) + EVT_MENU(MENU_PATH4, MyFrame::OnOptions) EVT_MENU(MENU_COMPILE_PH, MyFrame::OnTools) EVT_MENU(MENU_COMPILE_DICT, MyFrame::OnTools) EVT_MENU(MENU_COMPILE_MBROLA, MyFrame::OnTools) @@ -356,12 +357,13 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) (void)wxMessageBox(wxString(buf,wxConvLocal), _T("About eSpeak Editor")); } -void MyFrame::OnOptions(wxCommandEvent& event) -{ + +void OnOptions2(int event_id) +{//========================== wxString string; int value; - switch(event.GetId()) + switch(event_id) { case MENU_PARAMS: value = wxGetNumberFromUser(_T(""),_T(""),_T("Speed"),option_speed,80,320); @@ -397,12 +399,29 @@ void MyFrame::OnOptions(wxCommandEvent& event) path_speech = string; } break; + + case MENU_PATH4: + string = wxFileSelector(_T("Voice file to modify formant peaks"),wxFileName(path_speech).GetPath(), + _T(""),_T("WAV"),_T("*"),wxSAVE); + if(!string.IsEmpty()) + { + path_modifiervoice = string; + } + break; } ConfigSetPaths(); } +void MyFrame::OnOptions(wxCommandEvent& event) +{//=========================================== + OnOptions2(event.GetId()); +} + + + + void MyFrame::OnTools(wxCommandEvent& event) {//========================================= int err; diff --git a/src/extras.cpp b/src/extras.cpp index 45c8506f..0fdafaba 100644 --- a/src/extras.cpp +++ b/src/extras.cpp @@ -119,19 +119,9 @@ int TestSynthCallback(short *wav, int numsamples, espeak_EVENT *events) {//==================================================================== int type; -fprintf(f_events,"--\n"); -if(f_wavtest == NULL) return(0); + fprintf(f_events,"--\n"); + if(f_wavtest == NULL) return(0); - if(wav == NULL) - { -fprintf(f_events,"Finished\n"); - CloseWaveFile3(f_wavtest); - f_wavtest = NULL; - fclose(f_events); - return(0); - } - - fwrite(wav,numsamples*2,1,f_wavtest); while((type = events->type) != 0) { fprintf(f_events,"%5d %4d (%2d) %d ",events->audio_position,events->text_position,events->length,type); @@ -145,6 +135,17 @@ fprintf(f_events,"Finished\n"); events++; } + + if(wav == NULL) + { + fprintf(f_events,"Finished\n"); + CloseWaveFile3(f_wavtest); + f_wavtest = NULL; + fclose(f_events); + return(0); + } + + fwrite(wav,numsamples*2,1,f_wavtest); return(0); } @@ -991,6 +992,7 @@ void ConvertToUtf8() fclose(f_in); fclose(f_out); + wxLogStatus(_T("Written to: ")+fname+_T("_1")); } // end of ConvertToItf8 @@ -1163,11 +1165,7 @@ int x; } #endif -char* text1[]= -{ - "Hello World. This is the second sentence", - "Testing" -}; +char* text1 = "Hello World. This is the second sentence"; void TestTest(int control) {//======================= @@ -1183,7 +1181,7 @@ void TestTest(int control) //CharsetToUnicode("ISO-8859-4"); //CharsetToUnicode("ISCII"); -return; +//return; if(control==2) { @@ -1209,20 +1207,18 @@ if(control==2) f_events = fopen("/home/jsd1/speechdata/text/events","w"); fprintf(f_events,"Audio Text Length Type Id\n"); - espeak_Initialize(AUDIO_OUTPUT_RETRIEVAL,0,NULL,1); + espeak_Initialize(AUDIO_OUTPUT_RETRIEVAL,1000,NULL,1); espeak_SetSynthCallback(TestSynthCallback); unsigned int unique_identifier=0; int index=0; - espeak_Synth(text1[index], strlen(text1[index])+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, NULL); + espeak_Synth(text1, strlen(text1)+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, NULL); espeak_SetParameter(espeakPUNCTUATION, 1, 0); espeak_Synchronize(); // espeak_Cancel(); espeak_SetParameter(espeakPUNCTUATION, 1, 0); - index++; - espeak_Synth(text1[index], strlen(text1[index])+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, NULL); } diff --git a/src/intonation.cpp b/src/intonation.cpp index e0526418..6ace9cda 100755 --- a/src/intonation.cpp +++ b/src/intonation.cpp @@ -36,8 +36,6 @@ */ static int tone_pitch_env; /* used to return pitch envelope */ -static int pitch_base = 128; -static int pitch_range = 128; static int vowel_ix; @@ -444,36 +442,40 @@ static int count_increments(int ix, int end_ix, int min_stress) static void set_pitch(int ix, int base, int drop) /***********************************************/ -/* Set the pitch of a vowel in vowel_tab. Base & drop are Hz * 256 */ +// Set the pitch of a vowel in vowel_tab. Base & drop are Hz * 256 { int pitch1, pitch2; int flags = 0; - int pitch_range2; - int pitch_base2; +int x; -/* fprintf(f_log,"base=%3d,drop=%3d ",base>>8,drop>>8); */ + /* adjust experimentally */ + int pitch_range2 = 148; + int pitch_base2 = 72; - /* adjust for experimentally optimal value for default of 128 */ - pitch_range2 = pitch_range + 20; - pitch_base2 = pitch_base - (128-72); +// fprintf(f_log,"base=%3d,drop=%3d ",base>>8,drop>>8); + +// pitch_range2 = pitch_range + 20; +// pitch_base2 = pitch_base - (128-72); if(base < 0) base = 0; pitch2 = ((base * pitch_range2 ) >> 15) + pitch_base2; - if(drop >= 0) + if(drop < 0) { - pitch1 = pitch2 + ((drop * pitch_range2) >> 15); - } - else - { - pitch1 = pitch2 - ((drop * pitch_range2) >> 15); flags = 0x80; + drop = -drop; } -if(pitch1 > 511) pitch1 = 511; -if(pitch2 > 511) pitch2 = 511; -/* fprintf(f_log," %d p1=%3d p2=%3d %x\n",vowel_tab[ix] & 0x3f,pitch1,pitch2,flags); */ + pitch1 = pitch2 + ((drop * pitch_range2) >> 15); +//x = (pitch1 - pitch2) / 4; // TEST +//pitch1 -= x; +//pitch2 += x; + + if(pitch1 > 511) pitch1 = 511; + if(pitch2 > 511) pitch2 = 511; + +// fprintf(f_log," %d p1=%3d p2=%3d %x\n",vowel_tab[ix] & 0x3f,pitch1,pitch2,flags); vowel_tab[ix] = (vowel_tab[ix] & 0x3f) + flags + (pitch1 << 8) + (pitch2 << 17); diff --git a/src/main.h b/src/main.h index 82a075b7..4b9d5640 100755 --- a/src/main.h +++ b/src/main.h @@ -136,6 +136,7 @@ enum { MENU_PATH1, MENU_PATH2, MENU_PATH3, + MENU_PATH4, MENU_PROSODY, MENU_COMPILE_PH, diff --git a/src/menus.cpp b/src/menus.cpp index 5bbea790..820a1527 100755 --- a/src/menus.cpp +++ b/src/menus.cpp @@ -93,6 +93,8 @@ wxMenuBar *MakeMenu(int type) paths_menu->Append(MENU_PATH1, _T("Phoneme data source")); paths_menu->Append(MENU_PATH2, _T("Dictionary data source")); paths_menu->Append(MENU_PATH3, _T("Synthesized sound WAV file")); + speak_menu->AppendSeparator(); + paths_menu->Append(MENU_PATH4, _T("Voice file to modify formant peaks")); option_menu = new wxMenu; option_menu->Append(MENU_PATHS, _T("Set &paths"), paths_menu); diff --git a/src/options.cpp b/src/options.cpp index 99d732ac..f0c11c72 100755 --- a/src/options.cpp +++ b/src/options.cpp @@ -49,6 +49,7 @@ wxString path_voices; wxString path_phsource; wxString path_dictsource; wxString path_speaktext; +wxString path_modifiervoice; wxString path_dir1; int option_speed=160; @@ -167,6 +168,7 @@ void ConfigInit() pConfig->Read(_T("/phsource"),&path_phsource,basedir+_T("/phsource")); pConfig->Read(_T("/dictsource"),&path_dictsource,basedir+_T("/dictsource")); pConfig->Read(_T("/speaktext"),&path_speaktext,wxEmptyString); + pConfig->Read(_T("/modifiervoice"),&path_modifiervoice,basedir); pConfig->Read(_T("/dir1"),&path_dir1,basedir); option_speed = pConfig->Read(_T("/speed"),160); ConfigSetPaths(); @@ -193,6 +195,7 @@ void ConfigSave(int exit) pConfig->Write(_T("/dictsource"),path_dictsource); pConfig->Write(_T("/speaktext"),path_speaktext); pConfig->Write(_T("/speed"),option_speed); + pConfig->Write(_T("/modifiervoice"),path_modifiervoice); pConfig->Write(_T("/dir1"),path_dir1); if(exit) diff --git a/src/options.h b/src/options.h index b6e2f598..dc492546 100755 --- a/src/options.h +++ b/src/options.h @@ -35,6 +35,7 @@ extern wxString path_pitches; extern wxString path_voices; extern wxString path_phsource; extern wxString path_dictsource; +extern wxString path_modifiervoice; extern wxString path_dir1; extern char path_source[80]; @@ -42,6 +43,8 @@ extern char path_dsource[120]; extern int option_speed; +extern void OnOptions2(int event_id); + // not currently used class Options : public wxDialog { public: diff --git a/src/speak_lib.cpp b/src/speak_lib.cpp index 9eb5a5b4..c0323813 100644 --- a/src/speak_lib.cpp +++ b/src/speak_lib.cpp @@ -440,6 +440,9 @@ static espeak_ERROR Synthesize(unsigned int unique_identifier, const void *text, { // don't process the next clause until the previous clause has finished generating speech. // This ensures that