Add different intonation styles (attribute "intonation" in voices files). git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@114 d46cf337-b52f-0410-862d-fd96e6ae7743master
@@ -134,11 +134,17 @@ kanada kanad%a | |||
kanaän kA:nA:an | |||
kenia ki:nia | |||
kimberley kimb@rli | |||
milaan $2 | |||
knysna neIsna | |||
kongo kONgu | |||
knysna neIsna | |||
lesotho l@sutu | |||
limpopo l@mpo@po@ | |||
macedonië mas@d'o@ni@ | |||
majuba maj'uba | |||
mauritius mOr'iSjWs | |||
milaan $2 | |||
mesopotamië mEsuput'A:mi@ | |||
montagu mOnt@ky | |||
moorreesburg mur'e@sbWrx2 | |||
mosambiek musamb'ik | |||
(thaba nchu) tab'A:||ntSu | |||
europa Y@r'o@pa | |||
@@ -267,15 +273,19 @@ marlene marl'e@:n | |||
marlise marl'i:s | |||
martha marta | |||
martin m'A:rt@n | |||
matthéüs mat'i:Ws | |||
melanie m@lA:ni | |||
meraai m@rAI | |||
messias m@sijas | |||
michelle miS'&l | |||
michiel $2 | |||
miriam mIri@m | |||
mohammed muh'am@t | |||
mostert m'Ost@rt | |||
mouton mut'On | |||
mozart mo@tsart | |||
naomi na_'o@mi | |||
napoleon nap'o@liOn | |||
natasha n%at'aSa | |||
naudé nOd'e@ | |||
neil _^_EN | |||
@@ -478,7 +488,6 @@ bv beIf'o@rbe@lt $dot | |||
// main word list | |||
aandster A:ntst&r | |||
aangaande $2 | |||
aanstaande $2 | |||
adagio ad'A:dZi;%@U | |||
@@ -626,12 +635,11 @@ kulture $2 | |||
kunsmatige kWnsm'A:t@x2@ | |||
kwansuis $2 | |||
latere l'A:t@r@ | |||
lekkerder l&k@rd@r | |||
lekkerste l&k@rst@ | |||
libido l@bidu | |||
macaroni makar'o@ni | |||
madame mad'A:m | |||
malles mal@s | |||
maskering mask'e@r@N $only | |||
meegee me@x2e@ | |||
memoriam mEm'o@riam | |||
@@ -645,13 +653,15 @@ misbruik $2 $verb | |||
misbruikte $2 | |||
miskien $2 | |||
misterie m@ste@ri | |||
monitor mOnitOr | |||
motore mo@t'o@r@ | |||
motor mo@t@r | |||
motortjie mo@t@rki | |||
nadele nA:de@l@ | |||
nadenke $1 | |||
nagana nag'A:na | |||
namens nA:m@ns | |||
nassau nas'@U | |||
nature nat'yr@ | |||
nalatigheid nA:l'A:t@x2eIt | |||
namate $2 | |||
@@ -660,13 +670,17 @@ negering n@x2e@r@N | |||
netjies nE:icis | |||
netjiese nEicis@ | |||
netsowel nEtso@v&l | |||
neurone nY@r'o@n@ | |||
nikswerd nIksv&:rt | |||
nimmermeer $1 | |||
nirvana n@rvA:na | |||
nobelprys $2 | |||
normale nOrm'A:l@ | |||
numeri nWm@ri | |||
oeuvre W:vr@ | |||
omega $2 | |||
omrede $2 | |||
omtrent Omtr'Ent | |||
onbegrip $1 | |||
onderrig On@r'Ix2 $verb |
@@ -81,6 +81,7 @@ | |||
adres %adrEs // fix last e sound of adres as last part of compounds | |||
al (baster %al // move default stress: albaster and compounds | |||
al (bino %al // move default stress: albino | |||
alche (mis %alx2%e@ // move default stress: alchemis and derivitives | |||
aleksand (ry %al%Eks%and // fix stress and a and d sounds: aleksandryn/-e/-s | |||
alex (a %al%Ekz // Alexander/Alexandra/Alexandria | |||
alfabe (tK alfabE // fix stress and e sound: (vinger)alfabet/-te | |||
@@ -237,6 +238,7 @@ | |||
aan (bid %A:n // move default stress: aanbid/-ding | |||
aangee (+ 'A:nx2e@ // see rule: _) aange (@P5 A:nx@ | |||
_) aange (@P5 'A:nx2@ // added stress mark to ensure stress on aan | |||
aandele A:nde@l@_ // fix e sound: aandeleaansoek/-belegging/-beurs/-mark/-oordrag, etc. | |||
aandoenlik %A:ndunl@k // move default stress: aandoenlik and derivitives, vs. aandoen | |||
aand (rok A:nt_ // fix d sound: aandrok/-ke/-kie | |||
aand (rus A:nt_ // fix d sound: aandrus and compounds | |||
@@ -457,6 +459,7 @@ | |||
bedev be@d@f // bedevaart and compounds | |||
beger (A b@x2e@r // begerig/begerend and compounds | |||
bek (f b&k // fix stress and e sound: bekfluitjie/-s/-musiek, etc. | |||
bek (m b&k // fix e sound: geelbekmalmot/langbekmaande/skeerbekmuis | |||
bekk (+ b&k // exception to be (C%+ bE | |||
bek (_ b&k // exception to be (C%+ bE | |||
beken b@kEn // 2nd e sound: oorbekend/welbekende | |||
@@ -571,6 +574,7 @@ | |||
de (press d%i // depressie/depressief/depressiewe | |||
@) derd (_ d@rt // verouderd/afgesonderd/gevorderd | |||
_) der (duiC d%&r // move default stress: derduisende/derduiwel | |||
@C) derm (K d&r@-m // fix e sound of derm in compounds: nersdermklier/slukdermsiekte, etc. | |||
@) dderd (_ d@rt // ontredderd, se rule: dd d | |||
_) derge d&rx2@ // dergelik/-e | |||
desibel dEsib&l // fix vowel sounds: desibel/-s | |||
@@ -634,7 +638,7 @@ | |||
di (ssi d@ // move default stress: dissipel/-s | |||
dissi (pl d@s@ // fix stress: dissipline/-s and compounds | |||
distri (bu d@str@ // distribusie/distribueer and compounds | |||
dis (t d@s // stress: distrik/-te and compounds/distansie/distinksie/distorsie/distraksie | |||
_) dis (t d@s // stress: distrik/-te and compounds/distansie/distinksie/distorsie/distraksie | |||
distel dIst@l // restore default stress: distel and compounds | |||
_) dode d'o@d@ //dodelik dodemars etc. | |||
doel (tref d%ul // move default stress: doeltreffend/-e/-ste | |||
@@ -688,6 +692,9 @@ | |||
hond) e (@ @_ // fix e sound: hondebloed/-oor/-trou, etc. | |||
kod) e (C @ // fix e sound: kodenommer/kodetaal/kodewoord, etc. | |||
Cond) e (CA @ // blondekop/geskondenes/hondebelasting and many compounds/sondebok/sondelas | |||
lop) er (A @r_ // fix e sounds in compounds of loper followed by vowel: loperaanval, etc. | |||
mineral) e (C @ // fix e sound: mineraleregte/-ryk(dom)/-sake, etc. | |||
naald) e (C @ // fix e sound: naaldekoker/-kussing/-werk, etc. | |||
noord) e (C @ // fix e sound: noordewind and compounds | |||
olw) e (C @ // fix e sound: golweslag/wolwedans | |||
blak) e (r @ // fix e sound: blakerend/-e/blakering | |||
@@ -712,6 +719,7 @@ | |||
liefd) e (C @ // fix e in compounds starting with liefde: -blyk/-daad/-diens/-gawe/-groete/-werk, etc. | |||
sp) e (d @ // ekspedisie/gaspedaal/kwispedoor | |||
gev) e (gK & // fix e sound in compounds like buitegevegstelling/skietgevegte | |||
CAC) e (gg & // fix e sound: bylegging/delgingsfondsbelegging/langtermynbelegging | |||
And) e (lC @ // fix e sound: swendelfirma/vaandeldraer and similar | |||
_ad) e (lC @ // fix e sound: adelbors/-trots/-stand, etc. | |||
Cing) e (lA @ // fix e sound: dwingeland/klingeling/kringelend/tingeling | |||
@@ -761,6 +769,7 @@ | |||
e (CA e@ | |||
CCan) e (CA @ // swanepoel/swanesang/tranedal | |||
XCier) e (@ @ // dieresorg/-lewe..., many compounds/PIEREWAAI/-ER | |||
mier) eter _e@t@r // fix e sound and short pause: (rys)miereter/-s | |||
kund) e (@ @ // fix e sound in many compounds of kunde | |||
luuks) e @ // luukses/luukse and compounds | |||
midd) e (@ @ // compounds starting with midde: middedorp/middeooste/middestad/middeweg | |||
@@ -776,6 +785,7 @@ | |||
e (kono@ %E // 1st e: ekonome/ekonomie/ekonomies/ekonoom | |||
eksege (CA %Eks@x2e@ // fix stress and e sounds: eksegese/eksegeties/-e | |||
_) ekster (K Ekst@r // restore default stress: ekster/-s and compounds | |||
ekstre (mis %Ekstr@ // move default stress: ekstremis/-te/-ties | |||
e (mosi %i // emosie/emosioneel, etc. | |||
eun) e (r@ @ // fix e sound: ondersteunerskorps/sigeunermusiek/sigeuneragtig and similar | |||
eun) eri (n @r'I // fix stress and e sound: sigeunerin/-ne/-netjie | |||
@@ -801,7 +811,7 @@ | |||
ks) eer 'e@r // annekseer/indekseer/lakseer/takseer and their compounds | |||
ss) eer 'e@r // but many words cont. sseer take stress: adresseer, etc. | |||
Cv) eer e@r // stress: (hoender/volstruisveer/dryfveer | |||
pouv) eer e@r // restore default stress: pouveer | |||
ouv) eer e@r // restore default stress: pouveer/makouveer | |||
w) eer e@r // stress may vary in words containing weer: lugafweer/donderweer | |||
u) eer 'e@r // aktueer/konstrueer/salueer, etc. | |||
effek %e@fEk // move default stress and fix e sound: effek/-te/-tief | |||
@@ -940,6 +950,7 @@ | |||
&) e (r_ @ | |||
&) ers (_ @rs | |||
gp) ers (_ &rs // fix e sound: ligpers/lugpers | |||
kp) ers (_ &rs // fix e sound: boek-/broek-/drukpers, etc. | |||
np) ers (_ &rs // fix e sound: inpers/lemoenpers/lusernpers/wynpers | |||
rp) ers (_ &rs // fix e sound: inmekaarpers/kopieerpers/silinderpers/Voortrekkerpers | |||
@@ -972,7 +983,7 @@ | |||
_) een (voud@ %e@n // stress on 2nd slb: eenvoudig, but on 1st: eenvoud | |||
eerbied (A e@rb'id // eerbiedig/ing | |||
eerbiedw %e@rb%itv // eerbiedwaardig/eerbiedwekkend | |||
eerw %e@rv // stress: eerwaarde | |||
_) eerw %e@rv // stress: eerwaarde | |||
entjie EiNci | |||
&k) entjie iNci // fix -entjie sound: bakentjie/dekentjie/kuikentjielakentjie/tekentjie, etc. | |||
edjie 'E:ici | |||
@@ -988,7 +999,7 @@ | |||
&K) erige @rIx2@ | |||
AA) erige @rIx2@ | |||
Ai) er (A @r // bakleierig/draaiery/mooierige | |||
XCAC) es (_ @s // bates/bodes/dowes/gades/(op/uit)gawes/kodes/skewes/skones/skrywes/tipes... | |||
XAC) es (_ @s // bates/bodes/dowes/gades/(op/uit)gawes/kodes/skewes/skones/skrywes/tipes... | |||
XCAAC) es (_ @s // fix e sound: bloutes/floutes/noutes | |||
XCAAAd) es (_ @s // fix e sound: genooides/gesaaides, etc. | |||
&Cd) es (_ @s // fix e: aangekeerdes/aangeklaagdes/afdraandes/bewaardes/bediendes/bedroefdes/blindes... | |||
@@ -1188,6 +1199,7 @@ | |||
A) goog (_ x2'o@x2 // demagoog/pedagoog | |||
gor (dyn x2%Or // move default stress: gordyn and compounds | |||
A) goë x2'u@ // demagoë/pedagoë | |||
gra (fiek x2r%a // fix stress and a sound: grafiek/-e /lyngrafiek, etc. | |||
gra (fiet x2r%a // fix stress and a sound: grafiet and compounds | |||
grama (doe x2r%am%a // move default stress: gramadoela/-s and compounds | |||
gramma (tik x2r%ama // fix stress and 2nd a sound: grammatika and compounds | |||
@@ -1248,7 +1260,7 @@ | |||
@) gewende (_ x2'e@v@nd@ | |||
@) gewend (_ x2'e@v@nt // insiggewend/deurslaggewend/liggewend | |||
gewel (d x2@v&l //geweld/ig/gewelddadig | |||
gewel (f x2@v'&l //gewelf/boog | |||
gewel (f x2@v&l //gewelf/boog | |||
gewel (w x2@v'&l //gewelwe | |||
gewel x2e@v@l //gewel/huis/muur etc. | |||
@@ -1512,6 +1524,7 @@ | |||
fn) is (A @s_ // fix i sound: begrafnisete/-ondernemer/-onkoste | |||
AC) is (_ 'Is // aktivis/humanis/kommunis/pianis/solis/violis/kompromis | |||
AAm) is (_ @s // restore default stress: dassiemis/Karoomis/koeimis/seemis | |||
@Cem) is (_ Is // default stress: dodemis/duiwemis/hondemis/môremis/perdemis, etc. | |||
bloem) is 'Is // but: bloemis/-te | |||
narC) i (ssus 'I // move default stress: Nar(c/s)issus | |||
pub) is (_ @s // restore defaultstress: pubis, excep. to: AC) is (_ | |||
@@ -1525,7 +1538,6 @@ | |||
@C) isties 'Istis // kommunisties/liberalisties/humanisties | |||
@) iseer is'e@r // analiseer/kategoriseer | |||
@) iseren (d is'e@r@n // analiserend/kategoriserend | |||
@f) iek (_ 'ik // manjefiek/compounds | |||
@n) iek (_ 'ik // uniek/compounds | |||
@n) iek (e_ 'ik // unieke/compounds | |||
@kn) iek (_ ik // but piekniek | |||
@@ -1546,7 +1558,7 @@ | |||
C) isk (e_ 'Isk // asteriske/tamariske | |||
_) islam islam // fix i sound: Islam/Islamiseer/Islamisme | |||
C) ispel Isp@l // lispeling/kwispeling/kwispelstert | |||
@) isme (_ 'Ism@ // isme always takes stress | |||
@) isme (K 'Ism@ // isme always takes stress | |||
w) it (A It // fix i sound: eiwitafskeiding/witagtig/kwiteer/grondserwituut | |||
itali (a %it%al%i // move default stress: Italianer/-s and compounds | |||
item itEm // fix e sound in item and compounds | |||
@@ -1852,7 +1864,8 @@ | |||
laf (aar laf // restore default stress: lafaard/-s and compounds | |||
lagune l%ax2yn@ // move default stress: lagune and compounds | |||
_) la (kon l%a // lakoniek/lakonies/lakonisme | |||
lamfer lamf@r // fix e sound: lamferdoek/-vlae, etc. | |||
lamfer lA~mf@r // fix e sound: lamferdoek/-vlae, etc. (variant) | |||
lanfer lA~mf@r // fix e sound: lanferdoek/-vlae, etc. | |||
lam (len l%am // move default stress: lamlendeling/lamlendig/-e/-heid | |||
lande (ry l%and@ // move default stress: landerye/compounds of landery- | |||
_) lang (d l%aN // langdradig/langdurig and their derivitivs | |||
@@ -1861,6 +1874,7 @@ | |||
lank (moe l%aNk // move default stress: lankmoedig/-e/-heid | |||
_) lapel l%ap'&l //lapelwapen etc. | |||
lapel (_ l%ap'&l //baadjielapel etc. | |||
la (tent l%a // fix stress and a sound: latent/-e | |||
laventel l%afEnt@l // fix stress and vowel sounds: laventel and compounds | |||
&) lede (_S4 le@d@ | |||
@@ -1879,41 +1893,49 @@ | |||
@l) le (sC@ l@ // fix e sound: getallestelsel/gevallestudie/novelleskrywer | |||
leuen (tjie lY@iN // leuentjie/witleuentjie | |||
_) lev (i l@f // Levitikus/Leviet | |||
levi (atan l%e@v%i // fix stress and vowel and v sounds: leviatan(sgeslag) | |||
lewe (K le@v@ // belewenis/lewendig/agtergeblewenes/hotellewe/skoollewe/stillewe | |||
libe (rA l@b@ // liberaal/liberale/liberalis/-me/(ge)libereer | |||
_) libe (ri@ l@be@ // fix stress and vowel sounds: Liberië/Liberies/-e | |||
liefdes lifd@s // liefdesbrief/daad/geskiedenis/verhouding... | |||
lief (tall l%if // move default stress: lieftallig/-e/-heid | |||
ligen l@x2'En | |||
_) li (g lI // fix stress: liggaam/liggies/ligte | |||
li (ga_ li // fix i sound: liga/vroueliga, etc. | |||
_) li (gaC li // vix i sound: compounds starting with liga/ligatuur | |||
liggaamlik l@x2A:ml@k // stress liggaamlik/-e/-heid | |||
lig (hoofd l@x2 // move default stress: lighoofdig/-e/-heid | |||
&) lik (_S3 l@k | |||
&) like (_S4 l@k@ | |||
&) likes (_S5 l@k@s | |||
&) liker (_S5 l@k@r | |||
likke (wa l@k@ // move default stress: likkewaan/likkewane | |||
&) likste (_S6 l@kst@ | |||
liter (A l@t@r //literatuur and others, but literbottel | |||
litera (t l@t@r%a // literatuur/literature/literatore, but literbottel | |||
_) li (mi l@ // fix stress and 1st i sound: limiet/-e/limitasie/limiteer | |||
lingu (i l%iNgw // linguiste/linguistiek/linguisties | |||
linker lINk@r // blinkertjies/many compounds with linker and klinker | |||
lino (leum l@no@ // fix stress and i sound: linoleum and compounds, e.g. linoleumvloere | |||
li (riek l@ // fix stress and i sound: liriek/-e | |||
@) ll (_N _^_EN // Words ending in -ll are English | |||
lobola l%ObO:la // fix stress and vowel sounds: lobola and compounds | |||
lo (kalA l%u // fix stress and o sound: lokale/ontvangslokale, etc. | |||
lom (bardie l%Om // move default stress: Lombardies/-e | |||
_) losge (@P5 l'Osx2@ | |||
_) losies l%us'is //losies at start always means "to stay" | |||
&) lm (K l@-m | |||
liefdes lifd@s // liefdesbrief/daad/geskiedenis/verhouding... | |||
lisensie l@s'E:nsi | |||
lering (_ l'e@r@N //isolering distilering correct @ to e@ and force stress | |||
lokomo ,lukumu' //lokomotief and friends | |||
losbandi (g l%Osband@ // fix stress and d sound: losbandig/-e/-er | |||
lou (rier l%@U // move default stress: lourier/-krans, etc. | |||
lug (A lWx2? // lugaanval/lugafweer/lugopname | |||
luid (rugt l%Yyd // move default stress: luidrugtig/-e/-heid | |||
luite (nant l%Yyt@ // fix e sound and move default stress: luitenant and compounds | |||
luk (salig l%Wk // move default stress: geluksalig/-e/-heid | |||
lu (kwart ly // fix u sound: lukwart and compounds | |||
lu (mier l%W // fix stress and u sound: lumier and compounds | |||
lupine l%upin@ // fix u sound: lupine/-veld and similar | |||
lusern l%us&:r@n // fix stress and vowel sounds: lusern and many compounds | |||
@) lusti (g l'Wst@ // move default stress: strydlustig/lewenslustig and many similar | |||
lyk (nam l%eIk // move default stress: gelyknamig/-e | |||
@@ -1927,12 +1949,15 @@ | |||
maga (syn m%ax2%a // magasyn and many compounds | |||
magi (stra m%ax2%i // magistraat and many compounds | |||
mag (nA@ m%ax2 // move default stress: magneet/magnete/magneties | |||
ma (ho m%a // mahoniehout/-lessenaar and similar | |||
ma (hA m%a // mahoniehout/-lessenaar and similar/mahala | |||
majesteitli m%A:j@steItl@ // move default stress: majesteitlik/-e/-heid | |||
makaber m%akA:b@r // fix stress and vowel sounds: makaber/-e/-heid | |||
@) makie (sie mak'i // fix a sound and stress: bol(le)makiesie/-slanery | |||
@) makranka makr'anka // fix stress and vowel sounds: koek(e)makranka/-s | |||
ma (kriel m%a // move default stress: makriel/-e | |||
&) mal (_S3 mal | |||
malaria mal'A:ria; | |||
mal (gas m%al // move default stress: Malgas/-se/-sies | |||
_) malte (sA m%alte@ // move default stress and fix e sound: maltese/maltesies | |||
man (da m%an //mandaat and compounds | |||
mane (l m%an& // fix stress and e sound: (kerk)manel(le)punte, etc. | |||
@@ -1941,7 +1966,9 @@ | |||
manier m@ni:r //manier and compounds | |||
manifes manifEs // fix vowel sounds: manifes and compounds/manifestasie/manifesteer | |||
manipu m%an%ip%y // fix stress and a sound: manipuleer/manipulering/manipulasie | |||
manji (fie m%anj@ // fix stress and i sound: manjifiek/-e | |||
man (moe m%an // move default stress: manmoedig/-e/-heid | |||
manne (kyn m%an@ // move default stress: mannekyn/-e and compounds | |||
manu (sk ,many | |||
_) ma (rA m%a // short, unstressed a: Marietjie/Marina/Marinda/Marita/Maree/marog | |||
marine m%arin@ // marine and compounds | |||
@@ -1954,12 +1981,14 @@ | |||
masjien m@Sin // masjien and many compounds | |||
maskara m%askA:r%a // move default stress: maskara and compounds | |||
masker mask@r // fix e sound: maskerafdruk/-agtig/ontmaskering | |||
masker (ade m%ask@r // move default stress: maskerade/-s | |||
maso (chis m%as%u // fix vowel sounds: masochis/-te/-ties/-e/-isme | |||
materi (A@ m%at%e@r%i // materiaal/materiale/materiële/materieel | |||
materie (+ m%ate@r%i // stress and vowel sounds: materie and many compounds | |||
ma (tesis m%a // fix stress and 1st a sound: matesis and compounds | |||
maties m'A:tis //tamaties, outomaties etc. | |||
ma (tr m%a // matriek and many compounds with matriek/MATRAS/MATROOS/MATROSE | |||
ma (tr m%a // matriek and many compounds with matriek/matras/matroos/matrose | |||
ma (trikK mA: // lengthen a sound: matriks/-e | |||
@) matig m'A:t@x2 // doelmatig/gelykmatig/regmatig; matig takes stress in compounds | |||
// mc _^_EN //the mac names does not work | |||
@@ -1969,15 +1998,17 @@ | |||
middel mId@l // middellyf/middelpunt/middelste/bemiddelend | |||
middel (jari m@d@l // move default stress: middeljarig and derivitives | |||
milit m@l@t // militêr/militaris | |||
mil (joen m@l // move default stress: miljoen/-e | |||
mil (jA m@l // move default stress: miljoen/-e/miljard/-e | |||
mille (nniA m@lE // millennium/millennia | |||
mi (miek m@ // fix stress and i sound: mimiek and compounds | |||
minag m'Inax2 // minag/geminag/minagting/minagtend | |||
minder (jar m@n@r // move default stress: minderjarig and derivitives | |||
miner (A m@n@r // mineraal and many compounds | |||
mi (neur m%i // move default stress: mineur and compounds | |||
mikr (o mikr | |||
ministers m@n'Ist@rs | |||
mi (rakel m@ // fix stress and i sound: mirakel/-s/-spel | |||
mirakel m@rA:k@l // fix stress and e and i sounds: mirakel/-s/-spel/-land | |||
miraku (leus m%ir%ak%y // fix stress and vowel sounds: mirakuleus/-e | |||
mise (ra m@s // fix stress and drop e: miserabel/-e/-s/-ste | |||
mis (gis m@s // stress on 2nd slb | |||
mis (gun m@s // stress on 2nd slb | |||
@@ -1991,11 +2022,12 @@ | |||
mis (o mIs // misoes/misopvatting | |||
mis (plaas m@s // stress on 2nd slb | |||
mis (rabel m@s // stress on 2nd slb | |||
mis (reken m@s // stress on 2nd slb | |||
mis (reken m@s // stress on 2nd slb: misreken/-ing | |||
mister (ieus m@ste@r // stress at end | |||
mis (tiek m@s | |||
mis (troos m@s // mistroostig | |||
mis (vorm m@s // stress on 2nd slb | |||
mo (biel mo@' // move default stress: (im)mobiel/-e | |||
_) mode m''o@d@ // fix e sound: modeontwerper/-maker, etc. | |||
modee m@d'e@ //akkommodeer | |||
mode (l m%o@d& // fix stress and e sound: model/-le and compounds | |||
@@ -2011,15 +2043,26 @@ | |||
mo (narg m%o@ // move default stress: monarg/monargies | |||
monargie (_N m%o@n%arx2i // move stress to end: monargie | |||
monder (A m%Onde@r // move default stress and lengthen 1st e sound | |||
_) mon (go@ m%ON // fix stress and split -ng-: mongool/-tjie/-kind/Mongole, etc. | |||
monitor (K mOnitOr // fix o sound: monitor/-skerm, etc. | |||
monnike mOn@k@ // fix i and e sounds: monnikedom/-klooster/-koor/-werk and many similar | |||
mon (teur m%On // move default stress: monteur/-s and compounds | |||
monu (ment m%On%y // monument/e/vrouemonument/monumenteel | |||
mo (pani m%u // fix stress and o sound: mopani/-boom/-hout/-wurm/mopanies | |||
_) mor (C@ m%Or // move default stress: morbied/morfien/mortier | |||
mor (fose m%Or // fix stress: morfose/metamorfose/-s | |||
_) morr (i mOr // restore default stress: morrig/morrie/-doring | |||
_) mors (@ mOrs // restore default stress: morsaf/morsdood/morsig | |||
mosa (ïek m%o@s%a // move default stress: mosaïek and compounds | |||
mo (skee m%O // move default stress: moskee/-s and compounds | |||
motor mo@t@r // motorfiets/motorkar/vragmotor | |||
@) mpel (A mp@l // bewimpeling/dompelaar/strompeling | |||
murmel mWrm@l // fix e sound in compounds like murmelgeluid | |||
museum m%ysY@m // move default stress | |||
musiek m%Wsik | |||
musi (C mysi' // musikant/musikus/musici | |||
muskadel m%Wsk%ad&l // fix stress and a and e sounds: muskadel/-druif/-wyn, etc. | |||
muskel (jaat m%Wsk@l // move default stress: muskeljaat/-kat and compounds | |||
muske (tier m%Wsk@ // move default stress: musketier/-s | |||
mymer meIm@r // fix e sound: mymerend/mymering/mymeraar | |||
môre (@ mO:r@ // HAT: all compounds starting with môre- take stress on 1st slb. | |||
@@ -2037,6 +2080,7 @@ | |||
_) me (duC m@ // fix stress and e sound: medulla/medusa | |||
mee (doë m%e@ // move default stress | |||
meerder (jar m%e@rd@r // move default stress: meerderjarig/-e/-es/-verklaring | |||
meer (voudig m%e@r // move default stress: meervoudig/-e/-lik | |||
mee (war m%e@ // move default stress: meewarig/-e/-heid | |||
medisyne m@d@seIn@ //medisyne and compounds | |||
meganies m@x2'A:nis | |||
@@ -2059,13 +2103,14 @@ | |||
mekaar m@k'A:r | |||
mekaarge m@k'A:rx2@ | |||
_) melodies m@l'o@dis //melodies and compounds | |||
_) melodi (eu ,mEludi //melodieus | |||
_) melodi (eu m%El%ud%i //melodieus | |||
_) melodie mElud'i | |||
_) melo (dr m'Elu //melodrama etc. | |||
_) metel me@t@l // vermetel/-e/-es/-heid... | |||
ment m'Ent | |||
mental (iteit m,Ental // fix stress: mentaliteit/sentimentaliteit and compounds | |||
mentjie m'EiNci // monumentjie/dokumentjies | |||
merino m@rin%u // fix stress and vowel sounds: merino/-skaap/-ram, etc. | |||
AAs) mes (_ mEs // fix last e sound in compounds like kombuismes | |||
Cs) mes (_ mEs // fix last e sound in compounds like slagtersmes | |||
metaal m@tA:l | |||
@@ -2078,6 +2123,7 @@ | |||
me (tod m@ // metodies/metodiek | |||
metodis mEtud'Is // metodis/ties/e/metodisme | |||
me (trum me@ // fix e sound: metrum and compounds | |||
mevrou m@fr'@U | |||
@@ -2125,23 +2171,32 @@ | |||
_) na (skeer n''A: // restore default stress: naskeermiddel/-room | |||
_) na (speur n%A: // fix stress and a sound: (on)naspeurbaar/-lik/-e | |||
_) na (tC na // many compounds beginning with nat | |||
na (trium nA: // lengthen a sound: natrium and compounds | |||
na (trosK nA: // lengthen a sound: natros/-se/-sies | |||
na (tuur n%a // natuur and compounds and derivitives | |||
navig n%av%ix2 //navigasie, navigeer etc. | |||
na (vrant n%a // fix stress and a sound: navrant/-e | |||
&) na (we nA:% // fix a sound in compounds with naweek/naweke: langnaweek/paasnaweek, etc. | |||
@) na (_ na // shorten final na, except for: | |||
r) na (_ nA: // daarna/hierna/waarna | |||
nadruklik nA:dr'Wkl@k // nadruklik/e | |||
na (ï n%a? // naïef/naïewe/naïwiteit | |||
nares (_ n%ar'Es //eienares, minnares, moordenares etc. | |||
na (ywerig n%A:_ // move default stress: naywerig/-e/-heid | |||
nazi nA:tsi // Nazi and compounds | |||
ne (anderCa n%i // move default stress: Neander(d/t)al/-ler | |||
neger (in n%e@x2@r // move default stress: negerin/-ne | |||
ne (gosie n@ // fix stress and e sound: negosie/-ware, etc. | |||
nekta (rien n%Ekt%a // fix stress and a sound: nektarien/-perske, etc. | |||
neo (li n%i%u // fix stress and vowel sounds: neolities/-e/neolitikum | |||
ner (veu n%&r // move default stress: nerveus/-e | |||
@C) nes (_ nEs // fix final e sound: doringnes/aasvoëlnes/kalkoennes/hamerkopnes/reiernes/kiewietnes | |||
_) net (o nEt_ // fix o sound: netonderrok/-klere | |||
neute nY@t@ // fix connecting e sound: neutedop/neutekraker | |||
neu (tr n%Y@ // move default stress: neutraal/neutrale | |||
_) nguni Ngu:ni // Nguni/-beeste/-tale | |||
ni (ggie nI // niggie/-tjie/-s/kleinniggie... | |||
&) ning (_S4 n@N | |||
niko (tien n%ik%u // fix stress and o sound: nikotien and compounds | |||
nning n@N // prevent nn in words like orwinning, see: &) ning (_S4 n@N | |||
_) nage (@P4 n'A:x2@ | |||
@@ -2165,6 +2220,7 @@ | |||
normaal nOrm'A:l // normaal/normaalweg/abnormaal | |||
nostal (gie_N n%Ost%al // stress on last slb.: nostalgie | |||
no (stalgie n%O // stress on 2nd slb.: nostalgies | |||
note (b no@t@ // fix e sound: notebalk/-e/-bank/-beurs | |||
no (velle n%u // move default stress and fix o sound | |||
november no@f'Emb@r // fix 1st e sound and stress: November and compounds | |||
ntere (ss nt;r@' // interessant/interesseer/geïnteresseerd | |||
@@ -2176,6 +2232,7 @@ | |||
nuwer (wet n%yv@r // move default stress: nuwerwets/-e | |||
@Cer) ny (_ n'eI // move default stress: lekkerny/raserny/slawerny | |||
@Cer) ny (e n'eI // move default stress: gekkernye/lekkernye/sotternye | |||
nylon nAIlOn // fix y sound: nylon and compounds: nylonkouse, etc. | |||
.group o | |||
@@ -2187,21 +2244,31 @@ | |||
o (C O | |||
o (CA o@ | |||
mikr) o u // mikrogolf/mikroskakelaar/mikrorekenaar | |||
oase %u_A:s@ // oase/-s and compounds | |||
o (terap u // psigo-/fisioterapeut | |||
_) ob (s %Op // obskuur/obskure/obskuriteit/obsessie/obseen | |||
C) o (dium o@ // fix stress and o sound: jodium/podium/rodium and their compounds | |||
oefen uf@n// oefenbroekie/oefeningboek/liggaamsoefeninge | |||
_) oewer uv@r // fix e sound: oewerbewoner/-boer/-eienaar/-reg, etc. | |||
C) ogig _o@x2@x2 // bruinogig/grootogig/skuinsogig | |||
C) oetel ut@l // troeteldier/-naam/vertroeteling/vroetelend/boeteling | |||
_) o (marm %O //omarm and compounds | |||
odiek ud'ik // periodiek/metodiek | |||
oggend (@ Ox2@nt_ // fix d sound: oggenduur/-reën, etc. | |||
oggende (_ Ox2@nd@ // but: oggende and compounds ending in -oggende | |||
_) oker o@k@r // fix e sound in compounds: okergeel/-kleur, etc. | |||
okker (neut %Ok@r // move default stress: okkerneut and compounds | |||
_) ok (tA %Ok // move default stress: Oktober and compounds: Oktobermaand, etc./oktaaf/oktawe | |||
ole (ander %o@l%i // fix stress and e sound: oleander and compounds | |||
C) o (lia o@ // fix o sound: Goliat/magnolia | |||
oliek (_ ul'ik // koliek/mankoliek/simboliek | |||
oliek (e_ ul'ik // mankolieke/katolieke | |||
oliekig ul'ik@x2 // mankoliekig/-e/-heid | |||
o (lien %u // fix stress and o sound: olien/-hout, etc. | |||
o (lim %o@ // move default stress: olimpies/-e | |||
o (lyC %o@ // move default stress: olyf and compounds/olywe | |||
olym (p %o@lIm // fix stress and y sound: Olympia/Olympus | |||
orang )(oet %ur%aN_ // fix stress and o sound: orangoetang and compounds | |||
oranje %o@ranj@ // fix stress and e sound in compounds: oranjeagtig/oranjekleur | |||
_) ordent %OrdEnt // move default stress: ordentlik/-e/-er/-ste/-heid | |||
orent (K %o@rEnt // fix stress of orent in compounds: kiertsorent/orentspring, etc. | |||
@@ -2272,16 +2339,23 @@ | |||
omkeer Omke@r // restore default stress: omkeer/handomkeer and similar | |||
_) omker (A Omke@r // omkering/omkerende | |||
_) om (klem %Om // move default stress: omklem/-ming | |||
_) om (laag %Om // move default stress: omlaag and compounds | |||
_) omli (gg %OmlI // move default stress: omliggend/-e | |||
om (ly %Om // move default stress: omlyn/-ing | |||
_) om (raam %Om // move default stress: omraam and derivitives | |||
om (ring %Om // move default stress | |||
om (sig %Om // move default stress: omsigtig/-heid | |||
omsingel %OmsIN@l // fix stress: omsingel/fix e sound: omsingelde | |||
_) om (sirkel %Om // move default stress: omsirkel and derivitives | |||
_) om (skep %Om // move default stress: omskep and derivitives | |||
_) om (skr %Om // move default stress: omskryf/omskrewe | |||
_) om (sluier %Om // move default stress: omsluier and derivitives | |||
_) om (sluit %Om // move default stress: omsluit/-ing | |||
omstandigh Omst'and@x2 // to steer clear of prefixes and suffixes | |||
om (vatt %Om // move default stress: omvattend and derivitives | |||
_) omver %Omf&r // omver/omvergooi/omverwerp | |||
_) om (welC %Om // move default stress: omwelf/omwelwend/omwelwing | |||
om (wenteli %Om // move default stress: omwenteling and derivitives | |||
_) opeen Op_'e@n | |||
_) ope (K o@p@ //opehart opestelling etc./ope | |||
@@ -2391,6 +2465,7 @@ | |||
onder (hande %On@r // move default stress: onderhandel and derivitives | |||
onder (hor %On@r // exception to default stress rule: | |||
onder (hou %On@r // move default stress: onderhou/-dend/-e | |||
onder (leg %On@r // move default stress: onderleg/-de/-dheid | |||
onder (ne %On@r // move default stress: onderneem/onderneming | |||
onderonsie %On@r?o~nsi // fix stress, short break and nasalised o: onderonsie/-s | |||
onder (soeken %On@r // move default stress: ondersoekend/-e | |||
@@ -2799,6 +2874,7 @@ | |||
no) sele (_ s@l@ // e sounds in onnosele | |||
self (stan s%&lf // move default stress: selfstandig/-e/-heid | |||
seli (ba s%El%i // move default stress and fix e sound: selibaat/selibate | |||
@) sellig s'&l@x2 // move default stress: een-/twee-/...-/meer-/veelsellig/-e | |||
se (llin s%&' // stress on 'in: (met)gesellin/-ne/-netjie, etc. | |||
_) selon (sC s@lo~n // fix stress and e, nasalise o: selonspampoen/-roos/-rose, etc. | |||
@) sel (wig s'&l // stress: (ver)eenselwig and derivitives | |||
@@ -2889,6 +2965,7 @@ | |||
// sioe Si'u | |||
si (o Si // fisiologie/-logiese/-loog | |||
sio (ne Siu' // emosioneel/emosionele/rasioneel/rasionele, etc. | |||
@) sipale sip'A:l@ // move default stress: munisipale/partisipale | |||
sist (e s@st // fix stress and vowel sounds: sisteem/sisteme | |||
siste (mat s@st@ // fix e sounds: sistematies/-e | |||
situasie sItSu'A:si | |||
@@ -2916,6 +2993,7 @@ | |||
dubbel) ste (r st& // fix e sound: dubbelster/-re | |||
dwaal) ste (r st& // fix e sound: dwaalster/-re | |||
dwerg) ste (r st& // fix e sound: dwergster/-re | |||
nd) ste (r st& // fix e sound: aandster/oggendster | |||
pool) ste (r st& // fix e sound: poolster | |||
_) ste (ri st%E // fix stress and e sound: steriel/-e/steriliteit | |||
stimu (lA st@m%y // move default stress and fix i sound: stimuleer/stimulering/stimulasie | |||
@@ -3129,7 +3207,7 @@ | |||
tesou (rie t%Es%u //tesourie and compounds | |||
moles) tering te@r@N // molestering/kindermolestering | |||
_) ter (l t@r // move default stress: terloops/-e | |||
@) term (_ t&r@ // correct pronunciation of e | |||
@) term (_ t&r@m // correct pronunciation of e | |||
@) terme (_ t&rm@ // correct pronunciation of 1st e | |||
ter (miet t%&r // move default stress: termiet/-e and compounds | |||
_) ter (w t@r // stress and e sound: terwyl/terwille | |||
@@ -3422,6 +3500,7 @@ | |||
k) w w | |||
k) w (And v // fix w sound: buikwand/rukwinde | |||
s) w w | |||
lyks) w (aaC v // fix w sound: lykswaad/-waak | |||
s) w (art w // fix w sound in compounds like donderswart | |||
&s) w (eefs v // fix w sound: compounds like -sweefsel/tuisweefstof, etc. | |||
s) w (ou v // fix w sound: bamboeswoud/keerkringswoud and similar | |||
@@ -3453,6 +3532,7 @@ | |||
@) weg (_ v&x2 // blindweg/botweg and many similar | |||
spoor) weg v&x2 // fix e sound: spoorwegaanleg/-aansluiting/-amptenaar/-eiendom/-inkomste/-ongeluk... | |||
welbehaaglik v%&lb@hA:x2l@k // move default stress: welbehaaglik/-e/-er/-ste | |||
welf (_ v&lf // fix e sound: omwelf/oorwelf | |||
@) wendig v'End@x2 // inwendig/noodwendig/uitwendig | |||
&) wene (_ v@n@ // fix penultimate e sound: afgestorwene/-s/ingeskrewene/verdorwene/verhewene | |||
A) wer (AA v@r // fix e sound: beyweraar/keweruitroeiing/nyweraar/oewereienaar | |||
@@ -3463,6 +3543,8 @@ | |||
w (ese_ v //words ending in wese | |||
@C) w (eë v // fix w sound: duikweë/staatsweë/uitweë, etc. | |||
t) w w | |||
@s) w (aarde_ v // fix w sound in many compounds ending in -waarde | |||
bes) w (aarde w // but: gewetensbeswaarde, etc. | |||
s) w (ater v // fix w sound: Augrabieswaterval/gebiedswaters/opwaswater/varswater, etc. | |||
t) w (at v // geut/put/soetwater, etc./ietwat | |||
it) w v // inkuitwisser/witwyn/uitwoed/witwatersrand | |||
@@ -3538,8 +3620,9 @@ | |||
woord (a vo@rt_ // fix d sound: woordafleiding and similar compounds | |||
@C) w (urm v // fix w sound: erdwurm/-s/-agtig, etc. | |||
@t) w (y v // fix w sound: granaatwyn/kieswetwysiging/krotwyk/straatwys(ie) | |||
@C) w (yd v // fix w sound: kerkwyding/landswyd/reikwydte/republiekwyd/wêreldwyd | |||
@t) wyfel weIf@l // fix w sound: gewetenstwyfel and similar | |||
w (yser v //padwyser and many others with wyser in compounds | |||
w (ys v //padwyser and many others with wyser in compounds | |||
nt) w (A v | |||
.group x |
@@ -264,6 +264,11 @@ tS v w z | |||
Dictionary ta_dict | |||
a a: e E: i o o: u | |||
u: | |||
: d dZ g j l m n | |||
p r t t. | |||
Dictionary pt_dict |
@@ -1024,6 +1024,7 @@ innard In3d | |||
inner In3 | |||
inning InIN | |||
innovative In@veItIv | |||
insect $1 | |||
insert Ins3:t $onlys | |||
insert Ins'3:t $verb | |||
insightful $2 | |||
@@ -2578,6 +2579,7 @@ thine ,DaIn | |||
me ,mi: $only | |||
him ,hIm $only | |||
us ,Vz $only | |||
us $abbrev $allcaps | |||
them ,DEm $only | |||
my %maI $nounf $strend2 |
@@ -2,3 +2,14 @@ | |||
// This file is UTF8 encoded | |||
// Spelling to phoneme words and exceptions for Tamil | |||
_0 pu:dZjam_ // ?? | |||
_1 ondru_ | |||
_2 irandu_ | |||
_3 mo:ndru_ | |||
_4 na:ngu_ | |||
_5 aintu_ | |||
_6 a:ru_ | |||
_7 E:lu_ // aylu ?? | |||
_8 et.:u_ | |||
_9 onpatu_ | |||
_10 pat:u_ |
@@ -2,6 +2,9 @@ | |||
// This file is UTF8 encoded | |||
// Spelling to phoneme rules for Tamil | |||
// B means a combining vowel sign, or a virama | |||
.replace | |||
௦ 0 // Tamil numbers | |||
௧ 1 | |||
@@ -15,7 +18,8 @@ | |||
௯ 9 | |||
.group 0xe0ae | |||
.group 0xe0ae // characters which start with UTF-8 bytes: [e0 ae] | |||
ஂ // anusvara | |||
ஃ // visarga | |||
@@ -53,8 +57,8 @@ | |||
்) க (B g | |||
_) க ka | |||
_) க (B k | |||
க்க ka | |||
க்க (B k | |||
க்க k:a | |||
க்க (B k: | |||
ங Na | |||
ங (B N | |||
@@ -63,8 +67,8 @@ | |||
ச (B dZ | |||
_) ச sa | |||
_) ச (B s | |||
ச்ச tSa | |||
ச்ச (B tS | |||
ச்ச tS:a | |||
ச்ச (B tS: | |||
ஜ dZa | |||
ஜ (B dZ | |||
@@ -86,8 +90,8 @@ | |||
த (B d | |||
_) த ta | |||
_) த (B t | |||
த்த ta | |||
த்த (B t | |||
த்த t:a | |||
த்த (B t: | |||
ந na | |||
ந (B n | |||
@@ -99,8 +103,8 @@ | |||
ப (B b | |||
_) ப pa | |||
_) ப (B p | |||
ப்ப pa | |||
ப்ப (B p | |||
ப்ப p:a | |||
ப்ப (B p: | |||
ம ma | |||
ம (B m | |||
@@ -146,7 +150,7 @@ | |||
ி i | |||
.group 0xe0af | |||
.group 0xe0af // characters which start with UTF-8 bytes: [e0 af] | |||
ீ i: | |||
ு u |
@@ -19,7 +19,7 @@ After that it's a gradual process of improvement to: | |||
<ul> | |||
<li>Make the spelling-to-phoneme translation rules more accurate, including the position of stressed | |||
syllables within words. Some languages are easier than others. I expect most are easier than English. | |||
<p><li>Improve the sounds of the phonemes. This may consist of making small adjustments to vowel and diphthong quality, | |||
<p><li>Improve the sounds of the phonemes. It may be that a phoneme should sound different depending on adjacent sounds, or whether it's at the start or the end of a word, between vowels, etc. This may consist of making small adjustments to vowel and diphthong quality, | |||
or adjusting the strength of consonants. Bigger changes may be recording new or replacement consonant | |||
sounds, or even writing program code to implement new types of sounds. | |||
<p><li>Marking some common words in the dictionary that should be unstressed (words such as "the", "is"), or should be preceded | |||
@@ -31,6 +31,8 @@ characteristics of the language which are not currently implemented. For exampl | |||
</ul> | |||
<b><em>If you are interested in working on a language, please contact me to set up the initial data and to | |||
discuss the features of the language.</em></b> | |||
<p> | |||
For most of the eSpeak voices, I do not speak or understand the language, and I do not know how it should sound. I can only make improvements as a result of feedback from speakers of that language. If you want to help to improve a language, listen carefully and try to identify individual errors, either in the spelling-to-phoneme translation, the position of stressed syllables within words, or the sound of phonemes, or problems with rhythm and vowel lengths. | |||
<HR> | |||
<H3>6.1 Language Code</H3> | |||
<P>Generally, the language's international <a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1 code</a> is used to |
@@ -46,7 +46,7 @@ RETURN is pressed.<br>Use <strong>espeak -x</strong> to see the corresponding ph | |||
<h3>2.2.2 Use with KDE Text-to-Speech (KTTS)</h3> | |||
To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker | |||
with "command for speaking texts" set to:<br> | |||
<strong>cat %f | espeak --stdin -w %w</strong> | |||
<strong>cat %f | espeak --stdin -v en -w %w</strong> | |||
<p> | |||
Note: | |||
<ul> | |||
@@ -58,7 +58,7 @@ Note: | |||
<h3>2.2.3 The Command Line Options</h3> | |||
<dl> | |||
<dt> | |||
<strong>espeak [options] ["words"]</strong><br> | |||
<strong>espeak [options] ["text words"]</strong><br> | |||
<dd>Text input can be taken either from a file, from a string in the command, or from stdin. | |||
<p> | |||
<dt> | |||
@@ -70,7 +70,7 @@ Note: | |||
<dd>Takes the text input from stdin. | |||
<p> | |||
<dt> | |||
If neither -f nor --stdin is given, then the text input is taken from "words" (a text string within double quotes). <br>If that is not present then text is taken from stdin, but each line is treated as a separate sentence. | |||
If neither -f nor --stdin is given, then the text input is taken from "text words" (a text string within double quotes). <br>If that is not present then text is taken from stdin, but each line is treated as a separate sentence. | |||
<p> | |||
<dt> | |||
<strong>-a <integer></strong><br> | |||
@@ -82,20 +82,23 @@ If neither -f nor --stdin is given, then the text input is taken from "words" (a | |||
<p> | |||
<dt> | |||
<strong>-s <integer></strong><br> | |||
<dd>Sets the speed in words-per-minute (approximate values for the default voice, others may | |||
differ slightly). The default value is 170. I generally use a faster speed | |||
of 190. Range 80 to 370. | |||
<dd>Sets the speed in words-per-minute (approximate values for the default English voice, others may differ slightly). The default value is 170. I generally use a faster speed | |||
of 190. Range 80 to 390. | |||
<p> | |||
<dt> | |||
<strong>-b</strong><br> | |||
<dd>Indicates that the input text is in the 8-bit character set which corresponds to the language (eg. Latin-2 for Polish). Without this option, eSpeak assumes text is UTF8, but will automatically switch to the 8-bit character set if it finds an illegal UTF8 sequence. That may give wrong results if some 8-bit character sequences look like valid UFT8 multibyte characters. | |||
<dd>Indicates that the input text is not UTF-8, but the 8-bit character set which corresponds to the language (eg. Latin-2 for Polish). Without this option, eSpeak assumes text is UTF8, but will automatically switch to the 8-bit character set if it finds an illegal UTF8 sequence. That may give wrong results if some 8-bit character sequences look like valid UFT8 multibyte characters. | |||
<p> | |||
<dt> | |||
<strong>-g <integer></strong><br> | |||
<dd>Word gap. This option inserts a pause between words. The value is the length of the pause, in units of 10 mS (at the default speed of 170 wpm). | |||
<p> | |||
<dt> | |||
<strong>-k <integer></strong><br> | |||
<dd>Indicate words which begin with capital letters.<p> | |||
1 Use a click sound to indicate when a word starts with a capital letter, or double click if word is all capitals.<p> | |||
2 Speak the word "capital" before a word which begins with a capital letter.<p> | |||
Other values: Increase the pitch for words which begin with a capital letter. The greater the value, the greater the increase in pitch. Try -k20. | |||
1 eSpeak uses a click sound to indicate when a word starts with a capital letter, or double click if word is all capitals.<p> | |||
2 eSpeak speaks the word "capital" before a word which begins with a capital letter.<p> | |||
Other values: eSpeak increases the pitch for words which begin with a capital letter. The greater the value, the greater the increase in pitch. Try -k20. | |||
<p> | |||
<dt> | |||
<strong>-l <integer></strong><br> | |||
@@ -118,13 +121,14 @@ Quiet. No sound is generated. This may be useful with the -x option. | |||
<pre> espeak -vaf</pre> | |||
To use the Afrikaans voice. A modifier after the voice name can be used to vary the tone of the voice, eg: | |||
<pre> espeak -vaf+3</pre> | |||
The variants are <code> +1 +2 +3 +4 +5 </code> for male voices and <code> +11 +12 +13 +14 </code> which simulate female voices by using higher pitches. | |||
The variants are <code> +m1 +m2 +m3 +m4 +m5 +m6 </code> for male voices and <code> +f1 +f2 +f3 +f4 </code> which simulate female voices by using higher pitches. Other variants are <code>+croak</code> and <code>+whisper</code>. | |||
<p> | |||
<voice filename> is a file within the <code>espeak-data/voices</code> directory.<br> | |||
Voice files can specify a language, different pitches, tonal qualities, and prosody for the voice. | |||
<variant> is a file within the <code>espeak-data/voices/!v</code> directory.<p> | |||
Voice files can specify a language, alternative pronunciations or phoneme sets, different pitches, tonal qualities, and prosody for the voice. | |||
See the <a href="voices.html">voices.html</a> file.<p> | |||
Voice names which start with <b>mb-</b> are for use with Mbrola diphone voices, see <a href="mbrola.html">mbrola.html</a><p> | |||
Some languages may need additional dictionary data, see <a href="languages.html">languages.html</a> | |||
Some languages may need additional dictionary data, see <a href="languages.html">languages.html</a> | |||
<p> | |||
<dt> | |||
<strong>-w <wave file></strong><br> | |||
@@ -145,7 +149,7 @@ shown on stdout. | |||
<p> | |||
<dt> | |||
<strong>--stdout</strong><br> | |||
<dd>Writes the speech output to stdout as it is produced, rather than speaking it. The data starts with a WAV file header which indicates the sample rate and format of the data. The length fields are set to zero because the length of the data is unknown when the header is produced. | |||
<dd>Writes the speech output to stdout as it is produced, rather than speaking it. The data starts with a WAV file header which indicates the sample rate and format of the data. The length field is set to zero because the length of the data is unknown when the header is produced. | |||
<p> | |||
<dt><strong>--compile[=<voice name>]</strong><br> | |||
<dd> |
@@ -95,8 +95,11 @@ The rules are organized in groups, each starting with a ".group" line: | |||
A group for other characters which don't have their own group. | |||
<p> | |||
<dt><strong>.L<nn></strong><br><dd> | |||
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 20. eg:<br> | |||
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 20. eg:<p> | |||
<code>.L01 b bl br pl pr</code> | |||
<p> | |||
<dt><strong>.replace</strong><br><dd> | |||
See section 4.7 Character Substitution, below. | |||
</dl> | |||
</ul>When matching a word, firstly the 2-letter group for the two letters at the current position in the word (if such a group exists) is searched, and then the single-letter group. The highest scoring rule in either of those two groups is used. | |||
@@ -467,7 +470,11 @@ A word (or group of words) may be given one or more flags, either instead of, or | |||
</tr> | |||
<tr> | |||
<td>$capital</td> | |||
<td>Use this pronunciation if word has initial capital letter (eg. polish v Polish).</td> | |||
<td>Use this pronunciation if the word has initial capital letter (eg. polish v Polish).</td> | |||
</tr> | |||
<tr> | |||
<td>$allcaps</td> | |||
<td>Use this pronunciation if the word is all capitals.</td> | |||
</tr> | |||
<tr> | |||
<td>$dot</td> | |||
@@ -475,7 +482,7 @@ A word (or group of words) may be given one or more flags, either instead of, or | |||
</tr> | |||
<tr> | |||
<td>$abbrev</td> | |||
<td>This has two meanings.<br> 1. If there is no phoneme string: Speak the word as individual letters, even if it contains a vowel (eg. "abc" should be spoken as "a" "b" "c").<br>2. If there is a phoneme string: Speak this word as the specified phoneme string, not as individual letters, even if it's all capital letters (eg, Roman numerals III, IV ).</td> | |||
<td>This has two meanings.<br> 1. If there is no phoneme string: Speak the word as individual letters, even if it contains a vowel (eg. "abc" should be spoken as "a" "b" "c").<br>2. If there is a phoneme string: This word is capitalized because it is an abbreviation and capitalization does indicate emphasis (if the "emphasize all-caps" is on).</td> | |||
</tr> | |||
<tr> | |||
<td> </td> | |||
@@ -494,6 +501,11 @@ A word (or group of words) may be given one or more flags, either instead of, or | |||
<td>$verb</td> | |||
<td>Use this pronunciation if it's a verb.</td> | |||
</tr> | |||
<tr> | |||
<td>$noun</td> | |||
<td>Use this pronunciation if it's a noun.</td> | |||
</tr> | |||
<tr> | |||
<td>$past</td> | |||
<td>Use this pronunciation if it's past tense.</td> | |||
</tr> | |||
@@ -529,7 +541,7 @@ The dictionary list is searched from bottom to top. The first match that satisf | |||
then if "to" is at the end of the clause, we get [tu:], if not then we get [t@]. | |||
<p> | |||
<h4>4.4.4 Translating a Word with another Word</h4> | |||
<h4>4.4.4 Translating a Word to another Word</h4> | |||
Rather than specifying the pronunciation of a word by a phoneme string, you can specify another "sounds like" word.<p>Use the attribute <b>$text</b> eg.<p> | |||
<pre> | |||
cough coff $text | |||
@@ -591,7 +603,7 @@ _0 to _9 | |||
<p> <hr> | |||
<h3>4.7 Character Substitution</h3> | |||
Chracter substitutions can be specified by using a <b> .replace </b> section at the start of the <b> _rules </b> file. Each line specified either one or two alphabetic characters to be replaced by another one or two alphabetic characters. This substitution is done to a word before it is translated using the spelling-to-phoneme rules. Only the lower-case version of the characters needs to be specified. eg.<p> | |||
Character substitutions can be specified by using a <b> .replace </b> section at the start of the <b> _rules </b> file. Each line specified either one or two alphabetic characters to be replaced by another one or two alphabetic characters. This substitution is done to a word before it is translated using the spelling-to-phoneme rules. Only the lower-case version of the characters needs to be specified. eg.<p> | |||
.replace<br> | |||
ô ő // (Hungarian) allow the use of o-circumflex instead of o-double-accute<br> | |||
û ű<p> |
@@ -29,7 +29,7 @@ A number of Voice files are provided in the <code>espeak-data/voices</code> dire | |||
You can select one of these with the <strong>-v <voice filename></strong> parameter to the | |||
speak command, eg: | |||
<pre> espeak -vaf</pre> | |||
to speak using the Afrikaans voice. | |||
to speak using the Afrikaans voice.<p>Language voices generally start with the 2 letter <a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1 code</a> for the language. If the language does not have an ISO 639-1 code, then the 3 letter <a href="http://www.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> can be used. | |||
<p> | |||
For details of the voice files see <a href="voices.html">Voices</a>. | |||
<h4>Default Voice</h4> | |||
@@ -83,6 +83,11 @@ The eSpeak speech synthesizer does text to speech for the following additional l | |||
<dd>This has been worked on by a native speaker and it should be OK.</dd> | |||
<p> | |||
<dt> | |||
<strong>bs Bosnian</strong><br> | |||
<dd>Usable, but I'm unsure whether wrong stressed syllables are a problem. It accepts both Latin and Cyrillic characters. This voice is similar to <strong>sr Serbian</strong> and <strong>hr Croatian</strong> | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>cs Czech</strong><br> | |||
<dd>Usable. | |||
</dd> | |||
@@ -120,7 +125,7 @@ The eSpeak speech synthesizer does text to speech for the following additional l | |||
<p> | |||
<dt> | |||
<strong>hr Croatian</strong><br> | |||
<dd>Usable, but I'm unsure whether wrong stressed syllables are a problem. | |||
<dd>Usable, but I'm unsure whether wrong stressed syllables are a problem. It accepts both Latin and Cyrillic characters. This voice is similar to <strong>sr Serbian</strong> and <strong>bs Bosnian</strong> | |||
</dd> | |||
<p> | |||
<dt> | |||
@@ -153,6 +158,11 @@ The eSpeak speech synthesizer does text to speech for the following additional l | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>sr Serbian</strong><br> | |||
<dd>Usable. Wrong stressed syllables may be a problem. It accepts both Latin and Cyrillic characters. This voice is similar to <strong>hr Croatian</strong> and <strong>bs Bosnian</strong> | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>sv Swedish</strong><br> | |||
<dd>This has now had some work done on the pronunciation rules, so it should be useable. | |||
</dd> | |||
@@ -174,13 +184,13 @@ These languages are only initial naive implementations which have had little or | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>hi Hindi</strong><br> | |||
<dd>This is interesting because it uses the Devanagari characters. I'm not sure about Hindi stress rules, and I expect the sound of aspirated/unaspirated consonant pairs needs improvement. | |||
<strong>grc Ancient Greek</strong><br> | |||
<dd>Includes a short pause between words to help understanding. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>nl Dutch</strong><br> | |||
<dd>Probably needs improvement of the spelling-to-phoneme rules. | |||
<strong>hi Hindi</strong><br> | |||
<dd>This is interesting because it uses the Devanagari characters. I'm not sure about Hindi stress rules, and I expect the sound of aspirated/unaspirated consonant pairs needs improvement. | |||
</dd> | |||
<p> | |||
<dt> | |||
@@ -189,6 +199,21 @@ These languages are only initial naive implementations which have had little or | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>la Latin</strong><br> | |||
<dd>Stress rules are implemented, but it needs text where long vowels are marked with macrons. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>mk Macedonian</strong><br> | |||
<dd>This is similar to <strong>hr Croatian</strong>, so it's probably usable. It accepts both Latin and Cyrillic characters. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>nl Dutch</strong><br> | |||
<dd>Probably needs improvement of the spelling-to-phoneme rules. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>no Norwegian</strong><br> | |||
<dd>An initial guess, awaiting feedback. | |||
</dd> | |||
@@ -210,9 +235,18 @@ Russian stress position is unpredictable so a large lookup dictionary is needed | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>zh Mandarin Chinese</strong><br> | |||
<dd> | |||
This speaks Pinyin text and Chinese characters. There is only a simple one-to-one translation of Chinese characters to a single Pinyin pronunciation. There is no attempt yet at recognising different pronunciations of Chinese characters in context, or of recognising sequences of characters as "words". The eSpeak installation includes a basic set of Chinese characters. More are available in an additional data file for Mandarin Chinese at: | |||
<a href="http://espeak.sourceforge.net/data/">http://espeak.sourceforge.net/data/</a>. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>zhy Cantonese Chinese</strong><br> | |||
<dd>Just a naive simple one-to-one translation from single Simplified Chinese characters to phonetic equivalents in Cantonese. No attempt so far at disambiguation, grouping characters into words, or adjusting tones according to their surrounding syllables. This voice needs Chinese character to phonetic translation data, which is available as a separate download at: <a href="http://espeak.sourceforge.net/data/">http://espeak.sourceforge.net/data/</a>.<br>The voice can also read Jyutping romanised text. | |||
<dd>Just a naive simple one-to-one translation from single Simplified Chinese characters to phonetic equivalents in Cantonese. There is limited attempt at disambiguation, grouping characters into words, or adjusting tones according to their surrounding syllables. This voice needs Chinese character to phonetic translation data, which is available as a separate download for Cantonese at: <a href="http://espeak.sourceforge.net/data/">http://espeak.sourceforge.net/data/</a>.<br>The voice can also read Jyutping romanised text. | |||
</dd> | |||
</ul> | |||
<h3>3.6 Mbrola Voices</h3> | |||
Some additional voices, whose name start with <b>mb-</b> (for example <b>mb-en1</b>) use eSpeak as a front-end to Mbrola diphone voices. eSpeak does the spelling-to-phoneme translation and intonation. | |||
See <a href="mbrola.html">mbrola.html</a>. |
@@ -27,11 +27,14 @@ | |||
#include <stdio.h> | |||
#define ESPEAK_API_REVISION 2 | |||
#define ESPEAK_API_REVISION 3 | |||
/* | |||
Revision 2 | |||
Added parameter "options" to eSpeakInitialize() | |||
Revision 3 | |||
Added espeakWORDGAP to espeak_PARAMETER | |||
*/ | |||
/********************/ | |||
/* Initialization */ | |||
@@ -267,7 +270,7 @@ espeak_ERROR espeak_Synth(const void *text, | |||
espeakSSML Elements within < > are treated as SSML elements, or if not recognised are ignored. | |||
espeakPHONEMES Text within [[ ]] is treated as phonemes codes (in espeak's Hirschenbaum encoding). | |||
espeakPHONEMES Text within [[ ]] is treated as phonemes codes (in espeak's Hirshenbaum encoding). | |||
espeakENDPAUSE If set then a sentence pause is added at the end of the text. If not set then | |||
this pause is suppressed. | |||
@@ -332,7 +335,6 @@ espeak_ERROR espeak_Char(wchar_t character); | |||
EE_INTERNAL_ERROR. | |||
*/ | |||
/* Note, there is no function to play a sound icon. This would be done by the calling program */ | |||
@@ -342,12 +344,18 @@ espeak_ERROR espeak_Char(wchar_t character); | |||
typedef enum { | |||
espeakSILENCE=0, /* internal use */ | |||
espeakRATE, | |||
espeakVOLUME, | |||
espeakPITCH, | |||
espeakRANGE, | |||
espeakPUNCTUATION, | |||
espeakCAPITALS, | |||
espeakRATE=1, | |||
espeakVOLUME=2, | |||
espeakPITCH=3, | |||
espeakRANGE=4, | |||
espeakPUNCTUATION=5, | |||
espeakCAPITALS=6, | |||
espeakWORDGAP=7, | |||
espeakOPTIONS=8, // reserved for misc. options. not yet used | |||
espeakINTONATION=9, | |||
espeakRESERVED1=10, | |||
espeakRESERVED2=11, | |||
espeakEMPHASIS, /* internal use */ | |||
espeakLINELENGTH, /* internal use */ | |||
espeakVOICETYPE, // internal, 1=mbrola | |||
@@ -379,7 +387,7 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela | |||
espeakPUNCTUATION: which punctuation characters to announce: | |||
value in espeak_PUNCT_TYPE (none, all, some), | |||
see espeak_GetParameter() to specify which characters are announced. | |||
see espeak_GetParameter() to specify which characters are announced. | |||
espeakCAPITALS: announce capital letters by: | |||
0=none, | |||
@@ -388,6 +396,8 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela | |||
3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch | |||
of a word raised to indicate it has a capital letter. | |||
espeakWORDGAP: pause between words, units of 10mS (at the default speed) | |||
Return: EE_OK: operation achieved | |||
EE_BUFFER_FULL: the command can not be buffered; | |||
you may try after a while to call the function again. | |||
@@ -447,9 +457,9 @@ void espeak_CompileDictionary(const char *path, FILE *log); | |||
// voice table | |||
typedef struct { | |||
char *name; // a given name for this voice. UTF8 string. | |||
char *languages; // list of pairs of (byte) priority + (string) language (and dialect qualifier) | |||
char *identifier; // the filename for this voice within espeak-data/voices | |||
const char *name; // a given name for this voice. UTF8 string. | |||
const char *languages; // list of pairs of (byte) priority + (string) language (and dialect qualifier) | |||
const char *identifier; // the filename for this voice within espeak-data/voices | |||
unsigned char gender; // 0=none 1=male, 2=female, | |||
unsigned char age; // 0=not specified, or age in years | |||
unsigned char variant; // only used when passed as a parameter to espeak_SetVoiceByProperties |
@@ -42,6 +42,8 @@ indicates that this is voice is for the "en-uk-north" dialect, but it is also a | |||
<p> | |||
<dt> | |||
<strong>gender <gender> [<age>]</strong><br> | |||
<dd> | |||
This attribute is only a label for use in voice selection. It doesn't change the sound of the voice. | |||
<ul><gender> may be male, female, or unknown.<br> | |||
<age> is optional and gives an age in years. | |||
</dl> | |||
@@ -57,10 +59,11 @@ indicates that this is voice is for the "en-uk-north" dialect, but it is also a | |||
it equal to the base pitch will give a monotone. The default values are 82 118. | |||
<p> | |||
<dt> | |||
<strong>formant <number> <frequency> <strength> <width></strong><br> | |||
<strong>formant <number> <frequency> <strength> <width> <freq_add></strong><br> | |||
<dd> Systematically adjusts the frequency, strength, and width of the | |||
resonance peaks of the voice. Values are percentages of the | |||
default values. Changing these affects the tone/quality of the voice. | |||
default values. Changing these affects the tone/quality of the voice.<p> | |||
<strong>freq_add </strong> Adds a constant value (in Hz) to the frequency of the formant peak. The value may be negative. | |||
<ul> | |||
<li>Formants 1,2,3 are the standard three formants which define vowels.</li> | |||
<li>Formant 0 is used to give a low frequency component to the sounds, of | |||
@@ -158,7 +161,7 @@ don't have their own <strong>tone</strong> statement. | |||
<dt> | |||
<strong>dictrules <list of rule numbers></strong><br> | |||
<dd> | |||
Gives a list of conditional dictionary rules which are applied for this voice. Rule numbers are in the range 0 to 31 and are specific to a language. They can apply to rules in the langauge's <b>_rules</b> dictionary file and also its <b>_list</b> exceptions list. | |||
Gives a list of conditional dictionary rules which are applied for this voice. Rule numbers are in the range 0 to 31 and are specific to a language dictionary. They apply to rules in the langauge's <b>_rules</b> dictionary file and also its <b>_list</b> exceptions list. | |||
See <a href="dictionary.html">dictionary.html</a>. | |||
</dd> | |||
<p> | |||
@@ -206,10 +209,13 @@ See <a href="dictionary.html">dictionary.html</a>. | |||
The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.</dd> | |||
<p> | |||
<dt> | |||
<strong>intonation <param1> <param2></strong><br> | |||
<dd> (for further development)<br> | |||
<strong>intonation <param1></strong><br> | |||
<dd><ul> | |||
<li>1 Default.</li> | |||
<li>2 Less intonation.</li> | |||
<li>3 Less intonation, and comma does not raise the pitch.</li> | |||
<li>4 Pitch rises (rather than falls) at the end of sentence.</li> | |||
</ul> | |||
</dd> | |||
<p> | |||
<dt> | |||
@@ -219,12 +225,6 @@ The ISO 8859 character set number. (not all are implemented). | |||
</dd> | |||
<p> | |||
Additional attributes are available to set various internal options which control how language is processed. These would normally be set in the program code rather than in a voice file. | |||
<p> | |||
<dt> | |||
<strong>stressrule <param1> <param2> <param3> <param4></strong><br> | |||
<dd> | |||
Controls how different stress levels are applied to the syllables of a word. | |||
</dd> | |||
</ul> | |||
<hr> | |||
<h3>5.3 Voice Files Provided</h3> |
@@ -2,14 +2,14 @@ language variant | |||
name female1 | |||
gender female | |||
pitch 140 200 | |||
pitch 145 200 | |||
flutter 7 | |||
roughness 4 | |||
formant 0 115 80 150 | |||
formant 1 120 70 187 | |||
formant 2 110 70 150 | |||
formant 1 120 80 180 | |||
formant 2 100 70 150 150 | |||
formant 3 115 70 150 | |||
formant 4 110 70 150 | |||
formant 4 110 80 150 | |||
formant 5 110 90 150 | |||
formant 6 105 80 150 | |||
formant 7 110 70 150 |
@@ -2,15 +2,17 @@ language variant | |||
name female2 | |||
gender female | |||
pitch 145 200 | |||
pitch 142 220 | |||
formant 0 105 80 150 | |||
formant 1 110 80 160 | |||
formant 2 110 70 150 | |||
formant 3 110 70 150 | |||
formant 4 115 70 150 | |||
formant 5 115 70 150 | |||
formant 4 115 80 150 | |||
formant 5 115 80 150 | |||
formant 6 110 70 150 | |||
formant 7 110 70 150 | |||
formant 8 110 70 150 | |||
stressAdd 0 0 -10 -10 0 0 10 40 | |||
breath 0 2 3 3 3 3 3 2 | |||
echo 140 12 |
@@ -2,16 +2,21 @@ language variant | |||
name female3 | |||
gender female | |||
pitch 150 230 | |||
pitch 140 240 | |||
formant 0 105 80 150 | |||
formant 1 110 80 150 | |||
formant 2 120 70 150 | |||
formant 3 125 70 150 | |||
formant 4 125 70 150 | |||
formant 1 120 75 150 -50 | |||
formant 2 135 70 150 -250 | |||
formant 3 125 80 150 | |||
formant 4 125 80 150 | |||
formant 5 125 80 150 | |||
formant 6 120 70 150 | |||
formant 7 110 70 150 | |||
formant 8 110 70 150 | |||
stressAmp 18 18 20 20 20 20 20 20 | |||
breath 0 5 7 7 7 6 6 5 | |||
//breath 0 2 4 4 4 4 4 4 | |||
breath 0 2 3 3 3 3 3 2 | |||
echo 120 10 | |||
roughness 4 | |||
@@ -3,16 +3,16 @@ name female4 | |||
gender female | |||
echo 130 15 | |||
pitch 145 200 | |||
pitch 142 200 | |||
formant 0 120 80 150 | |||
formant 1 115 70 160 | |||
formant 2 125 80 150 | |||
formant 3 125 80 150 | |||
formant 1 115 80 160 -20 | |||
formant 2 130 75 150 -200 | |||
formant 3 123 75 150 | |||
formant 4 125 80 150 | |||
formant 5 125 80 150 | |||
formant 6 110 80 150 | |||
formant 7 110 75 150 | |||
formant 8 110 75 150 | |||
stressAdd -20 -20 -20 -20 0 0 60 80 | |||
stressAdd -20 -20 -20 -20 0 0 20 120 | |||
stressAmp 18 16 20 20 20 20 20 20 |
@@ -7,7 +7,7 @@ flutter 4 | |||
roughness 4 | |||
formant 0 98 95 100 | |||
formant 1 98 95 100 | |||
formant 1 97 95 100 | |||
formant 2 97 95 100 | |||
formant 3 97 100 100 | |||
formant 4 97 100 100 |
@@ -2,14 +2,14 @@ language variant | |||
name male5 | |||
gender male | |||
pitch 90 130 | |||
formant 0 100 85 130 | |||
formant 1 105 85 130 | |||
formant 2 105 85 130 | |||
formant 1 90 85 130 40 | |||
formant 2 80 85 130 310 | |||
formant 3 105 85 130 | |||
formant 4 105 85 130 | |||
formant 5 105 85 130 | |||
formant 6 105 85 150 | |||
formant 7 105 85 150 | |||
formant 8 105 85 150 | |||
intonation 2 |
@@ -2,4 +2,4 @@ language cy | |||
name welsh-test | |||
gender male | |||
intonation 0 | |||
intonation 4 |
@@ -3,3 +3,4 @@ language en | |||
gender male | |||
formant 0 100 100 110 | |||
@@ -2,4 +2,4 @@ name polish_test | |||
language pl | |||
gender male | |||
//intonation 16 | |||
intonation 2 |
@@ -16,7 +16,7 @@ | |||
fr 34 118 | |||
fr_ca 11 118 | |||
hi 50 132 | |||
ta 12 134 | |||
ta 13 134 | |||
hu 23 112 | |||
nl 26 117 | |||
pl 15 107 | |||
@@ -425,18 +425,18 @@ r3/r_o [(o)] base | |||
r3/r_trill [R2] base | |||
[R3] base | |||
[r] af | |||
[r] cy | |||
[r] nl | |||
[R] sk | |||
[r*] sr | |||
[x] pt | |||
r3/r_trill2 [R] base | |||
[r] cy | |||
[R] hr | |||
r3/r_trill2.wav [R] base | |||
[r] cy | |||
[R] hr | |||
r3/r_trill3.wav [R3] base | |||
[r] af | |||
[r] cy | |||
[r] nl | |||
r3/r_trill.wav [R2] base | |||
[R] sk | |||
@@ -702,7 +702,6 @@ ustop/t_dnt [t] base | |||
[t] hu | |||
[t] pl | |||
[t] hr | |||
[t] sr | |||
[t] ru | |||
[t;] ro | |||
[t[] vi | |||
@@ -745,6 +744,7 @@ ustop/ts_pzd_ [c] hi | |||
ustop/ts_pzd2 [c] hi | |||
[c] hu | |||
ustop/t_sr [d] sr | |||
[t] sr | |||
ustop/ts_rfx [ts.] zh | |||
ustop/ts_rfx_unasp [ts.] zh | |||
ustop/ts_sr.wav [tS;] sr | |||
@@ -1001,6 +1001,7 @@ voc/Q_less [Q] nl | |||
voc/v [v] base | |||
[v] fi | |||
[v] hi | |||
[v] ta | |||
[v2] nl | |||
[v;] ro | |||
[v] is | |||
@@ -1009,6 +1010,7 @@ voc/v_ [B] base | |||
[v] fi | |||
[v] fr | |||
[v] hi | |||
[v] ta | |||
[v2] nl | |||
[v;] ro | |||
[v] is | |||
@@ -1023,6 +1025,7 @@ vocw/Q2 [Q] nl | |||
vocw/v [B] base | |||
[v] base | |||
[v] fr | |||
[v] ta | |||
[v;] ro | |||
vocw/zh [Z] base | |||
[Z;] ro | |||
@@ -1321,7 +1324,6 @@ vowel/ii [I] en_rp | |||
[I2] en_rp | |||
[I] en_wm | |||
[I2] en_wm | |||
[I] cy | |||
[I] de | |||
[I:] de | |||
[I] fr_ca | |||
@@ -1333,7 +1335,8 @@ vowel/ii# [Y] cy | |||
[Y] ru | |||
vowel/ii_2 [I] la | |||
[i] zh | |||
vowel/ii_3 [I] fi | |||
vowel/ii_3 [I] cy | |||
[I] fi | |||
[I] hi | |||
[i] sk | |||
[I] hr |
@@ -44,8 +44,8 @@ phoneme t // dental variant of /t/ | |||
vowelin f1=0 f2=1600 -300 300 f3=-100 80 | |||
vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 | |||
lengthmod 2 | |||
wave ustop/t_dnt%50 | |||
before _ ustop/t_dnt%50 | |||
wave ustop/t_sr%50 | |||
before _ ustop/t_sr%35 | |||
switchvoicing d | |||
endphoneme | |||
@@ -82,3 +82,15 @@ phoneme u- | |||
endphoneme | |||
// ?? This is standard [v]. Should be it [v] without the fricative noise? | |||
phoneme v | |||
vcd lbd frc | |||
vowelin f1=0 f2=1000 -300 -200 f3=-300 100 | |||
vowelout f1=0 f2=1000 -500 -300 f3=-300 60 len=50 | |||
lengthmod 6 | |||
formants voc/v+vocw/v | |||
before _ voc/v_+vocw/v | |||
switchvoicing f | |||
endphoneme | |||
@@ -24,7 +24,7 @@ endphoneme | |||
phoneme I | |||
vowel starttype (i) endtype (i) | |||
length 150 | |||
formants vowel/ii | |||
formants vowel/ii_3 | |||
endphoneme | |||
@@ -205,13 +205,11 @@ endphoneme | |||
//=========== | |||
phoneme r | |||
liquid starttype #r endtype #r | |||
length 60 | |||
vowelin f1=2 f2=2700 -300 -200 f3=-1300 80 | |||
vowelout f1=2 f2=1700 -300 -200 f3=-1300 80 | |||
formants r3/r_trill+r3/r_trill3.wav%100 | |||
before _ r3/r_trill+r3/r_trill3.wav%100 | |||
trill | |||
liquid | |||
vowelin f1=0 f2=1600 -300 300 f3=-200 80 | |||
vowelout f1=2 f2=1600 -300 300 f3=-200 80 brk | |||
formants r3/r_trill2+r3/r_trill2.wav%65 | |||
trill | |||
lengthmod 6 | |||
endphoneme | |||
@@ -35,7 +35,7 @@ Installation and Use | |||
3. Example commands: | |||
*help speak | |||
should now show version 3.10 | |||
should now show version 3.30 (or whatever is the latest version) | |||
*speak -h | |||
shows the available commands |
@@ -1,23 +1,22 @@ | |||
/************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
/*************************************************************************** | |||
* Copyright (C) 2005 to 2007 by Jonathan Duddington * | |||
* email: [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 3 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write see: * | |||
* <http://www.gnu.org/licenses/>. * | |||
***************************************************************************/ | |||
#define USE_MODULE | |||
@@ -30,9 +29,9 @@ | |||
#include "speech.h" | |||
#include "speak_lib.h" | |||
#include "voice.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" | |||
#include "voice.h" | |||
#include "translate.h" | |||
#define os_X 0x20000 | |||
@@ -65,10 +64,11 @@ extern int current_source_index; | |||
FILE *f_text; | |||
int (* uri_callback)(int, const char *, const char *) = NULL; | |||
int (* phoneme_callback)(const char *) = NULL; | |||
int amp = 8; // default | |||
char path_home[80] = ""; | |||
char path_home[N_PATH_HOME] = ""; | |||
char wavefile[120]; | |||
char textbuffile[L_tmpnam]; | |||
int sample_rate_index; // current value | |||
@@ -81,7 +81,7 @@ static void *module_data; | |||
static int callback_inhibit = 0; | |||
static int more_text=0; | |||
#define N_VOICE_NAMES 40 | |||
#define N_VOICE_NAMES 60 | |||
static char *voice_names[40]; | |||
#define N_STATIC_BUF 8000 | |||
@@ -91,17 +91,17 @@ static _kernel_oserror errblk; | |||
USHORT voice_pcnt[N_PEAKS+1][3]; | |||
voice_t voice_data; | |||
voice_t *voice; | |||
static const char *help_text = | |||
"\nspeak [options] [\"<words>\"]\n\n" | |||
"-f <text file> Text file to speak\n" | |||
"--stdin Read text input from stdin instead of a file\n\n" | |||
//"--stdin Read text input from stdin instead of a file\n\n" | |||
"If neither -f nor --stdin, <words> are spoken, or if none then text is\n" | |||
"spoken from stdin, each line separately.\n\n" | |||
"-a <integer>\n" | |||
"\t Amplitude, 0 to 200, default is 100\n" | |||
"-g <integer>\n" | |||
"\t Word gap. Pause between words, units of 10mS at the default speed\n" | |||
"-l <integer>\n" | |||
"\t Line length. If not zero (which is the default), consider\n" | |||
"\t lines less than this length as end-of-clause\n" | |||
@@ -118,132 +118,19 @@ static const char *help_text = | |||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n" | |||
"-x\t Write phoneme mnemonics to stdout\n" | |||
"-X\t Write phonemes mnemonics and translation trace to stdout\n" | |||
"--stdout Write speech output to stdout\n" | |||
//"--stdout Write speech output to stdout\n" | |||
"--compile=<voice name>\n" | |||
"\t Compile the pronunciation rules and dictionary in the current\n" | |||
"\t directory. =<voice name> is optional and specifies which language\n" | |||
"--punct=\"<characters>\"\n" | |||
"\t Speak the names of punctuation characters during speaking. If\n" | |||
"\t =<characters> is omitted, all punctuation is spoken.\n" | |||
"--voices=<langauge>\n" | |||
"\t List the available voices for the specified language.\n" | |||
"\t If <language> is omitted, then list all voices.\n"; | |||
// additional Latin characters beyond the Latin1 character set | |||
#define MAX_WALPHA 0x233 | |||
// indexed by character - 0x100 | |||
// 0=not alphabetic, 0xff=lower case, other=value to add to upper case to convert to lower case | |||
static unsigned char walpha_tab[MAX_WALPHA-0xff] = { | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 100 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 110 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 120 | |||
0xff,0xff, 1,0xff, 1,0xff, 1,0xff,0xff, 1,0xff, 1,0xff, 1,0xff, 1, // 130 | |||
0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff,0xff, 1,0xff, 1,0xff, 1,0xff, // 140 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 150 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 160 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff,0xff, 1,0xff, 1,0xff, 1,0xff,0xff, // 170 | |||
0xff, 210, 1,0xff, 1,0xff, 206, 1,0xff, 205, 205, 1,0xff,0xff, 79, 202, // 180 | |||
203, 1,0xff, 205, 207,0xff, 211, 209, 1,0xff,0xff,0xff, 211, 213,0xff, 214, // 190 | |||
1,0xff, 1,0xff, 1,0xff, 218, 1,0xff, 218,0xff,0xff, 1,0xff, 218, 1, // 1a0 | |||
0xff, 217, 217, 1,0xff, 1,0xff, 219, 1,0xff,0xff,0xff, 1,0xff,0xff,0xff, // 1b0 | |||
0xff,0xff,0xff,0xff, 2, 1,0xff, 2, 1,0xff, 2, 1,0xff, 1,0xff, 1, // 1c0 | |||
0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff,0xff, 1,0xff, // 1d0 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 1e0 | |||
0xff, 2, 1,0xff, 1,0xff,0xff,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 1f0 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 200 | |||
1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 210 | |||
0xff, 0, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, 1,0xff, // 220 | |||
1,0xff, 1,0xff }; // 230 | |||
// use ctype.h functions for Latin1 (character < 0x100) | |||
int iswalpha(int c) | |||
{ | |||
if(c < 0x100) | |||
return(isalpha(c)); | |||
if(c > MAX_WALPHA) | |||
return(0); | |||
return(walpha_tab[c-0x100]); | |||
} | |||
int iswdigit(int c) | |||
{ | |||
if(c < 0x100) | |||
return(isdigit(c)); | |||
return(0); | |||
} | |||
int iswalnum(int c) | |||
{ | |||
if(iswdigit(c)) | |||
return(1); | |||
return(iswalpha(c)); | |||
} | |||
int towlower(int c) | |||
{ | |||
int x; | |||
if(c < 0x100) | |||
return(tolower(c)); | |||
if((c > MAX_WALPHA) || ((x = walpha_tab[c-0x100])==0xff)) | |||
return(c); // already lower case | |||
return(c + x); // convert to lower case | |||
} | |||
int iswupper(int c) | |||
{ | |||
int x; | |||
if(c < 0x100) | |||
return(isupper(c)); | |||
if(((c > MAX_WALPHA) || (x = walpha_tab[c-0x100])==0) || (x == 0xff)) | |||
return(0); | |||
return(1); | |||
} | |||
int iswlower(int c) | |||
{ | |||
if(c < 0x100) | |||
return(islower(c)); | |||
if((c > MAX_WALPHA) || (walpha_tab[c-0x100] != 0xff)) | |||
return(0); | |||
return(1); | |||
} | |||
int iswspace(int c) | |||
{ | |||
if(c < 0x100) | |||
return(isspace(c)); | |||
return(0); | |||
} | |||
int iswpunct(int c) | |||
{ | |||
if(c < 0x100) | |||
return(ispunct(c)); | |||
return(0); | |||
} | |||
const wchar_t *wcschr(const wchar_t *str, int c) | |||
{ | |||
while(*str != 0) | |||
{ | |||
if(*str == c) | |||
return(str); | |||
str++; | |||
} | |||
return(NULL); | |||
} | |||
const int wcslen(const wchar_t *str) | |||
{ | |||
int ix=0; | |||
while(*str != 0) | |||
{ | |||
ix++; | |||
} | |||
return(ix); | |||
} | |||
//"--voices=<langauge>\n" | |||
//"\t List the available voices for the specified language.\n" | |||
//"\t If <language> is omitted, then list all voices.\n" | |||
"-k <integer>\n" | |||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n" | |||
"\t higher values = a pitch increase (try -k20).\n"; | |||
int GetFileLength(const char *filename) | |||
@@ -285,7 +172,7 @@ void ReadVoiceNames2(char *directory) | |||
_kernel_swi_regs regs; | |||
_kernel_oserror *error; | |||
char buf[80]; | |||
char directory2[80]; | |||
char directory2[sizeof(path_home)+100]; | |||
regs.r[0] = 10; | |||
regs.r[1] = (int)directory; | |||
@@ -325,7 +212,7 @@ void ReadVoiceNames2(char *directory) | |||
void ReadVoiceNames() | |||
{//=================== | |||
char directory[80]; | |||
char directory[sizeof(path_home)+10]; | |||
for(n_voice_files=0; n_voice_files<N_VOICE_NAMES; n_voice_files++) | |||
voice_names[n_voice_files] = NULL; | |||
@@ -353,7 +240,7 @@ _kernel_swi_regs regs; | |||
void Free(void *ptr) | |||
/******************/ | |||
/*******************/ | |||
{ // version of free() for use in RISC_OS module | |||
_kernel_swi_regs regs; | |||
@@ -361,7 +248,7 @@ _kernel_swi_regs regs; | |||
return; | |||
regs.r[0] = 7; | |||
regs.r[2] = (int)ptr; | |||
regs.r[2] = (int)(ptr); | |||
_kernel_swi(0x1e, ®s, ®s); /* OS_Module 7 free memory */ | |||
} /* end of Free */ | |||
@@ -375,9 +262,12 @@ char *Alloc(int size) | |||
return(p); | |||
} | |||
void Free(void *ptr) | |||
void Free(void **ptr) | |||
{//================= | |||
free(ptr); | |||
if(ptr != NULL) | |||
{ | |||
free(ptr); | |||
} | |||
} | |||
#endif | |||
@@ -424,6 +314,7 @@ int initialise(void) | |||
WavegenInit(22050,0); | |||
LoadPhData(); | |||
SetVoiceStack(NULL); | |||
SynthesizeInit(); | |||
return(0); | |||
} | |||
@@ -447,7 +338,7 @@ void speak_text_string(char *data, int terminator, int len, int wait, int voice_ | |||
if((voice_num >= 0) && (voice_num != current_voice_num) && (voice_num < N_VOICE_NAMES)) | |||
{ | |||
LoadVoice(voice_names[voice_num],0); | |||
SetVoiceByName(voice_names[voice_num]); | |||
WavegenSetVoice(voice); | |||
} | |||
current_voice_num = voice_num; | |||
@@ -613,7 +504,7 @@ void jsd_swi_functions(int *r) | |||
case 6: /* update voice data, r1 = voice_number */ | |||
if(r[1] < N_VOICE_NAMES) | |||
{ | |||
LoadVoice(voice_names[r[1]],0); | |||
SetVoiceByName(voice_names[r[1]]); | |||
current_voice_num = r[1]; | |||
WavegenSetVoice(voice); | |||
} | |||
@@ -698,7 +589,7 @@ _kernel_oserror *swi_handler(int swi_no, int *r, void *pw) | |||
break; | |||
case 9: /* word_gap */ | |||
// not implemented | |||
SetParameter(espeakWORDGAP,value,0); | |||
break; | |||
case 10: /* pitch_range */ | |||
@@ -723,8 +614,8 @@ _kernel_oserror *swi_handler(int swi_no, int *r, void *pw) | |||
void PitchAdjust(int pitch_adjustment) | |||
{//=================================== | |||
int ix, factor; | |||
voice_t *voice = &voice_data; | |||
extern unsigned char pitch_adjust_tab[100]; | |||
extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1]; | |||
voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128; | |||
@@ -776,6 +667,7 @@ void command_line(char *arg_string, int wait) | |||
int value; | |||
int speed; | |||
int amp; | |||
int wordgap; | |||
int speaking = 0; | |||
int flag_stdin = 0; | |||
int flag_compile = 0; | |||
@@ -815,29 +707,31 @@ void command_line(char *arg_string, int wait) | |||
p++; | |||
switch(*p++) | |||
{ | |||
case 'h': | |||
printf("\n"); | |||
printf("speak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
case 'a': | |||
amp = param_number(&p); | |||
SetParameter(espeakVOLUME,amp,0); | |||
case 'b': | |||
option_multibyte = espeakCHARS_8BIT; | |||
break; | |||
case 'f': | |||
strcpy(filename,param_string(&p)); | |||
break; | |||
case 'h': | |||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
case 'k': | |||
option_capitals = param_number(&p); | |||
SetParameter(espeakCAPITALS,option_capitals,0); | |||
break; | |||
case 'l': | |||
option_linelength = param_number(&p); | |||
case 'x': | |||
option_phonemes = 1; | |||
break; | |||
case 'X': | |||
option_phonemes = 2; | |||
break; | |||
case 'm': | |||
option_ssml = 1; | |||
break; | |||
case 'p': | |||
pitch_adjustment = param_number(&p); | |||
break; | |||
@@ -846,30 +740,40 @@ void command_line(char *arg_string, int wait) | |||
option_quiet = 1; | |||
break; | |||
case 'f': | |||
strncpy0(filename,param_string(&p),sizeof(filename)); | |||
break; | |||
case 'l': | |||
option_linelength = param_number(&p); | |||
break; | |||
case 'a': | |||
amp = param_number(&p); | |||
SetParameter(espeakVOLUME,amp,0); | |||
break; | |||
case 's': | |||
speed = param_number(&p); | |||
SetParameter(espeakRATE,speed,0); | |||
break; | |||
case 'g': | |||
wordgap = param_number(&p); | |||
SetParameter(espeakWORDGAP,wordgap,0); | |||
break; | |||
case 'v': | |||
strcpy(voicename,param_string(&p)); | |||
strncpy0(voicename,param_string(&p),sizeof(voicename)); | |||
break; | |||
case 'w': | |||
option_waveout=1; | |||
strcpy(wavefile,param_string(&p)); | |||
break; | |||
case 'x': | |||
option_phonemes = 1; | |||
break; | |||
case 'X': | |||
option_phonemes = 2; | |||
strncpy0(wavefile,param_string(&p),sizeof(wavefile)); | |||
break; | |||
case '-': | |||
strcpy(command,param_string(&p)); | |||
strncpy0(command,param_string(&p),sizeof(command)); | |||
if(memcmp(command,"compile=",8)==0) | |||
{ | |||
CompileDictionary(NULL,&command[8],NULL,NULL); | |||
@@ -878,7 +782,7 @@ void command_line(char *arg_string, int wait) | |||
else | |||
if(strcmp(command,"help")==0) | |||
{ | |||
printf("\n%s\n%s",version_string,help_text); | |||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
} | |||
else | |||
@@ -912,7 +816,7 @@ void command_line(char *arg_string, int wait) | |||
} | |||
} | |||
LoadVoice(voicename,0); | |||
SetVoiceByName(voicename); | |||
if((filename[0]==0) && (p[0]=='\r')) | |||
{ | |||
@@ -1212,7 +1116,7 @@ _kernel_oserror *user_init(char *cmd_fail, int podule_base, void *pw) | |||
} | |||
ReadVoiceNames(); | |||
LoadVoice("default",0); | |||
SetVoiceByName("default"); | |||
for(param=0; param<N_SPEECH_PARAM; param++) | |||
param_stack[0].parameter[param] = param_defaults[param]; |
@@ -20,8 +20,6 @@ | |||
// Header file for RISCOS build | |||
#define N_PEAKS 9 | |||
#define N_MARKERS 7 | |||
// comment this out when compiling the "speak" process | |||
//#define SPECT_EDITOR | |||
@@ -43,32 +41,20 @@ typedef struct { | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#ifdef PLATFORM_WINDOWS | |||
#define N_PATH_HOME 220 | |||
#else | |||
#define N_PATH_HOME 150 | |||
#endif | |||
typedef struct { | |||
short pkfreq; | |||
short pkheight; | |||
short pkwidth; | |||
short pkright; | |||
} peak_t; | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
typedef struct { | |||
short frflags; | |||
unsigned char length; | |||
unsigned char rms; | |||
short ffreq[9]; | |||
unsigned char fheight[9]; | |||
unsigned char fwidth[6]; // width/4 | |||
unsigned char fright[6]; // width/4 | |||
} frame_t; | |||
extern void strncpy0(char *to,const char *from, int size); | |||
extern int GetFileLength(const char *filename); | |||
extern char *Alloc(int size); | |||
extern void Free(void *ptr); | |||
extern void strncpy0(char *to,const char *from, int size); | |||
extern char path_home[]; | |||
extern const char *version_string; | |||
extern const int version_phdata; | |||
const int wcslen(const wchar_t *str); | |||
@@ -4,6 +4,7 @@ int iswalpha(int c); | |||
int iswdigit(int c); | |||
int iswalnum(int c); | |||
int towlower(int c); | |||
int towupper(int c); | |||
int iswupper(int c); | |||
int iswlower(int c); | |||
int iswspace(int c); |
@@ -3,7 +3,7 @@ | |||
initialisation-code: user_init | |||
title-string: Speak | |||
help-string: Speak 3.25 Text to Speech (32 bit) | |||
help-string: Speak 3.30 Text to Speech (32 bit) | |||
swi-chunk-base-number: &4ad80 | |||
swi-handler-code: swi_handler |
@@ -2,7 +2,9 @@ | |||
[Setup] | |||
AppName=eSpeak | |||
AppVerName=eSpeak version 1.29.03 | |||
AppVerName=eSpeak version 1.30 | |||
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details). | |||
WindowVisible=yes | |||
DefaultDirName={pf}\eSpeak | |||
DefaultGroupName=eSpeak | |||
@@ -22,7 +24,7 @@ Name: "{app}\espeak-data\mbrola" | |||
Source: "espeak_sapi.dll"; DestDir: "{app}"; Flags: regserver promptifolder replacesameversion | |||
Source: "TTSApp.exe"; DestDir:"{app}" | |||
Source: "espeak-data\*"; DestDir: "{app}\espeak-data"; Flags: recursesubdirs | |||
Source: "dictsource2\*"; DestDir: "{app}\dictsource" | |||
Source: "dictsource\*"; DestDir: "{app}\dictsource"; Flags: recursesubdirs | |||
Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs | |||
Source: "command_line\*"; DestDir: "{app}\command_line" | |||
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme | |||
@@ -99,13 +101,15 @@ var | |||
begin | |||
lang_main := language and $3ff; | |||
Result := 'af'; | |||
Result := 'en'; | |||
// translation from microsoft codes to language codes | |||
case lang_main of | |||
$04: Result := 'zh'; | |||
$05: Result := 'cs'; | |||
$07: Result := 'de'; | |||
$08: Result := 'el'; | |||
$09: Result := 'en'; | |||
$0a: Result := 'es'; | |||
$0b: Result := 'fi'; | |||
$0c: Result := 'fr'; | |||
@@ -185,6 +189,7 @@ begin | |||
'sv': value := $41d; | |||
'sw': value := $441; | |||
'vi': value := $42a; | |||
'zh': value := $804; | |||
// mbrola voices | |||
'-af': value := $436; | |||
'-br': value := $416; | |||
@@ -356,9 +361,12 @@ begin | |||
UIVoice := VoiceFromLanguage(UILanguage); | |||
// Set initial values (optional) | |||
Page.Values[0] := 'en'; | |||
Page.Values[1] := UIVoice; | |||
Page.Values[2] := 'en-r'; | |||
Page.Values[0] := UIVoice; | |||
Page.Values[1] := UIVoice+'+f2'; | |||
if UIVoice = 'en' then | |||
Page.Values[2] := 'en-r' | |||
else | |||
Page.values[2] := 'en'; | |||
end; | |||
@@ -1,7 +1,7 @@ | |||
[Setup] | |||
AppName=eSpeakEdit | |||
AppVerName=eSpeakEdit version 1.29 | |||
AppVerName=eSpeakEdit version 1.30 | |||
DefaultDirName={pf}\eSpeak | |||
DefaultGroupName=eSpeak | |||
OutputBaseFilename=setup_espeakedit | |||
@@ -12,7 +12,7 @@ ShowLanguageDialog=auto | |||
[Files] | |||
Source: "espeakedit.exe"; DestDir: "{app}" | |||
Source: "dictsource\*"; DestDir: "{app}\dictsource"; Flags: recursesubdirs | |||
;Source: "dictsource\*"; DestDir: "{app}\dictsource"; Flags: recursesubdirs | |||
Source: "espeakedit\*"; DestDir: "{app}\espeakedit"; Flags: recursesubdirs | |||
Source: "phsource\*"; DestDir: "{app}\phsource"; Flags: recursesubdirs | |||
Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs |
@@ -5,8 +5,8 @@ | |||
// | |||
VS_VERSION_INFO VERSIONINFO | |||
FILEVERSION 1,0,24,00 | |||
PRODUCTVERSION 1,0,24,00 | |||
FILEVERSION 1,0,30,00 | |||
PRODUCTVERSION 1,0,30,00 | |||
FILEFLAGSMASK 0x3fL | |||
#ifdef _DEBUG | |||
FILEFLAGS 0x1L | |||
@@ -24,14 +24,14 @@ BEGIN | |||
VALUE "Comments", "\0" | |||
VALUE "CompanyName", "Jonathan Duddington\0" | |||
VALUE "FileDescription", "Text to Speech\0" | |||
VALUE "FileVersion", "1, 0,24,00\0" | |||
VALUE "InternalName", "espeak1.24\0" | |||
VALUE "FileVersion", "1, 0,30,00\0" | |||
VALUE "InternalName", "espeak1.30\0" | |||
VALUE "LegalCopyright", "Copyright (c) Jonathan Duddington\0" | |||
VALUE "LegalTrademarks", "\0" | |||
VALUE "OriginalFilename", "espeak_sapi.dll\0" | |||
VALUE "PrivateBuild", "\0" | |||
VALUE "ProductName", "espeak TTS\0" | |||
VALUE "ProductVersion", "1, 0, 24, 00\0" | |||
VALUE "ProductVersion", "1, 0, 30, 00\0" | |||
VALUE "SpecialBuild", "\0" | |||
END | |||
END |
@@ -654,8 +654,8 @@ int Translator::IsLetterGroup(char *word, int group, int pre) | |||
w = word; | |||
while(*p == *w) | |||
{ | |||
*w++; | |||
*p++; | |||
w++; | |||
p++; | |||
} | |||
if(*p == 0) | |||
return(w-word); // matched a complete string |
@@ -39,6 +39,8 @@ static const char *help_text = | |||
"spoken from stdin, each line separately.\n\n" | |||
"-a <integer>\n" | |||
"\t Amplitude, 0 to 200, default is 100\n" | |||
"-g <integer>\n" | |||
"\t Word gap. Pause between words, units of 10mS at the default speed\n" | |||
"-l <integer>\n" | |||
"\t Line length. If not zero (which is the default), consider\n" | |||
"\t lines less than this length as end-of-clause\n" | |||
@@ -297,6 +299,7 @@ int main (int argc, char **argv) | |||
int volume = -1; | |||
int speed = -1; | |||
int pitch = -1; | |||
int wordgap = -1; | |||
int option_capitals = -1; | |||
int option_punctuation = -1; | |||
int option_phonemes = -1; | |||
@@ -319,7 +322,7 @@ int main (int argc, char **argv) | |||
while(true) | |||
{ | |||
c = getopt_long (argc, argv, "a:bf:hk:l:mp:qs:v:w:xXz", | |||
c = getopt_long (argc, argv, "a:bf:g:hk:l:mp:qs:v:w:xXz", | |||
long_options, &option_index); | |||
/* Detect the end of the options. */ | |||
@@ -378,6 +381,10 @@ int main (int argc, char **argv) | |||
speed = atoi(optarg); | |||
break; | |||
case 'g': | |||
wordgap = atoi(optarg); | |||
break; | |||
case 'v': | |||
strncpy0(voicename,optarg,sizeof(voicename)); | |||
break; | |||
@@ -474,6 +481,8 @@ int main (int argc, char **argv) | |||
espeak_SetParameter(espeakCAPITALS,option_capitals,0); | |||
if(option_punctuation >= 0) | |||
espeak_SetParameter(espeakPUNCTUATION,option_punctuation,0); | |||
if(wordgap >= 0) | |||
espeak_SetParameter(espeakWORDGAP,wordgap,0); | |||
if(option_linelength > 0) | |||
espeak_SetParameter(espeakLINELENGTH,option_linelength,0); | |||
if(option_punctuation == 2) |
@@ -272,36 +272,59 @@ typedef struct { | |||
unsigned char tail_shape; | |||
} TONE_TABLE; | |||
#define N_TONE_TABLE 15 | |||
#define N_TONE_TABLE 11 | |||
static TONE_TABLE tone_table[N_TONE_TABLE] = { | |||
{PITCHfall, 30, 5, PITCHfall, 30, 8, // statement | |||
{PITCHfall, 30, 5, PITCHfall, 30, 8, // 0 statement | |||
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 12, 7, 0}, | |||
{PITCHfrise, 37,10, PITCHfrise2, 35,10, // comma | |||
20, 25, 34, 20, drops_0, 3, 3, 5, oflow, NULL, 15, 24, 0}, | |||
{PITCHfrise, 35,8, PITCHfrise2, 35,10, // 1 comma | |||
20, 25, 34, 20, drops_0, 3, 3, 5, oflow, NULL, 15, 23, 0}, | |||
{PITCHfrise, 39,10, PITCHfrise2, 36,10, // question | |||
20, 25, 34, 20, drops_0, 3, 3, 5, oflow, NULL, 15, 29, 0}, | |||
{PITCHfrise, 39,10, PITCHfrise2, 36,10, // 2 question | |||
20, 25, 34, 20, drops_0, 3, 3, 5, oflow, NULL, 15, 28, 0}, | |||
{PITCHfall, 41, 4, PITCHfall, 41, 27, // exclamation | |||
20, 25, 34, 24, drops_0, 3, 4, 5, oflow_emf, back_emf, 16, 5, 0}, | |||
{PITCHfall, 41, 4, PITCHfall, 41, 27, // 3 exclamation | |||
20, 25, 34, 24, drops_0, 3, 4, 5, oflow_emf, back_emf, 16, 4, 0}, | |||
{PITCHfall, 38, 2, PITCHfall, 42, 30, // statement, emphatic | |||
{PITCHfall, 38, 2, PITCHfall, 42, 30, // 4 statement, emphatic | |||
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 15, 5, 0}, | |||
{PITCHfall, 28, 6, PITCHfall, 28, 10, // statement, less intonation | |||
{PITCHfall, 28, 6, PITCHfall, 28, 10, // 5 statement, less intonation | |||
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 12, 6, 0}, | |||
{PITCHfrise2, 34,12, PITCHfall, 28,10, // comma, less intonation | |||
{PITCHfrise2, 33,11, PITCHfall, 28,10, // 6 comma, less intonation | |||
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 9,14, 0}, | |||
{PITCHfrise2, 28, 7, PITCHfall, 28, 12, // 7 comma, less intonation, less rise | |||
20, 25, 30, 22, drops_0, 4, 3, 5, oflow_less, NULL, 14, 8, 0}, | |||
{PITCHrise, 30, 20, PITCHfall, 19, 14, // 8 pitch raises at end of sentence | |||
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 24, 30, 0}, | |||
{PITCHfrise, 35,11, PITCHfrise2, 32,10, // 9 comma | |||
20, 25, 34, 20, drops_0, 3, 3, 5, oflow, NULL, 19, 24, 0}, | |||
{PITCHfrise, 39, 15, PITCHfall, 28, 14, // 10 question | |||
20, 25, 34, 22, drops_0, 3, 3, 5, oflow, NULL, 20, 36, 0}, | |||
}; | |||
/* index by 0=. 1=, 2=?, 3=! 4=none, 5=emphasized */ | |||
unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS] = { | |||
{0,1,2,3,0,4}, | |||
{0,1,2,3,0,4}, | |||
{5,6,2,0,0,4}, | |||
{5,7,1,0,0,4}, | |||
{8,9,10,3,0,0}, | |||
{8,8,10,3,0,0}, | |||
{0,1,2,3,0,4}, | |||
{0,1,2,3,0,0} }; | |||
/* indexed by stress */ | |||
static int min_drop[] = {0x300,0x300,0x400,0x400,0x900,0x900,0x900,0xb00}; | |||
@@ -332,13 +355,11 @@ static void count_pitch_vowels(int start, int end, int clause_end) | |||
int max_stress = 0; | |||
int max_stress_posn = 0; // last syllable ot the highest stress | |||
int max_stress_posn2 = 0; // penuntimate syllable of the highest stress | |||
int last2_primary; | |||
number_pre = -1; /* number of vowels before 1st primary stress */ | |||
number_body = 0; | |||
number_tail = 0; /* number between tonic syllable and next primary */ | |||
last_primary = -1; | |||
last2_primary = 0; | |||
for(ix=start; ix<end; ix++) | |||
{ | |||
@@ -652,13 +673,10 @@ static int calc_pitches(int start, int end, int group_tone) | |||
/* body of tonic segment */ | |||
/*************************/ | |||
if(option_tone2 & 1) | |||
{ | |||
static int count=0; | |||
count++; | |||
//if(count & 1) | |||
tone_posn = tone_posn2; // TEST put tone on the penultimate stressed word | |||
} | |||
if(option_tone_flags & OPTION_EMPHASIZE_PENULTIMATE) | |||
{ | |||
tone_posn = tone_posn2; // put tone on the penultimate stressed word | |||
} | |||
ix = calc_pitch_segment(ix,tone_posn, t, PRIMARY, continuing); | |||
if(no_tonic) | |||
@@ -884,18 +902,18 @@ void Translator::CalcPitches(int clause_type) | |||
syllable_tab = syllable_tab2; // don't use permanent storage. it's only needed during the call of CalcPitches() | |||
if(langopts.intonation == 1) | |||
if(langopts.tone_language == 1) | |||
{ | |||
CalcPitches_Tone(clause_type); | |||
return; | |||
} | |||
option = option_tone1 & 0xf; | |||
if(option > 4) | |||
option = langopts.intonation_group; | |||
if(option > INTONATION_TYPES) | |||
option = 0; | |||
group_tone_emph = group_tone = punct_to_tone[option][clause_type]; | |||
group_tone = punct_to_tone[option][clause_type]; | |||
group_tone_emph = punct_to_tone[option][5]; // emphatic form of statement | |||
if(clause_type == 4) |
@@ -526,6 +526,10 @@ void Translator::MakePhonemeList(int post_pause, int start_sentence) | |||
{ | |||
insert_ph = pause_phonemes[x]; | |||
} | |||
if(option_wordgap > 0) | |||
{ | |||
insert_ph = phonPAUSE_LONG; | |||
} | |||
} | |||
next2 = phoneme_tab[(plist2+2)->phcode]; | |||
@@ -590,6 +594,11 @@ void Translator::MakePhonemeList(int post_pause, int start_sentence) | |||
} | |||
phlist[ix].length = ph->std_length; | |||
if((ph->code == phonPAUSE_LONG) && (option_wordgap > 0)) | |||
{ | |||
phlist[ix].ph = phoneme_tab[phonPAUSE_SHORT]; | |||
phlist[ix].length = option_wordgap*14; // 10mS per unit at the default speed | |||
} | |||
if(ph->type==phVOWEL || ph->type==phLIQUID || ph->type==phNASAL || ph->type==phVSTOP || ph->type==phVFRICATIVE) | |||
{ |
@@ -138,12 +138,17 @@ int speech_parameters[N_SPEECH_PARAM]; // current values, from param_stack | |||
const int param_defaults[N_SPEECH_PARAM] = { | |||
0, // silence (internal use) | |||
165, // rate wpm | |||
170, // rate wpm | |||
100, // volume | |||
50, // pitch | |||
50, // range | |||
0, // punctuation | |||
0, // capital letters | |||
0, // wordgap | |||
0, // options | |||
0, // intonation | |||
0, | |||
0, | |||
0, // emphasis | |||
0, // line length | |||
0, // voice type |
@@ -209,14 +209,18 @@ void SetParameter(int parameter, int value, int relative) | |||
embedded_value[EMBED_R] = new_value; | |||
break; | |||
case espeakPUNCTUATION: | |||
case espeakLINELENGTH: | |||
option_linelength = new_value; | |||
break; | |||
case espeakCAPITALS: | |||
case espeakWORDGAP: | |||
option_wordgap = new_value; | |||
break; | |||
case espeakLINELENGTH: | |||
option_linelength = new_value; | |||
case espeakINTONATION: | |||
if((new_value & 0xff) != 0) | |||
translator->langopts.intonation_group = new_value & 0xff; | |||
option_tone_flags = new_value; | |||
break; | |||
default: |
@@ -65,6 +65,8 @@ static const char *help_text = | |||
"spoken from stdin, each line separately.\n\n" | |||
"-a <integer>\n" | |||
"\t Amplitude, 0 to 200, default is 100\n" | |||
"-g <integer>\n" | |||
"\t Word gap. Pause between words, units of 10mS at the default speed\n" | |||
"-l <integer>\n" | |||
"\t Line length. If not zero (which is the default), consider\n" | |||
"\t lines less than this length as end-of-clause\n" | |||
@@ -373,6 +375,7 @@ int main (int argc, char **argv) | |||
int ix; | |||
char *optarg2; | |||
int amp = 100; // default | |||
int wordgap = 0; | |||
int speaking = 0; | |||
int quiet = 0; | |||
int flag_stdin = 0; | |||
@@ -390,6 +393,7 @@ int main (int argc, char **argv) | |||
option_linelength = 0; | |||
option_phonemes = 0; | |||
option_waveout = 0; | |||
option_wordgap = 0; | |||
option_multibyte = espeakCHARS_AUTO; // auto | |||
f_trans = stdout; | |||
@@ -449,7 +453,7 @@ int main (int argc, char **argv) | |||
#else | |||
while(true) | |||
{ | |||
c = getopt_long (argc, argv, "a:bf:hk:l:p:qs:v:w:xXm", | |||
c = getopt_long (argc, argv, "a:bf:g:hk:l:p:qs:v:w:xXm", | |||
long_options, &option_index); | |||
/* Detect the end of the options. */ | |||
@@ -512,6 +516,10 @@ int main (int argc, char **argv) | |||
speed = atoi(optarg2); | |||
break; | |||
case 'g': | |||
wordgap = atoi(optarg2); | |||
break; | |||
case 'v': | |||
strncpy0(voicename,optarg2,sizeof(voicename)); | |||
break; | |||
@@ -597,6 +605,7 @@ int main (int argc, char **argv) | |||
SetParameter(espeakVOLUME,amp,0); | |||
SetParameter(espeakCAPITALS,option_capitals,0); | |||
SetParameter(espeakPUNCTUATION,option_punctuation,0); | |||
SetParameter(espeakWORDGAP,wordgap,0); | |||
if(pitch_adjustment != 50) | |||
{ |
@@ -306,7 +306,7 @@ static void init_path(const char *path) | |||
sprintf(path_home,"%s\\espeak-data",buf); | |||
#else | |||
// char *env; | |||
char *env; | |||
if(path != NULL) | |||
{ | |||
@@ -314,12 +314,13 @@ static void init_path(const char *path) | |||
return; | |||
} | |||
// if((env = getenv("ESPEAK_DATA_PATH")) != NULL) | |||
// { | |||
// snprintf(path_home,sizeof(path_home),"%s/espeak-data",env); | |||
// if(GetFileLength(path_home) == -2) | |||
// return; // an espeak-data directory exists | |||
// } | |||
// check for environment variable | |||
if((env = getenv("ESPEAK_DATA_PATH")) != NULL) | |||
{ | |||
snprintf(path_home,sizeof(path_home),"%s/espeak-data",env); | |||
if(GetFileLength(path_home) == -2) | |||
return; // an espeak-data directory exists | |||
} | |||
snprintf(path_home,sizeof(path_home),"%s/espeak-data",getenv("HOME")); | |||
if(access(path_home,R_OK) != 0) | |||
@@ -335,7 +336,7 @@ static int initialise(void) | |||
int result; | |||
#ifndef __WIN32__ | |||
LoadConfig(); // causes problem on Windows, don't know why | |||
LoadConfig(); | |||
#endif | |||
WavegenInit(22050,0); // 22050 | |||
if((result = LoadPhData()) != 1) | |||
@@ -710,6 +711,7 @@ ENTER("espeak_Initialize"); | |||
SetParameter(espeakVOLUME,100,0); | |||
SetParameter(espeakCAPITALS,option_capitals,0); | |||
SetParameter(espeakPUNCTUATION,option_punctuation,0); | |||
SetParameter(espeakWORDGAP,0,0); | |||
DoVoiceChange(voice); | |||
#ifdef USE_ASYNC |
@@ -27,11 +27,14 @@ | |||
#include <stdio.h> | |||
#define ESPEAK_API_REVISION 2 | |||
#define ESPEAK_API_REVISION 3 | |||
/* | |||
Revision 2 | |||
Added parameter "options" to eSpeakInitialize() | |||
Revision 3 | |||
Added espeakWORDGAP to espeak_PARAMETER | |||
*/ | |||
/********************/ | |||
/* Initialization */ | |||
@@ -332,7 +335,6 @@ espeak_ERROR espeak_Char(wchar_t character); | |||
EE_INTERNAL_ERROR. | |||
*/ | |||
/* Note, there is no function to play a sound icon. This would be done by the calling program */ | |||
@@ -342,12 +344,18 @@ espeak_ERROR espeak_Char(wchar_t character); | |||
typedef enum { | |||
espeakSILENCE=0, /* internal use */ | |||
espeakRATE, | |||
espeakVOLUME, | |||
espeakPITCH, | |||
espeakRANGE, | |||
espeakPUNCTUATION, | |||
espeakCAPITALS, | |||
espeakRATE=1, | |||
espeakVOLUME=2, | |||
espeakPITCH=3, | |||
espeakRANGE=4, | |||
espeakPUNCTUATION=5, | |||
espeakCAPITALS=6, | |||
espeakWORDGAP=7, | |||
espeakOPTIONS=8, // reserved for misc. options. not yet used | |||
espeakINTONATION=9, | |||
espeakRESERVED1=10, | |||
espeakRESERVED2=11, | |||
espeakEMPHASIS, /* internal use */ | |||
espeakLINELENGTH, /* internal use */ | |||
espeakVOICETYPE, // internal, 1=mbrola | |||
@@ -379,7 +387,7 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela | |||
espeakPUNCTUATION: which punctuation characters to announce: | |||
value in espeak_PUNCT_TYPE (none, all, some), | |||
see espeak_GetParameter() to specify which characters are announced. | |||
see espeak_GetParameter() to specify which characters are announced. | |||
espeakCAPITALS: announce capital letters by: | |||
0=none, | |||
@@ -388,6 +396,8 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela | |||
3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch | |||
of a word raised to indicate it has a capital letter. | |||
espeakWORDGAP: pause between words, units of 10mS (at the default speed) | |||
Return: EE_OK: operation achieved | |||
EE_BUFFER_FULL: the command can not be buffered; | |||
you may try after a while to call the function again. |
@@ -29,9 +29,9 @@ | |||
#include "speech.h" | |||
#include "speak_lib.h" | |||
#include "voice.h" | |||
#include "phoneme.h" | |||
#include "synthesize.h" | |||
#include "voice.h" | |||
#include "translate.h" | |||
#define os_X 0x20000 | |||
@@ -64,10 +64,11 @@ extern int current_source_index; | |||
FILE *f_text; | |||
int (* uri_callback)(int, const char *, const char *) = NULL; | |||
int (* phoneme_callback)(const char *) = NULL; | |||
int amp = 8; // default | |||
char path_home[80] = ""; | |||
char path_home[N_PATH_HOME] = ""; | |||
char wavefile[120]; | |||
char textbuffile[L_tmpnam]; | |||
int sample_rate_index; // current value | |||
@@ -80,7 +81,7 @@ static void *module_data; | |||
static int callback_inhibit = 0; | |||
static int more_text=0; | |||
#define N_VOICE_NAMES 40 | |||
#define N_VOICE_NAMES 60 | |||
static char *voice_names[40]; | |||
#define N_STATIC_BUF 8000 | |||
@@ -94,11 +95,13 @@ USHORT voice_pcnt[N_PEAKS+1][3]; | |||
static const char *help_text = | |||
"\nspeak [options] [\"<words>\"]\n\n" | |||
"-f <text file> Text file to speak\n" | |||
"--stdin Read text input from stdin instead of a file\n\n" | |||
//"--stdin Read text input from stdin instead of a file\n\n" | |||
"If neither -f nor --stdin, <words> are spoken, or if none then text is\n" | |||
"spoken from stdin, each line separately.\n\n" | |||
"-a <integer>\n" | |||
"\t Amplitude, 0 to 200, default is 100\n" | |||
"-g <integer>\n" | |||
"\t Word gap. Pause between words, units of 10mS at the default speed\n" | |||
"-l <integer>\n" | |||
"\t Line length. If not zero (which is the default), consider\n" | |||
"\t lines less than this length as end-of-clause\n" | |||
@@ -115,16 +118,19 @@ static const char *help_text = | |||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n" | |||
"-x\t Write phoneme mnemonics to stdout\n" | |||
"-X\t Write phonemes mnemonics and translation trace to stdout\n" | |||
"--stdout Write speech output to stdout\n" | |||
//"--stdout Write speech output to stdout\n" | |||
"--compile=<voice name>\n" | |||
"\t Compile the pronunciation rules and dictionary in the current\n" | |||
"\t directory. =<voice name> is optional and specifies which language\n" | |||
"--punct=\"<characters>\"\n" | |||
"\t Speak the names of punctuation characters during speaking. If\n" | |||
"\t =<characters> is omitted, all punctuation is spoken.\n" | |||
"--voices=<langauge>\n" | |||
"\t List the available voices for the specified language.\n" | |||
"\t If <language> is omitted, then list all voices.\n"; | |||
//"--voices=<langauge>\n" | |||
//"\t List the available voices for the specified language.\n" | |||
//"\t If <language> is omitted, then list all voices.\n" | |||
"-k <integer>\n" | |||
"\t Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n" | |||
"\t higher values = a pitch increase (try -k20).\n"; | |||
int GetFileLength(const char *filename) | |||
@@ -583,7 +589,7 @@ _kernel_oserror *swi_handler(int swi_no, int *r, void *pw) | |||
break; | |||
case 9: /* word_gap */ | |||
// not implemented | |||
SetParameter(espeakWORDGAP,value,0); | |||
break; | |||
case 10: /* pitch_range */ | |||
@@ -608,8 +614,8 @@ _kernel_oserror *swi_handler(int swi_no, int *r, void *pw) | |||
void PitchAdjust(int pitch_adjustment) | |||
{//=================================== | |||
int ix, factor; | |||
voice_t *voice = &voice_data; | |||
extern unsigned char pitch_adjust_tab[100]; | |||
extern unsigned char pitch_adjust_tab[MAX_PITCH_VALUE+1]; | |||
voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128; | |||
@@ -661,6 +667,7 @@ void command_line(char *arg_string, int wait) | |||
int value; | |||
int speed; | |||
int amp; | |||
int wordgap; | |||
int speaking = 0; | |||
int flag_stdin = 0; | |||
int flag_compile = 0; | |||
@@ -700,32 +707,31 @@ void command_line(char *arg_string, int wait) | |||
p++; | |||
switch(*p++) | |||
{ | |||
case 'h': | |||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
case 'b': | |||
option_multibyte = espeakCHARS_8BIT; | |||
break; | |||
case 'a': | |||
amp = param_number(&p); | |||
SetParameter(espeakVOLUME,amp,0); | |||
break; | |||
case 'f': | |||
strncpy0(filename,param_string(&p),sizeof(filename)); | |||
break; | |||
case 'h': | |||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
case 'k': | |||
option_capitals = param_number(&p); | |||
SetParameter(espeakCAPITALS,option_capitals,0); | |||
break; | |||
case 'l': | |||
option_linelength = param_number(&p); | |||
case 'x': | |||
option_phonemes = 1; | |||
break; | |||
case 'X': | |||
option_phonemes = 2; | |||
break; | |||
case 'm': | |||
option_ssml = 1; | |||
break; | |||
case 'p': | |||
pitch_adjustment = param_number(&p); | |||
break; | |||
@@ -734,11 +740,29 @@ void command_line(char *arg_string, int wait) | |||
option_quiet = 1; | |||
break; | |||
case 'f': | |||
strncpy0(filename,param_string(&p),sizeof(filename)); | |||
break; | |||
case 'l': | |||
option_linelength = param_number(&p); | |||
break; | |||
case 'a': | |||
amp = param_number(&p); | |||
SetParameter(espeakVOLUME,amp,0); | |||
break; | |||
case 's': | |||
speed = param_number(&p); | |||
SetParameter(espeakRATE,speed,0); | |||
break; | |||
case 'g': | |||
wordgap = param_number(&p); | |||
SetParameter(espeakWORDGAP,wordgap,0); | |||
break; | |||
case 'v': | |||
strncpy0(voicename,param_string(&p),sizeof(voicename)); | |||
break; | |||
@@ -748,14 +772,6 @@ void command_line(char *arg_string, int wait) | |||
strncpy0(wavefile,param_string(&p),sizeof(wavefile)); | |||
break; | |||
case 'x': | |||
option_phonemes = 1; | |||
break; | |||
case 'X': | |||
option_phonemes = 2; | |||
break; | |||
case '-': | |||
strncpy0(command,param_string(&p),sizeof(command)); | |||
if(memcmp(command,"compile=",8)==0) | |||
@@ -766,7 +782,7 @@ void command_line(char *arg_string, int wait) | |||
else | |||
if(strcmp(command,"help")==0) | |||
{ | |||
printf("\nspeak text-to-speech: %s\n%s",version,help_text); | |||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||
return; | |||
} | |||
else |
@@ -35,8 +35,8 @@ | |||
#include "translate.h" | |||
#include "wave.h" | |||
const char *version_string = "1.29.29 20.Dec.07"; | |||
const int version_phdata = 0x012924; | |||
const char *version_string = "1.30 31.Dec.07"; | |||
const int version_phdata = 0x013000; | |||
int option_device_number = -1; | |||
@@ -43,7 +43,7 @@ Translator_English::Translator_English() : Translator() | |||
langopts.stress_rule = 0; | |||
langopts.numbers = 0x41 + NUM_ROMAN; | |||
langopts.param[LOPT_COMBINE_WORDS] = 5; // allow "mc" to cmbine with the following word | |||
langopts.param[LOPT_COMBINE_WORDS] = 2; // allow "mc" to cmbine with the following word | |||
} | |||
@@ -112,8 +112,8 @@ Translator *SelectTranslator(const char *name) | |||
case L('c','y'): // Welsh | |||
{ | |||
static const short stress_lengths_cy[8] = {170,230, 190,190, 0, 0, 250,270}; | |||
static const unsigned char stress_amps_cy[8] = {16,15, 18,18, 0,0, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable | |||
static const short stress_lengths_cy[8] = {170,220, 180,180, 0, 0, 250,270}; | |||
static const unsigned char stress_amps_cy[8] = {17,15, 18,18, 0,0, 22,20 }; // 'diminished' is used to mark a quieter, final unstressed syllable | |||
tr = new Translator(); | |||
SetupTranslator(tr,stress_lengths_cy,stress_amps_cy); | |||
@@ -121,6 +121,7 @@ Translator *SelectTranslator(const char *name) | |||
tr->charset_a0 = charsets[14]; // ISO-8859-14 | |||
// tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable | |||
tr->langopts.stress_rule = 2; | |||
// tr->langopts.intonation_group = 4; | |||
// 'diminished' is an unstressed final syllable | |||
tr->langopts.stress_flags = 0x6 | 0x10; | |||
@@ -261,8 +262,7 @@ Translator *SelectTranslator(const char *name) | |||
SetLetterVowel(tr,'y'); | |||
tr->langopts.max_initial_consonants = 2; | |||
tr->langopts.spelling_stress = 1; | |||
tr->punct_to_tone[0][1] = 0; // don't raise pitch for comma | |||
// tr->punct_to_tone[0][2] = 0; // don't raise pitch for question | |||
tr->langopts.intonation_group = 3; // less intonation, don't raise pitch at comma | |||
} | |||
break; | |||
@@ -503,7 +503,6 @@ SetLengthMods(tr,3); // all equal | |||
tr->langopts.stress_rule = 3; // stress on final syllable | |||
tr->langopts.stress_flags = 0x6 | 0x10 | 0x20000; | |||
tr->langopts.numbers = 0xa69 + 0x2000 + NUM_ROMAN; | |||
tr->punct_to_tone[0][3] = 2; // use exclamation intonation | |||
SetLetterVowel(tr,'y'); | |||
} | |||
break; | |||
@@ -607,8 +606,8 @@ SetLengthMods(tr,3); // all equal | |||
tr->langopts.stress_rule = 6; // stress on last heaviest syllable, excluding final syllable | |||
tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable | |||
tr->langopts.numbers = 0x811; | |||
tr->langopts.numbers2 = 0x100; | |||
// tr->langopts.numbers = 0x811; | |||
// tr->langopts.numbers2 = 0x100; | |||
tr->letter_bits_offset = OFFSET_TAMIL; | |||
memset(tr->letter_bits,0,sizeof(tr->letter_bits)); | |||
@@ -663,7 +662,7 @@ SetLengthMods(tr,3); // all equal | |||
tr->langopts.vowel_pause = 4; | |||
tr->letter_groups[0] = vowels_vi; | |||
// tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words | |||
tr->langopts.intonation = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() | |||
tr->langopts.tone_language = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() | |||
tr->langopts.unstressed_wd1 = 2; | |||
} | |||
@@ -681,7 +680,7 @@ SetLengthMods(tr,3); // all equal | |||
tr->langopts.stress_rule = 3; // stress on final syllable of a "word" | |||
tr->langopts.stress_flags = 1; // don't automatically set diminished stress (may be set in the intonation module) | |||
tr->langopts.vowel_pause = 0; | |||
tr->langopts.intonation = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() | |||
tr->langopts.tone_language = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() | |||
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable | |||
tr->langopts.tone_numbers = 1; // a number after letters indicates a tone number (eg. pinyin or jyutping) | |||
tr->langopts.ideographs = 1; |
@@ -44,6 +44,7 @@ static char translator2_language[20] = {0}; | |||
FILE *f_trans = NULL; // phoneme output text | |||
int option_tone1 = 0; | |||
int option_tone2 = 0; | |||
int option_tone_flags = 0; // bit 8=emphasize allcaps, bit 9=emphasize penultimate stress | |||
int option_phonemes = 0; | |||
int option_phoneme_events = 0; | |||
int option_quiet = 0; | |||
@@ -53,10 +54,10 @@ int option_punctuation = 0; | |||
int option_sayas = 0; | |||
int option_sayas2 = 0; // used in translate_clause() | |||
int option_emphasis = 0; // 0=normal, 1=normal, 2=weak, 3=moderate, 4=strong | |||
int option_emphasize_allcaps = 0; | |||
int option_ssml = 0; | |||
int option_phoneme_input = 1; // allow [[phonemes]] in input | |||
int option_phoneme_variants = 0; // 0= don't display phoneme variant mnemonics | |||
int option_wordgap = 0; | |||
int count_sayas_digits; | |||
int skip_sentences; | |||
@@ -339,14 +340,6 @@ unsigned char *length_mod_tabs[6] = { | |||
}; | |||
/* index by 0=. 1=, 2=?, 3=! 4=none, 5=emphasized */ | |||
static unsigned char punctuation_to_tone[4][6] = { | |||
{0,1,2,3,0,4}, | |||
{5,6,2,0,0,4}, | |||
{0,1,2,3,0,0}, | |||
{0,1,2,3,0,0} }; | |||
void SetLengthMods(Translator *tr, int value) | |||
{//========================================== | |||
int value2; | |||
@@ -457,7 +450,6 @@ Translator::Translator() | |||
langopts.decimal_sep = '.'; | |||
memcpy(punct_to_tone,punctuation_to_tone,sizeof(punct_to_tone)); | |||
// punct_to_tone[0][3] = 0; // exclamation, use period until we can improve the exclamation intonation | |||
} | |||
@@ -706,7 +698,7 @@ if((wmark > 0) && (wmark < 8)) | |||
if((wflags & FLAG_ALL_UPPER) && (word_length > 1) && (clause_lower_count > 3) && iswalpha(first_char)) | |||
{ | |||
if((option_emphasize_allcaps) && !(dictionary_flags[0] & FLAG_ABBREV)) | |||
if((option_tone_flags & OPTION_EMPHASIZE_ALLCAPS) && !(dictionary_flags[0] & FLAG_ABBREV)) | |||
{ | |||
// emphasize words which are in capitals | |||
emphasize_allcaps = FLAG_EMPHASIZED; |
@@ -332,7 +332,8 @@ typedef struct { | |||
int max_roman; | |||
int thousands_sep; | |||
int decimal_sep; | |||
int intonation; // 1=tone language | |||
int tone_language; // 1=tone language | |||
int intonation_group; | |||
int long_stop; // extra mS pause for a lengthened stop | |||
int phoneme_change; // TEST, change phonemes, after translation | |||
char max_initial_consonants; | |||
@@ -395,7 +396,9 @@ public: | |||
const wchar_t *letter_groups[8]; | |||
/* index1=option, index2 by 0=. 1=, 2=?, 3=! 4=none */ | |||
unsigned char punct_to_tone[4][5]; | |||
#define INTONATION_TYPES 8 | |||
#define PUNCT_INTONATIONS 6 | |||
unsigned char punct_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS]; | |||
char *data_dictrules; // language_1 translation rules file | |||
char *data_dictlist; // language_2 dictionary lookup file | |||
@@ -486,6 +489,9 @@ protected: | |||
extern int option_tone1; | |||
extern int option_tone2; | |||
#define OPTION_EMPHASIZE_ALLCAPS 0x100 | |||
#define OPTION_EMPHASIZE_PENULTIMATE 0x200 | |||
extern int option_tone_flags; | |||
extern int option_waveout; | |||
extern int option_quiet; | |||
extern int option_phonemes; | |||
@@ -500,6 +506,7 @@ extern int option_ssml; | |||
extern int option_phoneme_input; // allow [[phonemes]] in input text | |||
extern int option_phoneme_variants; | |||
extern int option_sayas; | |||
extern int option_wordgap; | |||
extern int count_characters; | |||
extern int count_words; | |||
@@ -519,7 +526,8 @@ extern char *namedata; | |||
extern char skip_marker[N_MARKER_LENGTH]; | |||
#define N_PUNCTLIST 60 | |||
extern wchar_t option_punctlist[N_PUNCTLIST]; | |||
extern wchar_t option_punctlist[N_PUNCTLIST]; // which punctuation characters to announce | |||
extern unsigned char punctuation_to_tone[INTONATION_TYPES][PUNCT_INTONATIONS]; | |||
extern int speech_parameters[]; | |||
@@ -43,6 +43,7 @@ typedef struct { | |||
short freq[N_PEAKS]; // 100% = 256 | |||
short height[N_PEAKS]; // 100% = 256 | |||
short width[N_PEAKS]; // 100% = 256 | |||
short freqadd[N_PEAKS]; // Hz | |||
// copies without temporary adjustments from embedded commands | |||
short freq2[N_PEAKS]; // 100% = 256 |
@@ -382,6 +382,7 @@ void VoiceReset(int tone_only) | |||
voice->width[pk] = 256; | |||
voice->breath[pk] = 0; | |||
voice->breathw[pk] = breath_widths[pk]; // default breath formant woidths | |||
voice->freqadd[pk] = 0; | |||
// adjust formant smoothing depending on sample rate | |||
formant_rate[pk] = (formant_rate_22050[pk] * 22050)/samplerate; | |||
@@ -416,8 +417,9 @@ static void VoiceFormant(char *p) | |||
int freq = 100; | |||
int height = 100; | |||
int width = 100; | |||
int freqadd = 0; | |||
ix = sscanf(p,"%d %d %d %d",&formant,&freq,&height,&width); | |||
ix = sscanf(p,"%d %d %d %d %d",&formant,&freq,&height,&width,&freqadd); | |||
if(ix < 2) | |||
return; | |||
@@ -430,6 +432,7 @@ static void VoiceFormant(char *p) | |||
voice->height[formant] = int(height * 2.56001); | |||
if(width >= 0) | |||
voice->width[formant] = int(width * 2.56001); | |||
voice->freqadd[formant] = freqadd; | |||
} | |||
@@ -581,6 +584,7 @@ voice_t *LoadVoice(const char *vname, int control) | |||
*p = 0; // remove previous variant name | |||
sprintf(buf,"+%s",&vname[3]); // omit !v/ from the variant filename | |||
strcat(voice_identifier,buf); | |||
langopts = &translator->langopts; | |||
} | |||
VoiceReset(tone_only); | |||
@@ -719,7 +723,7 @@ voice_t *LoadVoice(const char *vname, int control) | |||
break; | |||
case V_INTONATION: // intonation | |||
sscanf(p,"%d %d",&option_tone1,&option_tone2); | |||
sscanf(p,"%d %d",&langopts->intonation_group,&option_tone2); | |||
break; | |||
case V_DICTRULES: // conditional dictionary rules and list entries |
@@ -1713,9 +1713,9 @@ if(option_log_frames) | |||
length4 = length2/4; | |||
for(ix=0; ix<N_PEAKS; ix++) | |||
{ | |||
peaks[ix].freq1 = (fr1->ffreq[ix] * v->freq[ix]) << 8; | |||
peaks[ix].freq1 = (fr1->ffreq[ix] * v->freq[ix] + v->freqadd[ix]*256) << 8; | |||
peaks[ix].freq = int(peaks[ix].freq1); | |||
next = (fr2->ffreq[ix] * v->freq[ix]) << 8; | |||
next = (fr2->ffreq[ix] * v->freq[ix] + v->freqadd[ix]*256) << 8; | |||
peaks[ix].freq_inc = ((next - peaks[ix].freq1) * (STEPSIZE/4)) / length4; // lower headroom for fixed point math | |||
peaks[ix].height1 = (fr1->fheight[ix] * v->height[ix]) << 6; |