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
kanaän kA:nA:an | kanaän kA:nA:an | ||||
kenia ki:nia | kenia ki:nia | ||||
kimberley kimb@rli | kimberley kimb@rli | ||||
milaan $2 | |||||
knysna neIsna | |||||
kongo kONgu | kongo kONgu | ||||
knysna neIsna | |||||
lesotho l@sutu | lesotho l@sutu | ||||
limpopo l@mpo@po@ | |||||
macedonië mas@d'o@ni@ | |||||
majuba maj'uba | |||||
mauritius mOr'iSjWs | |||||
milaan $2 | |||||
mesopotamië mEsuput'A:mi@ | mesopotamië mEsuput'A:mi@ | ||||
montagu mOnt@ky | |||||
moorreesburg mur'e@sbWrx2 | |||||
mosambiek musamb'ik | mosambiek musamb'ik | ||||
(thaba nchu) tab'A:||ntSu | (thaba nchu) tab'A:||ntSu | ||||
europa Y@r'o@pa | europa Y@r'o@pa | ||||
marlise marl'i:s | marlise marl'i:s | ||||
martha marta | martha marta | ||||
martin m'A:rt@n | martin m'A:rt@n | ||||
matthéüs mat'i:Ws | |||||
melanie m@lA:ni | melanie m@lA:ni | ||||
meraai m@rAI | meraai m@rAI | ||||
messias m@sijas | |||||
michelle miS'&l | michelle miS'&l | ||||
michiel $2 | michiel $2 | ||||
miriam mIri@m | miriam mIri@m | ||||
mohammed muh'am@t | mohammed muh'am@t | ||||
mostert m'Ost@rt | mostert m'Ost@rt | ||||
mouton mut'On | |||||
mozart mo@tsart | mozart mo@tsart | ||||
naomi na_'o@mi | naomi na_'o@mi | ||||
napoleon nap'o@liOn | |||||
natasha n%at'aSa | natasha n%at'aSa | ||||
naudé nOd'e@ | naudé nOd'e@ | ||||
neil _^_EN | neil _^_EN | ||||
// main word list | // main word list | ||||
aandster A:ntst&r | |||||
aangaande $2 | aangaande $2 | ||||
aanstaande $2 | aanstaande $2 | ||||
adagio ad'A:dZi;%@U | adagio ad'A:dZi;%@U | ||||
kunsmatige kWnsm'A:t@x2@ | kunsmatige kWnsm'A:t@x2@ | ||||
kwansuis $2 | kwansuis $2 | ||||
latere l'A:t@r@ | |||||
lekkerder l&k@rd@r | |||||
lekkerste l&k@rst@ | |||||
libido l@bidu | |||||
macaroni makar'o@ni | macaroni makar'o@ni | ||||
madame mad'A:m | madame mad'A:m | ||||
malles mal@s | |||||
maskering mask'e@r@N $only | maskering mask'e@r@N $only | ||||
meegee me@x2e@ | meegee me@x2e@ | ||||
memoriam mEm'o@riam | memoriam mEm'o@riam | ||||
misbruikte $2 | misbruikte $2 | ||||
miskien $2 | miskien $2 | ||||
misterie m@ste@ri | misterie m@ste@ri | ||||
monitor mOnitOr | |||||
motore mo@t'o@r@ | motore mo@t'o@r@ | ||||
motor mo@t@r | motor mo@t@r | ||||
motortjie mo@t@rki | motortjie mo@t@rki | ||||
nadele nA:de@l@ | nadele nA:de@l@ | ||||
nadenke $1 | |||||
nagana nag'A:na | |||||
namens nA:m@ns | namens nA:m@ns | ||||
nassau nas'@U | |||||
nature nat'yr@ | nature nat'yr@ | ||||
nalatigheid nA:l'A:t@x2eIt | nalatigheid nA:l'A:t@x2eIt | ||||
namate $2 | namate $2 | ||||
netjies nE:icis | netjies nE:icis | ||||
netjiese nEicis@ | netjiese nEicis@ | ||||
netsowel nEtso@v&l | netsowel nEtso@v&l | ||||
neurone nY@r'o@n@ | |||||
nikswerd nIksv&:rt | |||||
nimmermeer $1 | nimmermeer $1 | ||||
nirvana n@rvA:na | |||||
nobelprys $2 | nobelprys $2 | ||||
normale nOrm'A:l@ | normale nOrm'A:l@ | ||||
numeri nWm@ri | numeri nWm@ri | ||||
oeuvre W:vr@ | oeuvre W:vr@ | ||||
omega $2 | omega $2 | ||||
omrede $2 | |||||
omtrent Omtr'Ent | omtrent Omtr'Ent | ||||
onbegrip $1 | onbegrip $1 | ||||
onderrig On@r'Ix2 $verb | onderrig On@r'Ix2 $verb |
adres %adrEs // fix last e sound of adres as last part of compounds | adres %adrEs // fix last e sound of adres as last part of compounds | ||||
al (baster %al // move default stress: albaster and compounds | al (baster %al // move default stress: albaster and compounds | ||||
al (bino %al // move default stress: albino | 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 | aleksand (ry %al%Eks%and // fix stress and a and d sounds: aleksandryn/-e/-s | ||||
alex (a %al%Ekz // Alexander/Alexandra/Alexandria | alex (a %al%Ekz // Alexander/Alexandra/Alexandria | ||||
alfabe (tK alfabE // fix stress and e sound: (vinger)alfabet/-te | alfabe (tK alfabE // fix stress and e sound: (vinger)alfabet/-te | ||||
aan (bid %A:n // move default stress: aanbid/-ding | aan (bid %A:n // move default stress: aanbid/-ding | ||||
aangee (+ 'A:nx2e@ // see rule: _) aange (@P5 A:nx@ | aangee (+ 'A:nx2e@ // see rule: _) aange (@P5 A:nx@ | ||||
_) aange (@P5 'A:nx2@ // added stress mark to ensure stress on aan | _) 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 | aandoenlik %A:ndunl@k // move default stress: aandoenlik and derivitives, vs. aandoen | ||||
aand (rok A:nt_ // fix d sound: aandrok/-ke/-kie | aand (rok A:nt_ // fix d sound: aandrok/-ke/-kie | ||||
aand (rus A:nt_ // fix d sound: aandrus and compounds | aand (rus A:nt_ // fix d sound: aandrus and compounds | ||||
bedev be@d@f // bedevaart and compounds | bedev be@d@f // bedevaart and compounds | ||||
beger (A b@x2e@r // begerig/begerend 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 (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 | bekk (+ b&k // exception to be (C%+ bE | ||||
bek (_ b&k // exception to be (C%+ bE | bek (_ b&k // exception to be (C%+ bE | ||||
beken b@kEn // 2nd e sound: oorbekend/welbekende | beken b@kEn // 2nd e sound: oorbekend/welbekende | ||||
de (press d%i // depressie/depressief/depressiewe | de (press d%i // depressie/depressief/depressiewe | ||||
@) derd (_ d@rt // verouderd/afgesonderd/gevorderd | @) derd (_ d@rt // verouderd/afgesonderd/gevorderd | ||||
_) der (duiC d%&r // move default stress: derduisende/derduiwel | _) 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 | @) dderd (_ d@rt // ontredderd, se rule: dd d | ||||
_) derge d&rx2@ // dergelik/-e | _) derge d&rx2@ // dergelik/-e | ||||
desibel dEsib&l // fix vowel sounds: desibel/-s | desibel dEsib&l // fix vowel sounds: desibel/-s | ||||
di (ssi d@ // move default stress: dissipel/-s | di (ssi d@ // move default stress: dissipel/-s | ||||
dissi (pl d@s@ // fix stress: dissipline/-s and compounds | dissi (pl d@s@ // fix stress: dissipline/-s and compounds | ||||
distri (bu d@str@ // distribusie/distribueer 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 | distel dIst@l // restore default stress: distel and compounds | ||||
_) dode d'o@d@ //dodelik dodemars etc. | _) dode d'o@d@ //dodelik dodemars etc. | ||||
doel (tref d%ul // move default stress: doeltreffend/-e/-ste | doel (tref d%ul // move default stress: doeltreffend/-e/-ste | ||||
hond) e (@ @_ // fix e sound: hondebloed/-oor/-trou, etc. | hond) e (@ @_ // fix e sound: hondebloed/-oor/-trou, etc. | ||||
kod) e (C @ // fix e sound: kodenommer/kodetaal/kodewoord, etc. | kod) e (C @ // fix e sound: kodenommer/kodetaal/kodewoord, etc. | ||||
Cond) e (CA @ // blondekop/geskondenes/hondebelasting and many compounds/sondebok/sondelas | 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 | noord) e (C @ // fix e sound: noordewind and compounds | ||||
olw) e (C @ // fix e sound: golweslag/wolwedans | olw) e (C @ // fix e sound: golweslag/wolwedans | ||||
blak) e (r @ // fix e sound: blakerend/-e/blakering | blak) e (r @ // fix e sound: blakerend/-e/blakering | ||||
liefd) e (C @ // fix e in compounds starting with liefde: -blyk/-daad/-diens/-gawe/-groete/-werk, etc. | liefd) e (C @ // fix e in compounds starting with liefde: -blyk/-daad/-diens/-gawe/-groete/-werk, etc. | ||||
sp) e (d @ // ekspedisie/gaspedaal/kwispedoor | sp) e (d @ // ekspedisie/gaspedaal/kwispedoor | ||||
gev) e (gK & // fix e sound in compounds like buitegevegstelling/skietgevegte | 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 | And) e (lC @ // fix e sound: swendelfirma/vaandeldraer and similar | ||||
_ad) e (lC @ // fix e sound: adelbors/-trots/-stand, etc. | _ad) e (lC @ // fix e sound: adelbors/-trots/-stand, etc. | ||||
Cing) e (lA @ // fix e sound: dwingeland/klingeling/kringelend/tingeling | Cing) e (lA @ // fix e sound: dwingeland/klingeling/kringelend/tingeling | ||||
e (CA e@ | e (CA e@ | ||||
CCan) e (CA @ // swanepoel/swanesang/tranedal | CCan) e (CA @ // swanepoel/swanesang/tranedal | ||||
XCier) e (@ @ // dieresorg/-lewe..., many compounds/PIEREWAAI/-ER | 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 | kund) e (@ @ // fix e sound in many compounds of kunde | ||||
luuks) e @ // luukses/luukse and compounds | luuks) e @ // luukses/luukse and compounds | ||||
midd) e (@ @ // compounds starting with midde: middedorp/middeooste/middestad/middeweg | midd) e (@ @ // compounds starting with midde: middedorp/middeooste/middestad/middeweg | ||||
e (kono@ %E // 1st e: ekonome/ekonomie/ekonomies/ekonoom | e (kono@ %E // 1st e: ekonome/ekonomie/ekonomies/ekonoom | ||||
eksege (CA %Eks@x2e@ // fix stress and e sounds: eksegese/eksegeties/-e | eksege (CA %Eks@x2e@ // fix stress and e sounds: eksegese/eksegeties/-e | ||||
_) ekster (K Ekst@r // restore default stress: ekster/-s and compounds | _) 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. | e (mosi %i // emosie/emosioneel, etc. | ||||
eun) e (r@ @ // fix e sound: ondersteunerskorps/sigeunermusiek/sigeuneragtig and similar | eun) e (r@ @ // fix e sound: ondersteunerskorps/sigeunermusiek/sigeuneragtig and similar | ||||
eun) eri (n @r'I // fix stress and e sound: sigeunerin/-ne/-netjie | eun) eri (n @r'I // fix stress and e sound: sigeunerin/-ne/-netjie | ||||
ks) eer 'e@r // annekseer/indekseer/lakseer/takseer and their compounds | ks) eer 'e@r // annekseer/indekseer/lakseer/takseer and their compounds | ||||
ss) eer 'e@r // but many words cont. sseer take stress: adresseer, etc. | ss) eer 'e@r // but many words cont. sseer take stress: adresseer, etc. | ||||
Cv) eer e@r // stress: (hoender/volstruisveer/dryfveer | 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 | w) eer e@r // stress may vary in words containing weer: lugafweer/donderweer | ||||
u) eer 'e@r // aktueer/konstrueer/salueer, etc. | u) eer 'e@r // aktueer/konstrueer/salueer, etc. | ||||
effek %e@fEk // move default stress and fix e sound: effek/-te/-tief | effek %e@fEk // move default stress and fix e sound: effek/-te/-tief | ||||
&) e (r_ @ | &) e (r_ @ | ||||
&) ers (_ @rs | &) ers (_ @rs | ||||
gp) ers (_ &rs // fix e sound: ligpers/lugpers | |||||
kp) ers (_ &rs // fix e sound: boek-/broek-/drukpers, etc. | kp) ers (_ &rs // fix e sound: boek-/broek-/drukpers, etc. | ||||
np) ers (_ &rs // fix e sound: inpers/lemoenpers/lusernpers/wynpers | np) ers (_ &rs // fix e sound: inpers/lemoenpers/lusernpers/wynpers | ||||
rp) ers (_ &rs // fix e sound: inmekaarpers/kopieerpers/silinderpers/Voortrekkerpers | rp) ers (_ &rs // fix e sound: inmekaarpers/kopieerpers/silinderpers/Voortrekkerpers | ||||
_) een (voud@ %e@n // stress on 2nd slb: eenvoudig, but on 1st: eenvoud | _) een (voud@ %e@n // stress on 2nd slb: eenvoudig, but on 1st: eenvoud | ||||
eerbied (A e@rb'id // eerbiedig/ing | eerbied (A e@rb'id // eerbiedig/ing | ||||
eerbiedw %e@rb%itv // eerbiedwaardig/eerbiedwekkend | eerbiedw %e@rb%itv // eerbiedwaardig/eerbiedwekkend | ||||
eerw %e@rv // stress: eerwaarde | |||||
_) eerw %e@rv // stress: eerwaarde | |||||
entjie EiNci | entjie EiNci | ||||
&k) entjie iNci // fix -entjie sound: bakentjie/dekentjie/kuikentjielakentjie/tekentjie, etc. | &k) entjie iNci // fix -entjie sound: bakentjie/dekentjie/kuikentjielakentjie/tekentjie, etc. | ||||
edjie 'E:ici | edjie 'E:ici | ||||
&K) erige @rIx2@ | &K) erige @rIx2@ | ||||
AA) erige @rIx2@ | AA) erige @rIx2@ | ||||
Ai) er (A @r // bakleierig/draaiery/mooierige | 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 | XCAAC) es (_ @s // fix e sound: bloutes/floutes/noutes | ||||
XCAAAd) es (_ @s // fix e sound: genooides/gesaaides, etc. | XCAAAd) es (_ @s // fix e sound: genooides/gesaaides, etc. | ||||
&Cd) es (_ @s // fix e: aangekeerdes/aangeklaagdes/afdraandes/bewaardes/bediendes/bedroefdes/blindes... | &Cd) es (_ @s // fix e: aangekeerdes/aangeklaagdes/afdraandes/bewaardes/bediendes/bedroefdes/blindes... | ||||
A) goog (_ x2'o@x2 // demagoog/pedagoog | A) goog (_ x2'o@x2 // demagoog/pedagoog | ||||
gor (dyn x2%Or // move default stress: gordyn and compounds | gor (dyn x2%Or // move default stress: gordyn and compounds | ||||
A) goë x2'u@ // demagoë/pedagoë | 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 | gra (fiet x2r%a // fix stress and a sound: grafiet and compounds | ||||
grama (doe x2r%am%a // move default stress: gramadoela/-s 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 | gramma (tik x2r%ama // fix stress and 2nd a sound: grammatika and compounds | ||||
@) gewende (_ x2'e@v@nd@ | @) gewende (_ x2'e@v@nd@ | ||||
@) gewend (_ x2'e@v@nt // insiggewend/deurslaggewend/liggewend | @) gewend (_ x2'e@v@nt // insiggewend/deurslaggewend/liggewend | ||||
gewel (d x2@v&l //geweld/ig/gewelddadig | 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 (w x2@v'&l //gewelwe | ||||
gewel x2e@v@l //gewel/huis/muur etc. | gewel x2e@v@l //gewel/huis/muur etc. | ||||
fn) is (A @s_ // fix i sound: begrafnisete/-ondernemer/-onkoste | fn) is (A @s_ // fix i sound: begrafnisete/-ondernemer/-onkoste | ||||
AC) is (_ 'Is // aktivis/humanis/kommunis/pianis/solis/violis/kompromis | AC) is (_ 'Is // aktivis/humanis/kommunis/pianis/solis/violis/kompromis | ||||
AAm) is (_ @s // restore default stress: dassiemis/Karoomis/koeimis/seemis | 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 | bloem) is 'Is // but: bloemis/-te | ||||
narC) i (ssus 'I // move default stress: Nar(c/s)issus | narC) i (ssus 'I // move default stress: Nar(c/s)issus | ||||
pub) is (_ @s // restore defaultstress: pubis, excep. to: AC) is (_ | pub) is (_ @s // restore defaultstress: pubis, excep. to: AC) is (_ | ||||
@C) isties 'Istis // kommunisties/liberalisties/humanisties | @C) isties 'Istis // kommunisties/liberalisties/humanisties | ||||
@) iseer is'e@r // analiseer/kategoriseer | @) iseer is'e@r // analiseer/kategoriseer | ||||
@) iseren (d is'e@r@n // analiserend/kategoriserend | @) iseren (d is'e@r@n // analiserend/kategoriserend | ||||
@f) iek (_ 'ik // manjefiek/compounds | |||||
@n) iek (_ 'ik // uniek/compounds | @n) iek (_ 'ik // uniek/compounds | ||||
@n) iek (e_ 'ik // unieke/compounds | @n) iek (e_ 'ik // unieke/compounds | ||||
@kn) iek (_ ik // but piekniek | @kn) iek (_ ik // but piekniek | ||||
C) isk (e_ 'Isk // asteriske/tamariske | C) isk (e_ 'Isk // asteriske/tamariske | ||||
_) islam islam // fix i sound: Islam/Islamiseer/Islamisme | _) islam islam // fix i sound: Islam/Islamiseer/Islamisme | ||||
C) ispel Isp@l // lispeling/kwispeling/kwispelstert | 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 | w) it (A It // fix i sound: eiwitafskeiding/witagtig/kwiteer/grondserwituut | ||||
itali (a %it%al%i // move default stress: Italianer/-s and compounds | itali (a %it%al%i // move default stress: Italianer/-s and compounds | ||||
item itEm // fix e sound in item and compounds | item itEm // fix e sound in item and compounds | ||||
laf (aar laf // restore default stress: lafaard/-s and compounds | laf (aar laf // restore default stress: lafaard/-s and compounds | ||||
lagune l%ax2yn@ // move default stress: lagune and compounds | lagune l%ax2yn@ // move default stress: lagune and compounds | ||||
_) la (kon l%a // lakoniek/lakonies/lakonisme | _) 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 | lam (len l%am // move default stress: lamlendeling/lamlendig/-e/-heid | ||||
lande (ry l%and@ // move default stress: landerye/compounds of landery- | lande (ry l%and@ // move default stress: landerye/compounds of landery- | ||||
_) lang (d l%aN // langdradig/langdurig and their derivitivs | _) lang (d l%aN // langdradig/langdurig and their derivitivs | ||||
lank (moe l%aNk // move default stress: lankmoedig/-e/-heid | lank (moe l%aNk // move default stress: lankmoedig/-e/-heid | ||||
_) lapel l%ap'&l //lapelwapen etc. | _) lapel l%ap'&l //lapelwapen etc. | ||||
lapel (_ l%ap'&l //baadjielapel 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 | laventel l%afEnt@l // fix stress and vowel sounds: laventel and compounds | ||||
&) lede (_S4 le@d@ | &) lede (_S4 le@d@ | ||||
@l) le (sC@ l@ // fix e sound: getallestelsel/gevallestudie/novelleskrywer | @l) le (sC@ l@ // fix e sound: getallestelsel/gevallestudie/novelleskrywer | ||||
leuen (tjie lY@iN // leuentjie/witleuentjie | leuen (tjie lY@iN // leuentjie/witleuentjie | ||||
_) lev (i l@f // Levitikus/Leviet | _) 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 | lewe (K le@v@ // belewenis/lewendig/agtergeblewenes/hotellewe/skoollewe/stillewe | ||||
libe (rA l@b@ // liberaal/liberale/liberalis/-me/(ge)libereer | libe (rA l@b@ // liberaal/liberale/liberalis/-me/(ge)libereer | ||||
_) libe (ri@ l@be@ // fix stress and vowel sounds: Liberië/Liberies/-e | _) 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 | ligen l@x2'En | ||||
_) li (g lI // fix stress: liggaam/liggies/ligte | _) li (g lI // fix stress: liggaam/liggies/ligte | ||||
li (ga_ li // fix i sound: liga/vroueliga, etc. | li (ga_ li // fix i sound: liga/vroueliga, etc. | ||||
_) li (gaC li // vix i sound: compounds starting with liga/ligatuur | _) li (gaC li // vix i sound: compounds starting with liga/ligatuur | ||||
liggaamlik l@x2A:ml@k // stress liggaamlik/-e/-heid | liggaamlik l@x2A:ml@k // stress liggaamlik/-e/-heid | ||||
lig (hoofd l@x2 // move default stress: lighoofdig/-e/-heid | |||||
&) lik (_S3 l@k | &) lik (_S3 l@k | ||||
&) like (_S4 l@k@ | &) like (_S4 l@k@ | ||||
&) likes (_S5 l@k@s | &) likes (_S5 l@k@s | ||||
&) liker (_S5 l@k@r | &) liker (_S5 l@k@r | ||||
likke (wa l@k@ // move default stress: likkewaan/likkewane | likke (wa l@k@ // move default stress: likkewaan/likkewane | ||||
&) likste (_S6 l@kst@ | &) 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 | _) 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 | 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 | 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 | li (riek l@ // fix stress and i sound: liriek/-e | ||||
@) ll (_N _^_EN // Words ending in -ll are English | @) ll (_N _^_EN // Words ending in -ll are English | ||||
lobola l%ObO:la // fix stress and vowel sounds: lobola and compounds | lobola l%ObO:la // fix stress and vowel sounds: lobola and compounds | ||||
lo (kalA l%u // fix stress and o sound: lokale/ontvangslokale, etc. | 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@ | _) losge (@P5 l'Osx2@ | ||||
_) losies l%us'is //losies at start always means "to stay" | _) losies l%us'is //losies at start always means "to stay" | ||||
&) lm (K l@-m | &) lm (K l@-m | ||||
liefdes lifd@s // liefdesbrief/daad/geskiedenis/verhouding... | |||||
lisensie l@s'E:nsi | lisensie l@s'E:nsi | ||||
lering (_ l'e@r@N //isolering distilering correct @ to e@ and force stress | lering (_ l'e@r@N //isolering distilering correct @ to e@ and force stress | ||||
lokomo ,lukumu' //lokomotief and friends | lokomo ,lukumu' //lokomotief and friends | ||||
losbandi (g l%Osband@ // fix stress and d sound: losbandig/-e/-er | 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 | lug (A lWx2? // lugaanval/lugafweer/lugopname | ||||
luid (rugt l%Yyd // move default stress: luidrugtig/-e/-heid | luid (rugt l%Yyd // move default stress: luidrugtig/-e/-heid | ||||
luite (nant l%Yyt@ // fix e sound and move default stress: luitenant and compounds | luite (nant l%Yyt@ // fix e sound and move default stress: luitenant and compounds | ||||
luk (salig l%Wk // move default stress: geluksalig/-e/-heid | 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 | 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 | 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 | @) lusti (g l'Wst@ // move default stress: strydlustig/lewenslustig and many similar | ||||
lyk (nam l%eIk // move default stress: gelyknamig/-e | lyk (nam l%eIk // move default stress: gelyknamig/-e | ||||
maga (syn m%ax2%a // magasyn and many compounds | maga (syn m%ax2%a // magasyn and many compounds | ||||
magi (stra m%ax2%i // magistraat and many compounds | magi (stra m%ax2%i // magistraat and many compounds | ||||
mag (nA@ m%ax2 // move default stress: magneet/magnete/magneties | 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 | 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 | @) 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 | @) makranka makr'anka // fix stress and vowel sounds: koek(e)makranka/-s | ||||
ma (kriel m%a // move default stress: makriel/-e | |||||
&) mal (_S3 mal | &) mal (_S3 mal | ||||
malaria mal'A:ria; | 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 | _) malte (sA m%alte@ // move default stress and fix e sound: maltese/maltesies | ||||
man (da m%an //mandaat and compounds | man (da m%an //mandaat and compounds | ||||
mane (l m%an& // fix stress and e sound: (kerk)manel(le)punte, etc. | mane (l m%an& // fix stress and e sound: (kerk)manel(le)punte, etc. | ||||
manier m@ni:r //manier and compounds | manier m@ni:r //manier and compounds | ||||
manifes manifEs // fix vowel sounds: manifes and compounds/manifestasie/manifesteer | manifes manifEs // fix vowel sounds: manifes and compounds/manifestasie/manifesteer | ||||
manipu m%an%ip%y // fix stress and a sound: manipuleer/manipulering/manipulasie | 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 | man (moe m%an // move default stress: manmoedig/-e/-heid | ||||
manne (kyn m%an@ // move default stress: mannekyn/-e and compounds | |||||
manu (sk ,many | manu (sk ,many | ||||
_) ma (rA m%a // short, unstressed a: Marietjie/Marina/Marinda/Marita/Maree/marog | _) ma (rA m%a // short, unstressed a: Marietjie/Marina/Marinda/Marita/Maree/marog | ||||
marine m%arin@ // marine and compounds | marine m%arin@ // marine and compounds | ||||
masjien m@Sin // masjien and many compounds | masjien m@Sin // masjien and many compounds | ||||
maskara m%askA:r%a // move default stress: maskara and compounds | maskara m%askA:r%a // move default stress: maskara and compounds | ||||
masker mask@r // fix e sound: maskerafdruk/-agtig/ontmaskering | 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 | 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 | 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 | 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 | ma (tesis m%a // fix stress and 1st a sound: matesis and compounds | ||||
maties m'A:tis //tamaties, outomaties etc. | 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 | @) matig m'A:t@x2 // doelmatig/gelykmatig/regmatig; matig takes stress in compounds | ||||
// mc _^_EN //the mac names does not work | // mc _^_EN //the mac names does not work | ||||
middel mId@l // middellyf/middelpunt/middelste/bemiddelend | middel mId@l // middellyf/middelpunt/middelste/bemiddelend | ||||
middel (jari m@d@l // move default stress: middeljarig and derivitives | middel (jari m@d@l // move default stress: middeljarig and derivitives | ||||
milit m@l@t // militêr/militaris | 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 | mille (nniA m@lE // millennium/millennia | ||||
mi (miek m@ // fix stress and i sound: mimiek and compounds | |||||
minag m'Inax2 // minag/geminag/minagting/minagtend | minag m'Inax2 // minag/geminag/minagting/minagtend | ||||
minder (jar m@n@r // move default stress: minderjarig and derivitives | minder (jar m@n@r // move default stress: minderjarig and derivitives | ||||
miner (A m@n@r // mineraal and many compounds | miner (A m@n@r // mineraal and many compounds | ||||
mi (neur m%i // move default stress: mineur and compounds | mi (neur m%i // move default stress: mineur and compounds | ||||
mikr (o mikr | mikr (o mikr | ||||
ministers m@n'Ist@rs | 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 | mise (ra m@s // fix stress and drop e: miserabel/-e/-s/-ste | ||||
mis (gis m@s // stress on 2nd slb | mis (gis m@s // stress on 2nd slb | ||||
mis (gun m@s // stress on 2nd slb | mis (gun m@s // stress on 2nd slb | ||||
mis (o mIs // misoes/misopvatting | mis (o mIs // misoes/misopvatting | ||||
mis (plaas m@s // stress on 2nd slb | mis (plaas m@s // stress on 2nd slb | ||||
mis (rabel 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 | mister (ieus m@ste@r // stress at end | ||||
mis (tiek m@s | mis (tiek m@s | ||||
mis (troos m@s // mistroostig | mis (troos m@s // mistroostig | ||||
mis (vorm m@s // stress on 2nd slb | 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. | _) mode m''o@d@ // fix e sound: modeontwerper/-maker, etc. | ||||
modee m@d'e@ //akkommodeer | modee m@d'e@ //akkommodeer | ||||
mode (l m%o@d& // fix stress and e sound: model/-le and compounds | mode (l m%o@d& // fix stress and e sound: model/-le and compounds | ||||
mo (narg m%o@ // move default stress: monarg/monargies | mo (narg m%o@ // move default stress: monarg/monargies | ||||
monargie (_N m%o@n%arx2i // move stress to end: monargie | monargie (_N m%o@n%arx2i // move stress to end: monargie | ||||
monder (A m%Onde@r // move default stress and lengthen 1st e sound | 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 | 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 (C@ m%Or // move default stress: morbied/morfien/mortier | ||||
mor (fose m%Or // fix stress: morfose/metamorfose/-s | 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 | _) 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 | motor mo@t@r // motorfiets/motorkar/vragmotor | ||||
@) mpel (A mp@l // bewimpeling/dompelaar/strompeling | @) mpel (A mp@l // bewimpeling/dompelaar/strompeling | ||||
murmel mWrm@l // fix e sound in compounds like murmelgeluid | |||||
museum m%ysY@m // move default stress | museum m%ysY@m // move default stress | ||||
musiek m%Wsik | musiek m%Wsik | ||||
musi (C mysi' // musikant/musikus/musici | 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 | muske (tier m%Wsk@ // move default stress: musketier/-s | ||||
mymer meIm@r // fix e sound: mymerend/mymering/mymeraar | 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. | môre (@ mO:r@ // HAT: all compounds starting with môre- take stress on 1st slb. | ||||
_) me (duC m@ // fix stress and e sound: medulla/medusa | _) me (duC m@ // fix stress and e sound: medulla/medusa | ||||
mee (doë m%e@ // move default stress | mee (doë m%e@ // move default stress | ||||
meerder (jar m%e@rd@r // move default stress: meerderjarig/-e/-es/-verklaring | 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 | mee (war m%e@ // move default stress: meewarig/-e/-heid | ||||
medisyne m@d@seIn@ //medisyne and compounds | medisyne m@d@seIn@ //medisyne and compounds | ||||
meganies m@x2'A:nis | meganies m@x2'A:nis | ||||
mekaar m@k'A:r | mekaar m@k'A:r | ||||
mekaarge m@k'A:rx2@ | mekaarge m@k'A:rx2@ | ||||
_) melodies m@l'o@dis //melodies and compounds | _) melodies m@l'o@dis //melodies and compounds | ||||
_) melodi (eu ,mEludi //melodieus | |||||
_) melodi (eu m%El%ud%i //melodieus | |||||
_) melodie mElud'i | _) melodie mElud'i | ||||
_) melo (dr m'Elu //melodrama etc. | _) melo (dr m'Elu //melodrama etc. | ||||
_) metel me@t@l // vermetel/-e/-es/-heid... | _) metel me@t@l // vermetel/-e/-es/-heid... | ||||
ment m'Ent | ment m'Ent | ||||
mental (iteit m,Ental // fix stress: mentaliteit/sentimentaliteit and compounds | mental (iteit m,Ental // fix stress: mentaliteit/sentimentaliteit and compounds | ||||
mentjie m'EiNci // monumentjie/dokumentjies | 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 | AAs) mes (_ mEs // fix last e sound in compounds like kombuismes | ||||
Cs) mes (_ mEs // fix last e sound in compounds like slagtersmes | Cs) mes (_ mEs // fix last e sound in compounds like slagtersmes | ||||
metaal m@tA:l | metaal m@tA:l | ||||
me (tod m@ // metodies/metodiek | me (tod m@ // metodies/metodiek | ||||
metodis mEtud'Is // metodis/ties/e/metodisme | metodis mEtud'Is // metodis/ties/e/metodisme | ||||
me (trum me@ // fix e sound: metrum and compounds | |||||
mevrou m@fr'@U | mevrou m@fr'@U | ||||
_) na (skeer n''A: // restore default stress: naskeermiddel/-room | _) na (skeer n''A: // restore default stress: naskeermiddel/-room | ||||
_) na (speur n%A: // fix stress and a sound: (on)naspeurbaar/-lik/-e | _) na (speur n%A: // fix stress and a sound: (on)naspeurbaar/-lik/-e | ||||
_) na (tC na // many compounds beginning with nat | _) 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 | na (tuur n%a // natuur and compounds and derivitives | ||||
navig n%av%ix2 //navigasie, navigeer etc. | 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 (we nA:% // fix a sound in compounds with naweek/naweke: langnaweek/paasnaweek, etc. | ||||
@) na (_ na // shorten final na, except for: | @) na (_ na // shorten final na, except for: | ||||
r) na (_ nA: // daarna/hierna/waarna | r) na (_ nA: // daarna/hierna/waarna | ||||
nadruklik nA:dr'Wkl@k // nadruklik/e | nadruklik nA:dr'Wkl@k // nadruklik/e | ||||
na (ï n%a? // naïef/naïewe/naïwiteit | na (ï n%a? // naïef/naïewe/naïwiteit | ||||
nares (_ n%ar'Es //eienares, minnares, moordenares etc. | nares (_ n%ar'Es //eienares, minnares, moordenares etc. | ||||
na (ywerig n%A:_ // move default stress: naywerig/-e/-heid | |||||
nazi nA:tsi // Nazi and compounds | 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 | 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 | ner (veu n%&r // move default stress: nerveus/-e | ||||
@C) nes (_ nEs // fix final e sound: doringnes/aasvoëlnes/kalkoennes/hamerkopnes/reiernes/kiewietnes | @C) nes (_ nEs // fix final e sound: doringnes/aasvoëlnes/kalkoennes/hamerkopnes/reiernes/kiewietnes | ||||
_) net (o nEt_ // fix o sound: netonderrok/-klere | _) net (o nEt_ // fix o sound: netonderrok/-klere | ||||
neute nY@t@ // fix connecting e sound: neutedop/neutekraker | neute nY@t@ // fix connecting e sound: neutedop/neutekraker | ||||
neu (tr n%Y@ // move default stress: neutraal/neutrale | neu (tr n%Y@ // move default stress: neutraal/neutrale | ||||
_) nguni Ngu:ni // Nguni/-beeste/-tale | |||||
ni (ggie nI // niggie/-tjie/-s/kleinniggie... | 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 | nning n@N // prevent nn in words like orwinning, see: &) ning (_S4 n@N | ||||
_) nage (@P4 n'A:x2@ | _) nage (@P4 n'A:x2@ | ||||
normaal nOrm'A:l // normaal/normaalweg/abnormaal | normaal nOrm'A:l // normaal/normaalweg/abnormaal | ||||
nostal (gie_N n%Ost%al // stress on last slb.: nostalgie | nostal (gie_N n%Ost%al // stress on last slb.: nostalgie | ||||
no (stalgie n%O // stress on 2nd slb.: nostalgies | 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 | 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 | november no@f'Emb@r // fix 1st e sound and stress: November and compounds | ||||
ntere (ss nt;r@' // interessant/interesseer/geïnteresseerd | ntere (ss nt;r@' // interessant/interesseer/geïnteresseerd | ||||
nuwer (wet n%yv@r // move default stress: nuwerwets/-e | nuwer (wet n%yv@r // move default stress: nuwerwets/-e | ||||
@Cer) ny (_ n'eI // move default stress: lekkerny/raserny/slawerny | @Cer) ny (_ n'eI // move default stress: lekkerny/raserny/slawerny | ||||
@Cer) ny (e n'eI // move default stress: gekkernye/lekkernye/sotternye | @Cer) ny (e n'eI // move default stress: gekkernye/lekkernye/sotternye | ||||
nylon nAIlOn // fix y sound: nylon and compounds: nylonkouse, etc. | |||||
.group o | .group o | ||||
o (C O | o (C O | ||||
o (CA o@ | o (CA o@ | ||||
mikr) o u // mikrogolf/mikroskakelaar/mikrorekenaar | mikr) o u // mikrogolf/mikroskakelaar/mikrorekenaar | ||||
oase %u_A:s@ // oase/-s and compounds | |||||
o (terap u // psigo-/fisioterapeut | o (terap u // psigo-/fisioterapeut | ||||
_) ob (s %Op // obskuur/obskure/obskuriteit/obsessie/obseen | _) ob (s %Op // obskuur/obskure/obskuriteit/obsessie/obseen | ||||
C) o (dium o@ // fix stress and o sound: jodium/podium/rodium and their compounds | C) o (dium o@ // fix stress and o sound: jodium/podium/rodium and their compounds | ||||
oefen uf@n// oefenbroekie/oefeningboek/liggaamsoefeninge | 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) ogig _o@x2@x2 // bruinogig/grootogig/skuinsogig | ||||
C) oetel ut@l // troeteldier/-naam/vertroeteling/vroetelend/boeteling | C) oetel ut@l // troeteldier/-naam/vertroeteling/vroetelend/boeteling | ||||
_) o (marm %O //omarm and compounds | _) o (marm %O //omarm and compounds | ||||
odiek ud'ik // periodiek/metodiek | 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 | _) 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 | C) o (lia o@ // fix o sound: Goliat/magnolia | ||||
oliek (_ ul'ik // koliek/mankoliek/simboliek | oliek (_ ul'ik // koliek/mankoliek/simboliek | ||||
oliek (e_ ul'ik // mankolieke/katolieke | 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 (lim %o@ // move default stress: olimpies/-e | ||||
o (lyC %o@ // move default stress: olyf and compounds/olywe | o (lyC %o@ // move default stress: olyf and compounds/olywe | ||||
olym (p %o@lIm // fix stress and y sound: Olympia/Olympus | 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 | oranje %o@ranj@ // fix stress and e sound in compounds: oranjeagtig/oranjekleur | ||||
_) ordent %OrdEnt // move default stress: ordentlik/-e/-er/-ste/-heid | _) ordent %OrdEnt // move default stress: ordentlik/-e/-er/-ste/-heid | ||||
orent (K %o@rEnt // fix stress of orent in compounds: kiertsorent/orentspring, etc. | orent (K %o@rEnt // fix stress of orent in compounds: kiertsorent/orentspring, etc. | ||||
omkeer Omke@r // restore default stress: omkeer/handomkeer and similar | omkeer Omke@r // restore default stress: omkeer/handomkeer and similar | ||||
_) omker (A Omke@r // omkering/omkerende | _) omker (A Omke@r // omkering/omkerende | ||||
_) om (klem %Om // move default stress: omklem/-ming | _) 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 | _) omli (gg %OmlI // move default stress: omliggend/-e | ||||
om (ly %Om // move default stress: omlyn/-ing | om (ly %Om // move default stress: omlyn/-ing | ||||
_) om (raam %Om // move default stress: omraam and derivitives | |||||
om (ring %Om // move default stress | om (ring %Om // move default stress | ||||
om (sig %Om // move default stress: omsigtig/-heid | 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 (skr %Om // move default stress: omskryf/omskrewe | ||||
_) om (sluier %Om // move default stress: omsluier and derivitives | |||||
_) om (sluit %Om // move default stress: omsluit/-ing | _) om (sluit %Om // move default stress: omsluit/-ing | ||||
omstandigh Omst'and@x2 // to steer clear of prefixes and suffixes | omstandigh Omst'and@x2 // to steer clear of prefixes and suffixes | ||||
om (vatt %Om // move default stress: omvattend and derivitives | om (vatt %Om // move default stress: omvattend and derivitives | ||||
_) omver %Omf&r // omver/omvergooi/omverwerp | _) 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 | _) opeen Op_'e@n | ||||
_) ope (K o@p@ //opehart opestelling etc./ope | _) ope (K o@p@ //opehart opestelling etc./ope | ||||
onder (hande %On@r // move default stress: onderhandel and derivitives | onder (hande %On@r // move default stress: onderhandel and derivitives | ||||
onder (hor %On@r // exception to default stress rule: | onder (hor %On@r // exception to default stress rule: | ||||
onder (hou %On@r // move default stress: onderhou/-dend/-e | 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 | onder (ne %On@r // move default stress: onderneem/onderneming | ||||
onderonsie %On@r?o~nsi // fix stress, short break and nasalised o: onderonsie/-s | onderonsie %On@r?o~nsi // fix stress, short break and nasalised o: onderonsie/-s | ||||
onder (soeken %On@r // move default stress: ondersoekend/-e | onder (soeken %On@r // move default stress: ondersoekend/-e | ||||
no) sele (_ s@l@ // e sounds in onnosele | no) sele (_ s@l@ // e sounds in onnosele | ||||
self (stan s%&lf // move default stress: selfstandig/-e/-heid | self (stan s%&lf // move default stress: selfstandig/-e/-heid | ||||
seli (ba s%El%i // move default stress and fix e sound: selibaat/selibate | 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. | 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. | _) selon (sC s@lo~n // fix stress and e, nasalise o: selonspampoen/-roos/-rose, etc. | ||||
@) sel (wig s'&l // stress: (ver)eenselwig and derivitives | @) sel (wig s'&l // stress: (ver)eenselwig and derivitives | ||||
// sioe Si'u | // sioe Si'u | ||||
si (o Si // fisiologie/-logiese/-loog | si (o Si // fisiologie/-logiese/-loog | ||||
sio (ne Siu' // emosioneel/emosionele/rasioneel/rasionele, etc. | 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 | sist (e s@st // fix stress and vowel sounds: sisteem/sisteme | ||||
siste (mat s@st@ // fix e sounds: sistematies/-e | siste (mat s@st@ // fix e sounds: sistematies/-e | ||||
situasie sItSu'A:si | situasie sItSu'A:si | ||||
dubbel) ste (r st& // fix e sound: dubbelster/-re | dubbel) ste (r st& // fix e sound: dubbelster/-re | ||||
dwaal) ste (r st& // fix e sound: dwaalster/-re | dwaal) ste (r st& // fix e sound: dwaalster/-re | ||||
dwerg) ste (r st& // fix e sound: dwergster/-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 | pool) ste (r st& // fix e sound: poolster | ||||
_) ste (ri st%E // fix stress and e sound: steriel/-e/steriliteit | _) 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 | stimu (lA st@m%y // move default stress and fix i sound: stimuleer/stimulering/stimulasie | ||||
tesou (rie t%Es%u //tesourie and compounds | tesou (rie t%Es%u //tesourie and compounds | ||||
moles) tering te@r@N // molestering/kindermolestering | moles) tering te@r@N // molestering/kindermolestering | ||||
_) ter (l t@r // move default stress: terloops/-e | _) 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 | @) terme (_ t&rm@ // correct pronunciation of 1st e | ||||
ter (miet t%&r // move default stress: termiet/-e and compounds | ter (miet t%&r // move default stress: termiet/-e and compounds | ||||
_) ter (w t@r // stress and e sound: terwyl/terwille | _) ter (w t@r // stress and e sound: terwyl/terwille | ||||
k) w w | k) w w | ||||
k) w (And v // fix w sound: buikwand/rukwinde | k) w (And v // fix w sound: buikwand/rukwinde | ||||
s) w w | 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 (art w // fix w sound in compounds like donderswart | ||||
&s) w (eefs v // fix w sound: compounds like -sweefsel/tuisweefstof, etc. | &s) w (eefs v // fix w sound: compounds like -sweefsel/tuisweefstof, etc. | ||||
s) w (ou v // fix w sound: bamboeswoud/keerkringswoud and similar | s) w (ou v // fix w sound: bamboeswoud/keerkringswoud and similar | ||||
@) weg (_ v&x2 // blindweg/botweg and many similar | @) weg (_ v&x2 // blindweg/botweg and many similar | ||||
spoor) weg v&x2 // fix e sound: spoorwegaanleg/-aansluiting/-amptenaar/-eiendom/-inkomste/-ongeluk... | 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 | 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 | @) wendig v'End@x2 // inwendig/noodwendig/uitwendig | ||||
&) wene (_ v@n@ // fix penultimate e sound: afgestorwene/-s/ingeskrewene/verdorwene/verhewene | &) wene (_ v@n@ // fix penultimate e sound: afgestorwene/-s/ingeskrewene/verdorwene/verhewene | ||||
A) wer (AA v@r // fix e sound: beyweraar/keweruitroeiing/nyweraar/oewereienaar | A) wer (AA v@r // fix e sound: beyweraar/keweruitroeiing/nyweraar/oewereienaar | ||||
w (ese_ v //words ending in wese | w (ese_ v //words ending in wese | ||||
@C) w (eë v // fix w sound: duikweë/staatsweë/uitweë, etc. | @C) w (eë v // fix w sound: duikweë/staatsweë/uitweë, etc. | ||||
t) w w | 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. | s) w (ater v // fix w sound: Augrabieswaterval/gebiedswaters/opwaswater/varswater, etc. | ||||
t) w (at v // geut/put/soetwater, etc./ietwat | t) w (at v // geut/put/soetwater, etc./ietwat | ||||
it) w v // inkuitwisser/witwyn/uitwoed/witwatersrand | it) w v // inkuitwisser/witwyn/uitwoed/witwatersrand | ||||
woord (a vo@rt_ // fix d sound: woordafleiding and similar compounds | woord (a vo@rt_ // fix d sound: woordafleiding and similar compounds | ||||
@C) w (urm v // fix w sound: erdwurm/-s/-agtig, etc. | @C) w (urm v // fix w sound: erdwurm/-s/-agtig, etc. | ||||
@t) w (y v // fix w sound: granaatwyn/kieswetwysiging/krotwyk/straatwys(ie) | @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 | @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 | nt) w (A v | ||||
.group x | .group x |
Dictionary ta_dict | 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 | Dictionary pt_dict |
inner In3 | inner In3 | ||||
inning InIN | inning InIN | ||||
innovative In@veItIv | innovative In@veItIv | ||||
insect $1 | |||||
insert Ins3:t $onlys | insert Ins3:t $onlys | ||||
insert Ins'3:t $verb | insert Ins'3:t $verb | ||||
insightful $2 | insightful $2 | ||||
me ,mi: $only | me ,mi: $only | ||||
him ,hIm $only | him ,hIm $only | ||||
us ,Vz $only | us ,Vz $only | ||||
us $abbrev $allcaps | |||||
them ,DEm $only | them ,DEm $only | ||||
my %maI $nounf $strend2 | my %maI $nounf $strend2 |
// This file is UTF8 encoded | // This file is UTF8 encoded | ||||
// Spelling to phoneme words and exceptions for Tamil | // 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_ |
// This file is UTF8 encoded | // This file is UTF8 encoded | ||||
// Spelling to phoneme rules for Tamil | // Spelling to phoneme rules for Tamil | ||||
// B means a combining vowel sign, or a virama | |||||
.replace | .replace | ||||
௦ 0 // Tamil numbers | ௦ 0 // Tamil numbers | ||||
௧ 1 | ௧ 1 | ||||
௯ 9 | ௯ 9 | ||||
.group 0xe0ae | |||||
.group 0xe0ae // characters which start with UTF-8 bytes: [e0 ae] | |||||
ஂ // anusvara | ஂ // anusvara | ||||
ஃ // visarga | ஃ // visarga | ||||
்) க (B g | ்) க (B g | ||||
_) க ka | _) க ka | ||||
_) க (B k | _) க (B k | ||||
க்க ka | |||||
க்க (B k | |||||
க்க k:a | |||||
க்க (B k: | |||||
ங Na | ங Na | ||||
ங (B N | ங (B N | ||||
ச (B dZ | ச (B dZ | ||||
_) ச sa | _) ச sa | ||||
_) ச (B s | _) ச (B s | ||||
ச்ச tSa | |||||
ச்ச (B tS | |||||
ச்ச tS:a | |||||
ச்ச (B tS: | |||||
ஜ dZa | ஜ dZa | ||||
ஜ (B dZ | ஜ (B dZ | ||||
த (B d | த (B d | ||||
_) த ta | _) த ta | ||||
_) த (B t | _) த (B t | ||||
த்த ta | |||||
த்த (B t | |||||
த்த t:a | |||||
த்த (B t: | |||||
ந na | ந na | ||||
ந (B n | ந (B n | ||||
ப (B b | ப (B b | ||||
_) ப pa | _) ப pa | ||||
_) ப (B p | _) ப (B p | ||||
ப்ப pa | |||||
ப்ப (B p | |||||
ப்ப p:a | |||||
ப்ப (B p: | |||||
ம ma | ம ma | ||||
ம (B m | ம (B m | ||||
ி i | ி i | ||||
.group 0xe0af | |||||
.group 0xe0af // characters which start with UTF-8 bytes: [e0 af] | |||||
ீ i: | ீ i: | ||||
ு u | ு u |
<ul> | <ul> | ||||
<li>Make the spelling-to-phoneme translation rules more accurate, including the position of stressed | <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. | 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 | 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. | 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 | <p><li>Marking some common words in the dictionary that should be unstressed (words such as "the", "is"), or should be preceded | ||||
</ul> | </ul> | ||||
<b><em>If you are interested in working on a language, please contact me to set up the initial data and to | <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> | 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> | <HR> | ||||
<H3>6.1 Language Code</H3> | <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 | <P>Generally, the language's international <a href="http://en.wikipedia.org/wiki/ISO_639-1">ISO 639-1 code</a> is used to |
<h3>2.2.2 Use with KDE Text-to-Speech (KTTS)</h3> | <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 | To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker | ||||
with "command for speaking texts" set to:<br> | 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> | <p> | ||||
Note: | Note: | ||||
<ul> | <ul> | ||||
<h3>2.2.3 The Command Line Options</h3> | <h3>2.2.3 The Command Line Options</h3> | ||||
<dl> | <dl> | ||||
<dt> | <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. | <dd>Text input can be taken either from a file, from a string in the command, or from stdin. | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
<dd>Takes the text input from stdin. | <dd>Takes the text input from stdin. | ||||
<p> | <p> | ||||
<dt> | <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> | <p> | ||||
<dt> | <dt> | ||||
<strong>-a <integer></strong><br> | <strong>-a <integer></strong><br> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
<strong>-s <integer></strong><br> | <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> | <p> | ||||
<dt> | <dt> | ||||
<strong>-b</strong><br> | <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> | <p> | ||||
<dt> | <dt> | ||||
<strong>-k <integer></strong><br> | <strong>-k <integer></strong><br> | ||||
<dd>Indicate words which begin with capital letters.<p> | <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> | <p> | ||||
<dt> | <dt> | ||||
<strong>-l <integer></strong><br> | <strong>-l <integer></strong><br> | ||||
<pre> espeak -vaf</pre> | <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: | 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> | <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> | <p> | ||||
<voice filename> is a file within the <code>espeak-data/voices</code> directory.<br> | <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> | 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> | 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> | <p> | ||||
<dt> | <dt> | ||||
<strong>-w <wave file></strong><br> | <strong>-w <wave file></strong><br> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
<strong>--stdout</strong><br> | <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> | <p> | ||||
<dt><strong>--compile[=<voice name>]</strong><br> | <dt><strong>--compile[=<voice name>]</strong><br> | ||||
<dd> | <dd> |
A group for other characters which don't have their own group. | A group for other characters which don't have their own group. | ||||
<p> | <p> | ||||
<dt><strong>.L<nn></strong><br><dd> | <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> | <code>.L01 b bl br pl pr</code> | ||||
<p> | |||||
<dt><strong>.replace</strong><br><dd> | |||||
See section 4.7 Character Substitution, below. | |||||
</dl> | </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. | </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. | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>$capital</td> | <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> | ||||
<tr> | <tr> | ||||
<td>$dot</td> | <td>$dot</td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>$abbrev</td> | <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> | ||||
<tr> | <tr> | ||||
<td> </td> | <td> </td> | ||||
<td>$verb</td> | <td>$verb</td> | ||||
<td>Use this pronunciation if it's a verb.</td> | <td>Use this pronunciation if it's a verb.</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td>$noun</td> | |||||
<td>Use this pronunciation if it's a noun.</td> | |||||
</tr> | |||||
<tr> | |||||
<td>$past</td> | <td>$past</td> | ||||
<td>Use this pronunciation if it's past tense.</td> | <td>Use this pronunciation if it's past tense.</td> | ||||
</tr> | </tr> | ||||
then if "to" is at the end of the clause, we get [tu:], if not then we get [t@]. | then if "to" is at the end of the clause, we get [tu:], if not then we get [t@]. | ||||
<p> | <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> | 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> | <pre> | ||||
cough coff $text | cough coff $text | ||||
<p> <hr> | <p> <hr> | ||||
<h3>4.7 Character Substitution</h3> | <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> | .replace<br> | ||||
ô ő // (Hungarian) allow the use of o-circumflex instead of o-double-accute<br> | ô ő // (Hungarian) allow the use of o-circumflex instead of o-double-accute<br> | ||||
û ű<p> | û ű<p> |
You can select one of these with the <strong>-v <voice filename></strong> parameter to the | You can select one of these with the <strong>-v <voice filename></strong> parameter to the | ||||
speak command, eg: | speak command, eg: | ||||
<pre> espeak -vaf</pre> | <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> | <p> | ||||
For details of the voice files see <a href="voices.html">Voices</a>. | For details of the voice files see <a href="voices.html">Voices</a>. | ||||
<h4>Default Voice</h4> | <h4>Default Voice</h4> | ||||
<dd>This has been worked on by a native speaker and it should be OK.</dd> | <dd>This has been worked on by a native speaker and it should be OK.</dd> | ||||
<p> | <p> | ||||
<dt> | <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> | <strong>cs Czech</strong><br> | ||||
<dd>Usable. | <dd>Usable. | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
<strong>hr Croatian</strong><br> | <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> | </dd> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | <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> | <strong>sv Swedish</strong><br> | ||||
<dd>This has now had some work done on the pronunciation rules, so it should be useable. | <dd>This has now had some work done on the pronunciation rules, so it should be useable. | ||||
</dd> | </dd> | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | <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> | </dd> | ||||
<p> | <p> | ||||
<dt> | <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> | </dd> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | <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> | <strong>no Norwegian</strong><br> | ||||
<dd>An initial guess, awaiting feedback. | <dd>An initial guess, awaiting feedback. | ||||
</dd> | </dd> | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | <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> | <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> | </dd> | ||||
</ul> | |||||
<h3>3.6 Mbrola Voices</h3> | <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. | 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>. | See <a href="mbrola.html">mbrola.html</a>. |
#include <stdio.h> | #include <stdio.h> | ||||
#define ESPEAK_API_REVISION 2 | |||||
#define ESPEAK_API_REVISION 3 | |||||
/* | /* | ||||
Revision 2 | Revision 2 | ||||
Added parameter "options" to eSpeakInitialize() | Added parameter "options" to eSpeakInitialize() | ||||
Revision 3 | |||||
Added espeakWORDGAP to espeak_PARAMETER | |||||
*/ | */ | ||||
/********************/ | /********************/ | ||||
/* Initialization */ | /* Initialization */ | ||||
espeakSSML Elements within < > are treated as SSML elements, or if not recognised are ignored. | 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 | espeakENDPAUSE If set then a sentence pause is added at the end of the text. If not set then | ||||
this pause is suppressed. | this pause is suppressed. | ||||
EE_INTERNAL_ERROR. | EE_INTERNAL_ERROR. | ||||
*/ | */ | ||||
/* Note, there is no function to play a sound icon. This would be done by the calling program */ | |||||
typedef enum { | typedef enum { | ||||
espeakSILENCE=0, /* internal use */ | 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 */ | espeakEMPHASIS, /* internal use */ | ||||
espeakLINELENGTH, /* internal use */ | espeakLINELENGTH, /* internal use */ | ||||
espeakVOICETYPE, // internal, 1=mbrola | espeakVOICETYPE, // internal, 1=mbrola | ||||
espeakPUNCTUATION: which punctuation characters to announce: | espeakPUNCTUATION: which punctuation characters to announce: | ||||
value in espeak_PUNCT_TYPE (none, all, some), | 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: | espeakCAPITALS: announce capital letters by: | ||||
0=none, | 0=none, | ||||
3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch | 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. | 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 | Return: EE_OK: operation achieved | ||||
EE_BUFFER_FULL: the command can not be buffered; | EE_BUFFER_FULL: the command can not be buffered; | ||||
you may try after a while to call the function again. | you may try after a while to call the function again. | ||||
// voice table | // voice table | ||||
typedef struct { | 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 gender; // 0=none 1=male, 2=female, | ||||
unsigned char age; // 0=not specified, or age in years | unsigned char age; // 0=not specified, or age in years | ||||
unsigned char variant; // only used when passed as a parameter to espeak_SetVoiceByProperties | unsigned char variant; // only used when passed as a parameter to espeak_SetVoiceByProperties |
<p> | <p> | ||||
<dt> | <dt> | ||||
<strong>gender <gender> [<age>]</strong><br> | <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> | <ul><gender> may be male, female, or unknown.<br> | ||||
<age> is optional and gives an age in years. | <age> is optional and gives an age in years. | ||||
</dl> | </dl> | ||||
it equal to the base pitch will give a monotone. The default values are 82 118. | it equal to the base pitch will give a monotone. The default values are 82 118. | ||||
<p> | <p> | ||||
<dt> | <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 | <dd> Systematically adjusts the frequency, strength, and width of the | ||||
resonance peaks of the voice. Values are percentages 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> | <ul> | ||||
<li>Formants 1,2,3 are the standard three formants which define vowels.</li> | <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 | <li>Formant 0 is used to give a low frequency component to the sounds, of | ||||
<dt> | <dt> | ||||
<strong>dictrules <list of rule numbers></strong><br> | <strong>dictrules <list of rule numbers></strong><br> | ||||
<dd> | <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>. | See <a href="dictionary.html">dictionary.html</a>. | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.</dd> | The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.</dd> | ||||
<p> | <p> | ||||
<dt> | <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> | </dd> | ||||
<p> | <p> | ||||
<dt> | <dt> | ||||
</dd> | </dd> | ||||
<p> | <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. | 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> | </ul> | ||||
<hr> | <hr> | ||||
<h3>5.3 Voice Files Provided</h3> | <h3>5.3 Voice Files Provided</h3> |
name female1 | name female1 | ||||
gender female | gender female | ||||
pitch 140 200 | |||||
pitch 145 200 | |||||
flutter 7 | flutter 7 | ||||
roughness 4 | roughness 4 | ||||
formant 0 115 80 150 | 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 3 115 70 150 | ||||
formant 4 110 70 150 | |||||
formant 4 110 80 150 | |||||
formant 5 110 90 150 | formant 5 110 90 150 | ||||
formant 6 105 80 150 | formant 6 105 80 150 | ||||
formant 7 110 70 150 | formant 7 110 70 150 |
name female2 | name female2 | ||||
gender female | gender female | ||||
pitch 145 200 | |||||
pitch 142 220 | |||||
formant 0 105 80 150 | formant 0 105 80 150 | ||||
formant 1 110 80 160 | formant 1 110 80 160 | ||||
formant 2 110 70 150 | formant 2 110 70 150 | ||||
formant 3 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 6 110 70 150 | ||||
formant 7 110 70 150 | formant 7 110 70 150 | ||||
formant 8 110 70 150 | formant 8 110 70 150 | ||||
stressAdd 0 0 -10 -10 0 0 10 40 | stressAdd 0 0 -10 -10 0 0 10 40 | ||||
breath 0 2 3 3 3 3 3 2 | |||||
echo 140 12 |
name female3 | name female3 | ||||
gender female | gender female | ||||
pitch 150 230 | |||||
pitch 140 240 | |||||
formant 0 105 80 150 | 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 5 125 80 150 | ||||
formant 6 120 70 150 | formant 6 120 70 150 | ||||
formant 7 110 70 150 | formant 7 110 70 150 | ||||
formant 8 110 70 150 | formant 8 110 70 150 | ||||
stressAmp 18 18 20 20 20 20 20 20 | 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 | |||||
gender female | gender female | ||||
echo 130 15 | echo 130 15 | ||||
pitch 145 200 | |||||
pitch 142 200 | |||||
formant 0 120 80 150 | 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 4 125 80 150 | ||||
formant 5 125 80 150 | formant 5 125 80 150 | ||||
formant 6 110 80 150 | formant 6 110 80 150 | ||||
formant 7 110 75 150 | formant 7 110 75 150 | ||||
formant 8 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 | stressAmp 18 16 20 20 20 20 20 20 |
roughness 4 | roughness 4 | ||||
formant 0 98 95 100 | formant 0 98 95 100 | ||||
formant 1 98 95 100 | |||||
formant 1 97 95 100 | |||||
formant 2 97 95 100 | formant 2 97 95 100 | ||||
formant 3 97 100 100 | formant 3 97 100 100 | ||||
formant 4 97 100 100 | formant 4 97 100 100 |
name male5 | name male5 | ||||
gender male | gender male | ||||
pitch 90 130 | |||||
formant 0 100 85 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 3 105 85 130 | ||||
formant 4 105 85 130 | formant 4 105 85 130 | ||||
formant 5 105 85 130 | formant 5 105 85 130 | ||||
formant 6 105 85 150 | formant 6 105 85 150 | ||||
formant 7 105 85 150 | formant 7 105 85 150 | ||||
formant 8 105 85 150 | formant 8 105 85 150 | ||||
intonation 2 |
name welsh-test | name welsh-test | ||||
gender male | gender male | ||||
intonation 0 | |||||
intonation 4 |
gender male | gender male | ||||
formant 0 100 100 110 | formant 0 100 100 110 | ||||
language pl | language pl | ||||
gender male | gender male | ||||
//intonation 16 | |||||
intonation 2 |
fr 34 118 | fr 34 118 | ||||
fr_ca 11 118 | fr_ca 11 118 | ||||
hi 50 132 | hi 50 132 | ||||
ta 12 134 | |||||
ta 13 134 | |||||
hu 23 112 | hu 23 112 | ||||
nl 26 117 | nl 26 117 | ||||
pl 15 107 | pl 15 107 | ||||
r3/r_trill [R2] base | r3/r_trill [R2] base | ||||
[R3] base | [R3] base | ||||
[r] af | [r] af | ||||
[r] cy | |||||
[r] nl | [r] nl | ||||
[R] sk | [R] sk | ||||
[r*] sr | [r*] sr | ||||
[x] pt | [x] pt | ||||
r3/r_trill2 [R] base | r3/r_trill2 [R] base | ||||
[r] cy | |||||
[R] hr | [R] hr | ||||
r3/r_trill2.wav [R] base | r3/r_trill2.wav [R] base | ||||
[r] cy | |||||
[R] hr | [R] hr | ||||
r3/r_trill3.wav [R3] base | r3/r_trill3.wav [R3] base | ||||
[r] af | [r] af | ||||
[r] cy | |||||
[r] nl | [r] nl | ||||
r3/r_trill.wav [R2] base | r3/r_trill.wav [R2] base | ||||
[R] sk | [R] sk | ||||
[t] hu | [t] hu | ||||
[t] pl | [t] pl | ||||
[t] hr | [t] hr | ||||
[t] sr | |||||
[t] ru | [t] ru | ||||
[t;] ro | [t;] ro | ||||
[t[] vi | [t[] vi | ||||
ustop/ts_pzd2 [c] hi | ustop/ts_pzd2 [c] hi | ||||
[c] hu | [c] hu | ||||
ustop/t_sr [d] sr | ustop/t_sr [d] sr | ||||
[t] sr | |||||
ustop/ts_rfx [ts.] zh | ustop/ts_rfx [ts.] zh | ||||
ustop/ts_rfx_unasp [ts.] zh | ustop/ts_rfx_unasp [ts.] zh | ||||
ustop/ts_sr.wav [tS;] sr | ustop/ts_sr.wav [tS;] sr | ||||
voc/v [v] base | voc/v [v] base | ||||
[v] fi | [v] fi | ||||
[v] hi | [v] hi | ||||
[v] ta | |||||
[v2] nl | [v2] nl | ||||
[v;] ro | [v;] ro | ||||
[v] is | [v] is | ||||
[v] fi | [v] fi | ||||
[v] fr | [v] fr | ||||
[v] hi | [v] hi | ||||
[v] ta | |||||
[v2] nl | [v2] nl | ||||
[v;] ro | [v;] ro | ||||
[v] is | [v] is | ||||
vocw/v [B] base | vocw/v [B] base | ||||
[v] base | [v] base | ||||
[v] fr | [v] fr | ||||
[v] ta | |||||
[v;] ro | [v;] ro | ||||
vocw/zh [Z] base | vocw/zh [Z] base | ||||
[Z;] ro | [Z;] ro | ||||
[I2] en_rp | [I2] en_rp | ||||
[I] en_wm | [I] en_wm | ||||
[I2] en_wm | [I2] en_wm | ||||
[I] cy | |||||
[I] de | [I] de | ||||
[I:] de | [I:] de | ||||
[I] fr_ca | [I] fr_ca | ||||
[Y] ru | [Y] ru | ||||
vowel/ii_2 [I] la | vowel/ii_2 [I] la | ||||
[i] zh | [i] zh | ||||
vowel/ii_3 [I] fi | |||||
vowel/ii_3 [I] cy | |||||
[I] fi | |||||
[I] hi | [I] hi | ||||
[i] sk | [i] sk | ||||
[I] hr | [I] hr |
vowelin f1=0 f2=1600 -300 300 f3=-100 80 | vowelin f1=0 f2=1600 -300 300 f3=-100 80 | ||||
vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 | vowelout f1=0 f2=1600 -300 250 f3=-100 80 rms=20 | ||||
lengthmod 2 | lengthmod 2 | ||||
wave ustop/t_dnt%50 | |||||
before _ ustop/t_dnt%50 | |||||
wave ustop/t_sr%50 | |||||
before _ ustop/t_sr%35 | |||||
switchvoicing d | switchvoicing d | ||||
endphoneme | endphoneme | ||||
endphoneme | 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 | |||||
phoneme I | phoneme I | ||||
vowel starttype (i) endtype (i) | vowel starttype (i) endtype (i) | ||||
length 150 | length 150 | ||||
formants vowel/ii | |||||
formants vowel/ii_3 | |||||
endphoneme | endphoneme | ||||
//=========== | //=========== | ||||
phoneme r | 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 | lengthmod 6 | ||||
endphoneme | endphoneme | ||||
3. Example commands: | 3. Example commands: | ||||
*help speak | *help speak | ||||
should now show version 3.10 | |||||
should now show version 3.30 (or whatever is the latest version) | |||||
*speak -h | *speak -h | ||||
shows the available commands | shows the available commands |
/************************************************************************** | |||||
* 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 | #define USE_MODULE | ||||
#include "speech.h" | #include "speech.h" | ||||
#include "speak_lib.h" | #include "speak_lib.h" | ||||
#include "voice.h" | |||||
#include "phoneme.h" | #include "phoneme.h" | ||||
#include "synthesize.h" | #include "synthesize.h" | ||||
#include "voice.h" | |||||
#include "translate.h" | #include "translate.h" | ||||
#define os_X 0x20000 | #define os_X 0x20000 | ||||
FILE *f_text; | FILE *f_text; | ||||
int (* uri_callback)(int, const char *, const char *) = NULL; | int (* uri_callback)(int, const char *, const char *) = NULL; | ||||
int (* phoneme_callback)(const char *) = NULL; | |||||
int amp = 8; // default | int amp = 8; // default | ||||
char path_home[80] = ""; | |||||
char path_home[N_PATH_HOME] = ""; | |||||
char wavefile[120]; | char wavefile[120]; | ||||
char textbuffile[L_tmpnam]; | char textbuffile[L_tmpnam]; | ||||
int sample_rate_index; // current value | int sample_rate_index; // current value | ||||
static int callback_inhibit = 0; | static int callback_inhibit = 0; | ||||
static int more_text=0; | static int more_text=0; | ||||
#define N_VOICE_NAMES 40 | |||||
#define N_VOICE_NAMES 60 | |||||
static char *voice_names[40]; | static char *voice_names[40]; | ||||
#define N_STATIC_BUF 8000 | #define N_STATIC_BUF 8000 | ||||
USHORT voice_pcnt[N_PEAKS+1][3]; | USHORT voice_pcnt[N_PEAKS+1][3]; | ||||
voice_t voice_data; | |||||
voice_t *voice; | |||||
static const char *help_text = | static const char *help_text = | ||||
"\nspeak [options] [\"<words>\"]\n\n" | "\nspeak [options] [\"<words>\"]\n\n" | ||||
"-f <text file> Text file to speak\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" | "If neither -f nor --stdin, <words> are spoken, or if none then text is\n" | ||||
"spoken from stdin, each line separately.\n\n" | "spoken from stdin, each line separately.\n\n" | ||||
"-a <integer>\n" | "-a <integer>\n" | ||||
"\t Amplitude, 0 to 200, default is 100\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" | "-l <integer>\n" | ||||
"\t Line length. If not zero (which is the default), consider\n" | "\t Line length. If not zero (which is the default), consider\n" | ||||
"\t lines less than this length as end-of-clause\n" | "\t lines less than this length as end-of-clause\n" | ||||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n" | "-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 phoneme mnemonics to stdout\n" | ||||
"-X\t Write phonemes mnemonics and translation trace 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" | "--compile=<voice name>\n" | ||||
"\t Compile the pronunciation rules and dictionary in the current\n" | "\t Compile the pronunciation rules and dictionary in the current\n" | ||||
"\t directory. =<voice name> is optional and specifies which language\n" | "\t directory. =<voice name> is optional and specifies which language\n" | ||||
"--punct=\"<characters>\"\n" | "--punct=\"<characters>\"\n" | ||||
"\t Speak the names of punctuation characters during speaking. If\n" | "\t Speak the names of punctuation characters during speaking. If\n" | ||||
"\t =<characters> is omitted, all punctuation is spoken.\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) | int GetFileLength(const char *filename) | ||||
_kernel_swi_regs regs; | _kernel_swi_regs regs; | ||||
_kernel_oserror *error; | _kernel_oserror *error; | ||||
char buf[80]; | char buf[80]; | ||||
char directory2[80]; | |||||
char directory2[sizeof(path_home)+100]; | |||||
regs.r[0] = 10; | regs.r[0] = 10; | ||||
regs.r[1] = (int)directory; | regs.r[1] = (int)directory; | ||||
void ReadVoiceNames() | 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++) | for(n_voice_files=0; n_voice_files<N_VOICE_NAMES; n_voice_files++) | ||||
voice_names[n_voice_files] = NULL; | voice_names[n_voice_files] = NULL; | ||||
void Free(void *ptr) | void Free(void *ptr) | ||||
/******************/ | |||||
/*******************/ | |||||
{ // version of free() for use in RISC_OS module | { // version of free() for use in RISC_OS module | ||||
_kernel_swi_regs regs; | _kernel_swi_regs regs; | ||||
return; | return; | ||||
regs.r[0] = 7; | regs.r[0] = 7; | ||||
regs.r[2] = (int)ptr; | |||||
regs.r[2] = (int)(ptr); | |||||
_kernel_swi(0x1e, ®s, ®s); /* OS_Module 7 free memory */ | _kernel_swi(0x1e, ®s, ®s); /* OS_Module 7 free memory */ | ||||
} /* end of Free */ | } /* end of Free */ | ||||
return(p); | return(p); | ||||
} | } | ||||
void Free(void *ptr) | |||||
void Free(void **ptr) | |||||
{//================= | {//================= | ||||
free(ptr); | |||||
if(ptr != NULL) | |||||
{ | |||||
free(ptr); | |||||
} | |||||
} | } | ||||
#endif | #endif | ||||
WavegenInit(22050,0); | WavegenInit(22050,0); | ||||
LoadPhData(); | LoadPhData(); | ||||
SetVoiceStack(NULL); | |||||
SynthesizeInit(); | SynthesizeInit(); | ||||
return(0); | return(0); | ||||
} | } | ||||
if((voice_num >= 0) && (voice_num != current_voice_num) && (voice_num < N_VOICE_NAMES)) | 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); | WavegenSetVoice(voice); | ||||
} | } | ||||
current_voice_num = voice_num; | current_voice_num = voice_num; | ||||
case 6: /* update voice data, r1 = voice_number */ | case 6: /* update voice data, r1 = voice_number */ | ||||
if(r[1] < N_VOICE_NAMES) | if(r[1] < N_VOICE_NAMES) | ||||
{ | { | ||||
LoadVoice(voice_names[r[1]],0); | |||||
SetVoiceByName(voice_names[r[1]]); | |||||
current_voice_num = r[1]; | current_voice_num = r[1]; | ||||
WavegenSetVoice(voice); | WavegenSetVoice(voice); | ||||
} | } | ||||
break; | break; | ||||
case 9: /* word_gap */ | case 9: /* word_gap */ | ||||
// not implemented | |||||
SetParameter(espeakWORDGAP,value,0); | |||||
break; | break; | ||||
case 10: /* pitch_range */ | case 10: /* pitch_range */ | ||||
void PitchAdjust(int pitch_adjustment) | void PitchAdjust(int pitch_adjustment) | ||||
{//=================================== | {//=================================== | ||||
int ix, factor; | 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; | voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128; | ||||
int value; | int value; | ||||
int speed; | int speed; | ||||
int amp; | int amp; | ||||
int wordgap; | |||||
int speaking = 0; | int speaking = 0; | ||||
int flag_stdin = 0; | int flag_stdin = 0; | ||||
int flag_compile = 0; | int flag_compile = 0; | ||||
p++; | p++; | ||||
switch(*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; | 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': | case 'k': | ||||
option_capitals = param_number(&p); | option_capitals = param_number(&p); | ||||
SetParameter(espeakCAPITALS,option_capitals,0); | SetParameter(espeakCAPITALS,option_capitals,0); | ||||
break; | break; | ||||
case 'l': | |||||
option_linelength = param_number(&p); | |||||
case 'x': | |||||
option_phonemes = 1; | |||||
break; | |||||
case 'X': | |||||
option_phonemes = 2; | |||||
break; | break; | ||||
case 'm': | |||||
option_ssml = 1; | |||||
break; | |||||
case 'p': | case 'p': | ||||
pitch_adjustment = param_number(&p); | pitch_adjustment = param_number(&p); | ||||
break; | break; | ||||
option_quiet = 1; | option_quiet = 1; | ||||
break; | 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': | case 's': | ||||
speed = param_number(&p); | speed = param_number(&p); | ||||
SetParameter(espeakRATE,speed,0); | SetParameter(espeakRATE,speed,0); | ||||
break; | break; | ||||
case 'g': | |||||
wordgap = param_number(&p); | |||||
SetParameter(espeakWORDGAP,wordgap,0); | |||||
break; | |||||
case 'v': | case 'v': | ||||
strcpy(voicename,param_string(&p)); | |||||
strncpy0(voicename,param_string(&p),sizeof(voicename)); | |||||
break; | break; | ||||
case 'w': | case 'w': | ||||
option_waveout=1; | 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; | break; | ||||
case '-': | case '-': | ||||
strcpy(command,param_string(&p)); | |||||
strncpy0(command,param_string(&p),sizeof(command)); | |||||
if(memcmp(command,"compile=",8)==0) | if(memcmp(command,"compile=",8)==0) | ||||
{ | { | ||||
CompileDictionary(NULL,&command[8],NULL,NULL); | CompileDictionary(NULL,&command[8],NULL,NULL); | ||||
else | else | ||||
if(strcmp(command,"help")==0) | 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; | return; | ||||
} | } | ||||
else | else | ||||
} | } | ||||
} | } | ||||
LoadVoice(voicename,0); | |||||
SetVoiceByName(voicename); | |||||
if((filename[0]==0) && (p[0]=='\r')) | if((filename[0]==0) && (p[0]=='\r')) | ||||
{ | { | ||||
} | } | ||||
ReadVoiceNames(); | ReadVoiceNames(); | ||||
LoadVoice("default",0); | |||||
SetVoiceByName("default"); | |||||
for(param=0; param<N_SPEECH_PARAM; param++) | for(param=0; param<N_SPEECH_PARAM; param++) | ||||
param_stack[0].parameter[param] = param_defaults[param]; | param_stack[0].parameter[param] = param_defaults[param]; |
// Header file for RISCOS build | // Header file for RISCOS build | ||||
#define N_PEAKS 9 | |||||
#define N_MARKERS 7 | |||||
// comment this out when compiling the "speak" process | // comment this out when compiling the "speak" process | ||||
//#define SPECT_EDITOR | //#define SPECT_EDITOR | ||||
} MNEM_TAB; | } MNEM_TAB; | ||||
int LookupMnem(MNEM_TAB *table, char *string); | 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 int GetFileLength(const char *filename); | ||||
extern char *Alloc(int size); | extern char *Alloc(int size); | ||||
extern void Free(void *ptr); | 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); | const int wcslen(const wchar_t *str); | ||||
int iswdigit(int c); | int iswdigit(int c); | ||||
int iswalnum(int c); | int iswalnum(int c); | ||||
int towlower(int c); | int towlower(int c); | ||||
int towupper(int c); | |||||
int iswupper(int c); | int iswupper(int c); | ||||
int iswlower(int c); | int iswlower(int c); | ||||
int iswspace(int c); | int iswspace(int c); |
initialisation-code: user_init | initialisation-code: user_init | ||||
title-string: Speak | 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-chunk-base-number: &4ad80 | ||||
swi-handler-code: swi_handler | swi-handler-code: swi_handler |
[Setup] | [Setup] | ||||
AppName=eSpeak | 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 | DefaultDirName={pf}\eSpeak | ||||
DefaultGroupName=eSpeak | DefaultGroupName=eSpeak | ||||
Source: "espeak_sapi.dll"; DestDir: "{app}"; Flags: regserver promptifolder replacesameversion | Source: "espeak_sapi.dll"; DestDir: "{app}"; Flags: regserver promptifolder replacesameversion | ||||
Source: "TTSApp.exe"; DestDir:"{app}" | Source: "TTSApp.exe"; DestDir:"{app}" | ||||
Source: "espeak-data\*"; DestDir: "{app}\espeak-data"; Flags: recursesubdirs | 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: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs | ||||
Source: "command_line\*"; DestDir: "{app}\command_line" | Source: "command_line\*"; DestDir: "{app}\command_line" | ||||
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme | Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme | ||||
begin | begin | ||||
lang_main := language and $3ff; | lang_main := language and $3ff; | ||||
Result := 'af'; | |||||
Result := 'en'; | |||||
// translation from microsoft codes to language codes | // translation from microsoft codes to language codes | ||||
case lang_main of | case lang_main of | ||||
$04: Result := 'zh'; | |||||
$05: Result := 'cs'; | $05: Result := 'cs'; | ||||
$07: Result := 'de'; | $07: Result := 'de'; | ||||
$08: Result := 'el'; | $08: Result := 'el'; | ||||
$09: Result := 'en'; | |||||
$0a: Result := 'es'; | $0a: Result := 'es'; | ||||
$0b: Result := 'fi'; | $0b: Result := 'fi'; | ||||
$0c: Result := 'fr'; | $0c: Result := 'fr'; | ||||
'sv': value := $41d; | 'sv': value := $41d; | ||||
'sw': value := $441; | 'sw': value := $441; | ||||
'vi': value := $42a; | 'vi': value := $42a; | ||||
'zh': value := $804; | |||||
// mbrola voices | // mbrola voices | ||||
'-af': value := $436; | '-af': value := $436; | ||||
'-br': value := $416; | '-br': value := $416; | ||||
UIVoice := VoiceFromLanguage(UILanguage); | UIVoice := VoiceFromLanguage(UILanguage); | ||||
// Set initial values (optional) | // 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; | end; | ||||
[Setup] | [Setup] | ||||
AppName=eSpeakEdit | AppName=eSpeakEdit | ||||
AppVerName=eSpeakEdit version 1.29 | |||||
AppVerName=eSpeakEdit version 1.30 | |||||
DefaultDirName={pf}\eSpeak | DefaultDirName={pf}\eSpeak | ||||
DefaultGroupName=eSpeak | DefaultGroupName=eSpeak | ||||
OutputBaseFilename=setup_espeakedit | OutputBaseFilename=setup_espeakedit | ||||
[Files] | [Files] | ||||
Source: "espeakedit.exe"; DestDir: "{app}" | 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: "espeakedit\*"; DestDir: "{app}\espeakedit"; Flags: recursesubdirs | ||||
Source: "phsource\*"; DestDir: "{app}\phsource"; Flags: recursesubdirs | Source: "phsource\*"; DestDir: "{app}\phsource"; Flags: recursesubdirs | ||||
Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs | Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs |
// | // | ||||
VS_VERSION_INFO VERSIONINFO | 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 | FILEFLAGSMASK 0x3fL | ||||
#ifdef _DEBUG | #ifdef _DEBUG | ||||
FILEFLAGS 0x1L | FILEFLAGS 0x1L | ||||
VALUE "Comments", "\0" | VALUE "Comments", "\0" | ||||
VALUE "CompanyName", "Jonathan Duddington\0" | VALUE "CompanyName", "Jonathan Duddington\0" | ||||
VALUE "FileDescription", "Text to Speech\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 "LegalCopyright", "Copyright (c) Jonathan Duddington\0" | ||||
VALUE "LegalTrademarks", "\0" | VALUE "LegalTrademarks", "\0" | ||||
VALUE "OriginalFilename", "espeak_sapi.dll\0" | VALUE "OriginalFilename", "espeak_sapi.dll\0" | ||||
VALUE "PrivateBuild", "\0" | VALUE "PrivateBuild", "\0" | ||||
VALUE "ProductName", "espeak TTS\0" | VALUE "ProductName", "espeak TTS\0" | ||||
VALUE "ProductVersion", "1, 0, 24, 00\0" | |||||
VALUE "ProductVersion", "1, 0, 30, 00\0" | |||||
VALUE "SpecialBuild", "\0" | VALUE "SpecialBuild", "\0" | ||||
END | END | ||||
END | END |
w = word; | w = word; | ||||
while(*p == *w) | while(*p == *w) | ||||
{ | { | ||||
*w++; | |||||
*p++; | |||||
w++; | |||||
p++; | |||||
} | } | ||||
if(*p == 0) | if(*p == 0) | ||||
return(w-word); // matched a complete string | return(w-word); // matched a complete string |
"spoken from stdin, each line separately.\n\n" | "spoken from stdin, each line separately.\n\n" | ||||
"-a <integer>\n" | "-a <integer>\n" | ||||
"\t Amplitude, 0 to 200, default is 100\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" | "-l <integer>\n" | ||||
"\t Line length. If not zero (which is the default), consider\n" | "\t Line length. If not zero (which is the default), consider\n" | ||||
"\t lines less than this length as end-of-clause\n" | "\t lines less than this length as end-of-clause\n" | ||||
int volume = -1; | int volume = -1; | ||||
int speed = -1; | int speed = -1; | ||||
int pitch = -1; | int pitch = -1; | ||||
int wordgap = -1; | |||||
int option_capitals = -1; | int option_capitals = -1; | ||||
int option_punctuation = -1; | int option_punctuation = -1; | ||||
int option_phonemes = -1; | int option_phonemes = -1; | ||||
while(true) | 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); | long_options, &option_index); | ||||
/* Detect the end of the options. */ | /* Detect the end of the options. */ | ||||
speed = atoi(optarg); | speed = atoi(optarg); | ||||
break; | break; | ||||
case 'g': | |||||
wordgap = atoi(optarg); | |||||
break; | |||||
case 'v': | case 'v': | ||||
strncpy0(voicename,optarg,sizeof(voicename)); | strncpy0(voicename,optarg,sizeof(voicename)); | ||||
break; | break; | ||||
espeak_SetParameter(espeakCAPITALS,option_capitals,0); | espeak_SetParameter(espeakCAPITALS,option_capitals,0); | ||||
if(option_punctuation >= 0) | if(option_punctuation >= 0) | ||||
espeak_SetParameter(espeakPUNCTUATION,option_punctuation,0); | espeak_SetParameter(espeakPUNCTUATION,option_punctuation,0); | ||||
if(wordgap >= 0) | |||||
espeak_SetParameter(espeakWORDGAP,wordgap,0); | |||||
if(option_linelength > 0) | if(option_linelength > 0) | ||||
espeak_SetParameter(espeakLINELENGTH,option_linelength,0); | espeak_SetParameter(espeakLINELENGTH,option_linelength,0); | ||||
if(option_punctuation == 2) | if(option_punctuation == 2) |
unsigned char tail_shape; | unsigned char tail_shape; | ||||
} TONE_TABLE; | } TONE_TABLE; | ||||
#define N_TONE_TABLE 15 | |||||
#define N_TONE_TABLE 11 | |||||
static TONE_TABLE tone_table[N_TONE_TABLE] = { | 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}, | 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}, | 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}, | 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}, | 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 */ | /* indexed by stress */ | ||||
static int min_drop[] = {0x300,0x300,0x400,0x400,0x900,0x900,0x900,0xb00}; | static int min_drop[] = {0x300,0x300,0x400,0x400,0x900,0x900,0x900,0xb00}; | ||||
int max_stress = 0; | int max_stress = 0; | ||||
int max_stress_posn = 0; // last syllable ot the highest stress | int max_stress_posn = 0; // last syllable ot the highest stress | ||||
int max_stress_posn2 = 0; // penuntimate syllable of 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_pre = -1; /* number of vowels before 1st primary stress */ | ||||
number_body = 0; | number_body = 0; | ||||
number_tail = 0; /* number between tonic syllable and next primary */ | number_tail = 0; /* number between tonic syllable and next primary */ | ||||
last_primary = -1; | last_primary = -1; | ||||
last2_primary = 0; | |||||
for(ix=start; ix<end; ix++) | for(ix=start; ix<end; ix++) | ||||
{ | { | ||||
/* body of tonic segment */ | /* 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); | ix = calc_pitch_segment(ix,tone_posn, t, PRIMARY, continuing); | ||||
if(no_tonic) | if(no_tonic) | ||||
syllable_tab = syllable_tab2; // don't use permanent storage. it's only needed during the call of CalcPitches() | 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); | CalcPitches_Tone(clause_type); | ||||
return; | return; | ||||
} | } | ||||
option = option_tone1 & 0xf; | |||||
if(option > 4) | |||||
option = langopts.intonation_group; | |||||
if(option > INTONATION_TYPES) | |||||
option = 0; | 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 | group_tone_emph = punct_to_tone[option][5]; // emphatic form of statement | ||||
if(clause_type == 4) | if(clause_type == 4) |
{ | { | ||||
insert_ph = pause_phonemes[x]; | insert_ph = pause_phonemes[x]; | ||||
} | } | ||||
if(option_wordgap > 0) | |||||
{ | |||||
insert_ph = phonPAUSE_LONG; | |||||
} | |||||
} | } | ||||
next2 = phoneme_tab[(plist2+2)->phcode]; | next2 = phoneme_tab[(plist2+2)->phcode]; | ||||
} | } | ||||
phlist[ix].length = ph->std_length; | 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) | if(ph->type==phVOWEL || ph->type==phLIQUID || ph->type==phNASAL || ph->type==phVSTOP || ph->type==phVFRICATIVE) | ||||
{ | { |
const int param_defaults[N_SPEECH_PARAM] = { | const int param_defaults[N_SPEECH_PARAM] = { | ||||
0, // silence (internal use) | 0, // silence (internal use) | ||||
165, // rate wpm | |||||
170, // rate wpm | |||||
100, // volume | 100, // volume | ||||
50, // pitch | 50, // pitch | ||||
50, // range | 50, // range | ||||
0, // punctuation | 0, // punctuation | ||||
0, // capital letters | 0, // capital letters | ||||
0, // wordgap | |||||
0, // options | |||||
0, // intonation | |||||
0, | |||||
0, | |||||
0, // emphasis | 0, // emphasis | ||||
0, // line length | 0, // line length | ||||
0, // voice type | 0, // voice type |
embedded_value[EMBED_R] = new_value; | embedded_value[EMBED_R] = new_value; | ||||
break; | break; | ||||
case espeakPUNCTUATION: | |||||
case espeakLINELENGTH: | |||||
option_linelength = new_value; | |||||
break; | break; | ||||
case espeakCAPITALS: | |||||
case espeakWORDGAP: | |||||
option_wordgap = new_value; | |||||
break; | 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; | break; | ||||
default: | default: |
"spoken from stdin, each line separately.\n\n" | "spoken from stdin, each line separately.\n\n" | ||||
"-a <integer>\n" | "-a <integer>\n" | ||||
"\t Amplitude, 0 to 200, default is 100\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" | "-l <integer>\n" | ||||
"\t Line length. If not zero (which is the default), consider\n" | "\t Line length. If not zero (which is the default), consider\n" | ||||
"\t lines less than this length as end-of-clause\n" | "\t lines less than this length as end-of-clause\n" | ||||
int ix; | int ix; | ||||
char *optarg2; | char *optarg2; | ||||
int amp = 100; // default | int amp = 100; // default | ||||
int wordgap = 0; | |||||
int speaking = 0; | int speaking = 0; | ||||
int quiet = 0; | int quiet = 0; | ||||
int flag_stdin = 0; | int flag_stdin = 0; | ||||
option_linelength = 0; | option_linelength = 0; | ||||
option_phonemes = 0; | option_phonemes = 0; | ||||
option_waveout = 0; | option_waveout = 0; | ||||
option_wordgap = 0; | |||||
option_multibyte = espeakCHARS_AUTO; // auto | option_multibyte = espeakCHARS_AUTO; // auto | ||||
f_trans = stdout; | f_trans = stdout; | ||||
#else | #else | ||||
while(true) | 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); | long_options, &option_index); | ||||
/* Detect the end of the options. */ | /* Detect the end of the options. */ | ||||
speed = atoi(optarg2); | speed = atoi(optarg2); | ||||
break; | break; | ||||
case 'g': | |||||
wordgap = atoi(optarg2); | |||||
break; | |||||
case 'v': | case 'v': | ||||
strncpy0(voicename,optarg2,sizeof(voicename)); | strncpy0(voicename,optarg2,sizeof(voicename)); | ||||
break; | break; | ||||
SetParameter(espeakVOLUME,amp,0); | SetParameter(espeakVOLUME,amp,0); | ||||
SetParameter(espeakCAPITALS,option_capitals,0); | SetParameter(espeakCAPITALS,option_capitals,0); | ||||
SetParameter(espeakPUNCTUATION,option_punctuation,0); | SetParameter(espeakPUNCTUATION,option_punctuation,0); | ||||
SetParameter(espeakWORDGAP,wordgap,0); | |||||
if(pitch_adjustment != 50) | if(pitch_adjustment != 50) | ||||
{ | { |
sprintf(path_home,"%s\\espeak-data",buf); | sprintf(path_home,"%s\\espeak-data",buf); | ||||
#else | #else | ||||
// char *env; | |||||
char *env; | |||||
if(path != NULL) | if(path != NULL) | ||||
{ | { | ||||
return; | 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")); | snprintf(path_home,sizeof(path_home),"%s/espeak-data",getenv("HOME")); | ||||
if(access(path_home,R_OK) != 0) | if(access(path_home,R_OK) != 0) | ||||
int result; | int result; | ||||
#ifndef __WIN32__ | #ifndef __WIN32__ | ||||
LoadConfig(); // causes problem on Windows, don't know why | |||||
LoadConfig(); | |||||
#endif | #endif | ||||
WavegenInit(22050,0); // 22050 | WavegenInit(22050,0); // 22050 | ||||
if((result = LoadPhData()) != 1) | if((result = LoadPhData()) != 1) | ||||
SetParameter(espeakVOLUME,100,0); | SetParameter(espeakVOLUME,100,0); | ||||
SetParameter(espeakCAPITALS,option_capitals,0); | SetParameter(espeakCAPITALS,option_capitals,0); | ||||
SetParameter(espeakPUNCTUATION,option_punctuation,0); | SetParameter(espeakPUNCTUATION,option_punctuation,0); | ||||
SetParameter(espeakWORDGAP,0,0); | |||||
DoVoiceChange(voice); | DoVoiceChange(voice); | ||||
#ifdef USE_ASYNC | #ifdef USE_ASYNC |
#include <stdio.h> | #include <stdio.h> | ||||
#define ESPEAK_API_REVISION 2 | |||||
#define ESPEAK_API_REVISION 3 | |||||
/* | /* | ||||
Revision 2 | Revision 2 | ||||
Added parameter "options" to eSpeakInitialize() | Added parameter "options" to eSpeakInitialize() | ||||
Revision 3 | |||||
Added espeakWORDGAP to espeak_PARAMETER | |||||
*/ | */ | ||||
/********************/ | /********************/ | ||||
/* Initialization */ | /* Initialization */ | ||||
EE_INTERNAL_ERROR. | EE_INTERNAL_ERROR. | ||||
*/ | */ | ||||
/* Note, there is no function to play a sound icon. This would be done by the calling program */ | |||||
typedef enum { | typedef enum { | ||||
espeakSILENCE=0, /* internal use */ | 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 */ | espeakEMPHASIS, /* internal use */ | ||||
espeakLINELENGTH, /* internal use */ | espeakLINELENGTH, /* internal use */ | ||||
espeakVOICETYPE, // internal, 1=mbrola | espeakVOICETYPE, // internal, 1=mbrola | ||||
espeakPUNCTUATION: which punctuation characters to announce: | espeakPUNCTUATION: which punctuation characters to announce: | ||||
value in espeak_PUNCT_TYPE (none, all, some), | 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: | espeakCAPITALS: announce capital letters by: | ||||
0=none, | 0=none, | ||||
3 or higher, by raising pitch. This values gives the amount in Hz by which the pitch | 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. | 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 | Return: EE_OK: operation achieved | ||||
EE_BUFFER_FULL: the command can not be buffered; | EE_BUFFER_FULL: the command can not be buffered; | ||||
you may try after a while to call the function again. | you may try after a while to call the function again. |
#include "speech.h" | #include "speech.h" | ||||
#include "speak_lib.h" | #include "speak_lib.h" | ||||
#include "voice.h" | |||||
#include "phoneme.h" | #include "phoneme.h" | ||||
#include "synthesize.h" | #include "synthesize.h" | ||||
#include "voice.h" | |||||
#include "translate.h" | #include "translate.h" | ||||
#define os_X 0x20000 | #define os_X 0x20000 | ||||
FILE *f_text; | FILE *f_text; | ||||
int (* uri_callback)(int, const char *, const char *) = NULL; | int (* uri_callback)(int, const char *, const char *) = NULL; | ||||
int (* phoneme_callback)(const char *) = NULL; | |||||
int amp = 8; // default | int amp = 8; // default | ||||
char path_home[80] = ""; | |||||
char path_home[N_PATH_HOME] = ""; | |||||
char wavefile[120]; | char wavefile[120]; | ||||
char textbuffile[L_tmpnam]; | char textbuffile[L_tmpnam]; | ||||
int sample_rate_index; // current value | int sample_rate_index; // current value | ||||
static int callback_inhibit = 0; | static int callback_inhibit = 0; | ||||
static int more_text=0; | static int more_text=0; | ||||
#define N_VOICE_NAMES 40 | |||||
#define N_VOICE_NAMES 60 | |||||
static char *voice_names[40]; | static char *voice_names[40]; | ||||
#define N_STATIC_BUF 8000 | #define N_STATIC_BUF 8000 | ||||
static const char *help_text = | static const char *help_text = | ||||
"\nspeak [options] [\"<words>\"]\n\n" | "\nspeak [options] [\"<words>\"]\n\n" | ||||
"-f <text file> Text file to speak\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" | "If neither -f nor --stdin, <words> are spoken, or if none then text is\n" | ||||
"spoken from stdin, each line separately.\n\n" | "spoken from stdin, each line separately.\n\n" | ||||
"-a <integer>\n" | "-a <integer>\n" | ||||
"\t Amplitude, 0 to 200, default is 100\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" | "-l <integer>\n" | ||||
"\t Line length. If not zero (which is the default), consider\n" | "\t Line length. If not zero (which is the default), consider\n" | ||||
"\t lines less than this length as end-of-clause\n" | "\t lines less than this length as end-of-clause\n" | ||||
"-q\t Quiet, don't produce any speech (may be useful with -x)\n" | "-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 phoneme mnemonics to stdout\n" | ||||
"-X\t Write phonemes mnemonics and translation trace 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" | "--compile=<voice name>\n" | ||||
"\t Compile the pronunciation rules and dictionary in the current\n" | "\t Compile the pronunciation rules and dictionary in the current\n" | ||||
"\t directory. =<voice name> is optional and specifies which language\n" | "\t directory. =<voice name> is optional and specifies which language\n" | ||||
"--punct=\"<characters>\"\n" | "--punct=\"<characters>\"\n" | ||||
"\t Speak the names of punctuation characters during speaking. If\n" | "\t Speak the names of punctuation characters during speaking. If\n" | ||||
"\t =<characters> is omitted, all punctuation is spoken.\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) | int GetFileLength(const char *filename) | ||||
break; | break; | ||||
case 9: /* word_gap */ | case 9: /* word_gap */ | ||||
// not implemented | |||||
SetParameter(espeakWORDGAP,value,0); | |||||
break; | break; | ||||
case 10: /* pitch_range */ | case 10: /* pitch_range */ | ||||
void PitchAdjust(int pitch_adjustment) | void PitchAdjust(int pitch_adjustment) | ||||
{//=================================== | {//=================================== | ||||
int ix, factor; | 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; | voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128; | ||||
int value; | int value; | ||||
int speed; | int speed; | ||||
int amp; | int amp; | ||||
int wordgap; | |||||
int speaking = 0; | int speaking = 0; | ||||
int flag_stdin = 0; | int flag_stdin = 0; | ||||
int flag_compile = 0; | int flag_compile = 0; | ||||
p++; | p++; | ||||
switch(*p++) | switch(*p++) | ||||
{ | { | ||||
case 'h': | |||||
printf("\nspeak text-to-speech: %s\n%s",version_string,help_text); | |||||
return; | |||||
case 'b': | case 'b': | ||||
option_multibyte = espeakCHARS_8BIT; | option_multibyte = espeakCHARS_8BIT; | ||||
break; | 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': | case 'k': | ||||
option_capitals = param_number(&p); | option_capitals = param_number(&p); | ||||
SetParameter(espeakCAPITALS,option_capitals,0); | SetParameter(espeakCAPITALS,option_capitals,0); | ||||
break; | break; | ||||
case 'l': | |||||
option_linelength = param_number(&p); | |||||
case 'x': | |||||
option_phonemes = 1; | |||||
break; | break; | ||||
case 'X': | |||||
option_phonemes = 2; | |||||
break; | |||||
case 'm': | |||||
option_ssml = 1; | |||||
break; | |||||
case 'p': | case 'p': | ||||
pitch_adjustment = param_number(&p); | pitch_adjustment = param_number(&p); | ||||
break; | break; | ||||
option_quiet = 1; | option_quiet = 1; | ||||
break; | 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': | case 's': | ||||
speed = param_number(&p); | speed = param_number(&p); | ||||
SetParameter(espeakRATE,speed,0); | SetParameter(espeakRATE,speed,0); | ||||
break; | break; | ||||
case 'g': | |||||
wordgap = param_number(&p); | |||||
SetParameter(espeakWORDGAP,wordgap,0); | |||||
break; | |||||
case 'v': | case 'v': | ||||
strncpy0(voicename,param_string(&p),sizeof(voicename)); | strncpy0(voicename,param_string(&p),sizeof(voicename)); | ||||
break; | break; | ||||
strncpy0(wavefile,param_string(&p),sizeof(wavefile)); | strncpy0(wavefile,param_string(&p),sizeof(wavefile)); | ||||
break; | break; | ||||
case 'x': | |||||
option_phonemes = 1; | |||||
break; | |||||
case 'X': | |||||
option_phonemes = 2; | |||||
break; | |||||
case '-': | case '-': | ||||
strncpy0(command,param_string(&p),sizeof(command)); | strncpy0(command,param_string(&p),sizeof(command)); | ||||
if(memcmp(command,"compile=",8)==0) | if(memcmp(command,"compile=",8)==0) | ||||
else | else | ||||
if(strcmp(command,"help")==0) | 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; | return; | ||||
} | } | ||||
else | else |
#include "translate.h" | #include "translate.h" | ||||
#include "wave.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; | int option_device_number = -1; | ||||
langopts.stress_rule = 0; | langopts.stress_rule = 0; | ||||
langopts.numbers = 0x41 + NUM_ROMAN; | 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 | |||||
} | } | ||||
case L('c','y'): // Welsh | 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(); | tr = new Translator(); | ||||
SetupTranslator(tr,stress_lengths_cy,stress_amps_cy); | SetupTranslator(tr,stress_lengths_cy,stress_amps_cy); | ||||
tr->charset_a0 = charsets[14]; // ISO-8859-14 | 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.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable | ||||
tr->langopts.stress_rule = 2; | tr->langopts.stress_rule = 2; | ||||
// tr->langopts.intonation_group = 4; | |||||
// 'diminished' is an unstressed final syllable | // 'diminished' is an unstressed final syllable | ||||
tr->langopts.stress_flags = 0x6 | 0x10; | tr->langopts.stress_flags = 0x6 | 0x10; | ||||
SetLetterVowel(tr,'y'); | SetLetterVowel(tr,'y'); | ||||
tr->langopts.max_initial_consonants = 2; | tr->langopts.max_initial_consonants = 2; | ||||
tr->langopts.spelling_stress = 1; | 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; | break; | ||||
tr->langopts.stress_rule = 3; // stress on final syllable | tr->langopts.stress_rule = 3; // stress on final syllable | ||||
tr->langopts.stress_flags = 0x6 | 0x10 | 0x20000; | tr->langopts.stress_flags = 0x6 | 0x10 | 0x20000; | ||||
tr->langopts.numbers = 0xa69 + 0x2000 + NUM_ROMAN; | tr->langopts.numbers = 0xa69 + 0x2000 + NUM_ROMAN; | ||||
tr->punct_to_tone[0][3] = 2; // use exclamation intonation | |||||
SetLetterVowel(tr,'y'); | SetLetterVowel(tr,'y'); | ||||
} | } | ||||
break; | break; | ||||
tr->langopts.stress_rule = 6; // stress on last heaviest syllable, excluding final syllable | 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.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; | tr->letter_bits_offset = OFFSET_TAMIL; | ||||
memset(tr->letter_bits,0,sizeof(tr->letter_bits)); | memset(tr->letter_bits,0,sizeof(tr->letter_bits)); | ||||
tr->langopts.vowel_pause = 4; | tr->langopts.vowel_pause = 4; | ||||
tr->letter_groups[0] = vowels_vi; | tr->letter_groups[0] = vowels_vi; | ||||
// tr->langopts.param[LOPT_UNPRONOUNCABLE] = 1; // disable check for unpronouncable words | // 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; | tr->langopts.unstressed_wd1 = 2; | ||||
} | } | ||||
tr->langopts.stress_rule = 3; // stress on final syllable of a "word" | 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.stress_flags = 1; // don't automatically set diminished stress (may be set in the intonation module) | ||||
tr->langopts.vowel_pause = 0; | 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.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.tone_numbers = 1; // a number after letters indicates a tone number (eg. pinyin or jyutping) | ||||
tr->langopts.ideographs = 1; | tr->langopts.ideographs = 1; |
FILE *f_trans = NULL; // phoneme output text | FILE *f_trans = NULL; // phoneme output text | ||||
int option_tone1 = 0; | int option_tone1 = 0; | ||||
int option_tone2 = 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_phonemes = 0; | ||||
int option_phoneme_events = 0; | int option_phoneme_events = 0; | ||||
int option_quiet = 0; | int option_quiet = 0; | ||||
int option_sayas = 0; | int option_sayas = 0; | ||||
int option_sayas2 = 0; // used in translate_clause() | int option_sayas2 = 0; // used in translate_clause() | ||||
int option_emphasis = 0; // 0=normal, 1=normal, 2=weak, 3=moderate, 4=strong | 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_ssml = 0; | ||||
int option_phoneme_input = 1; // allow [[phonemes]] in input | int option_phoneme_input = 1; // allow [[phonemes]] in input | ||||
int option_phoneme_variants = 0; // 0= don't display phoneme variant mnemonics | int option_phoneme_variants = 0; // 0= don't display phoneme variant mnemonics | ||||
int option_wordgap = 0; | |||||
int count_sayas_digits; | int count_sayas_digits; | ||||
int skip_sentences; | int skip_sentences; | ||||
}; | }; | ||||
/* 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) | void SetLengthMods(Translator *tr, int value) | ||||
{//========================================== | {//========================================== | ||||
int value2; | int value2; | ||||
langopts.decimal_sep = '.'; | langopts.decimal_sep = '.'; | ||||
memcpy(punct_to_tone,punctuation_to_tone,sizeof(punct_to_tone)); | 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 | |||||
} | } | ||||
if((wflags & FLAG_ALL_UPPER) && (word_length > 1) && (clause_lower_count > 3) && iswalpha(first_char)) | 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 words which are in capitals | ||||
emphasize_allcaps = FLAG_EMPHASIZED; | emphasize_allcaps = FLAG_EMPHASIZED; |
int max_roman; | int max_roman; | ||||
int thousands_sep; | int thousands_sep; | ||||
int decimal_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 long_stop; // extra mS pause for a lengthened stop | ||||
int phoneme_change; // TEST, change phonemes, after translation | int phoneme_change; // TEST, change phonemes, after translation | ||||
char max_initial_consonants; | char max_initial_consonants; | ||||
const wchar_t *letter_groups[8]; | const wchar_t *letter_groups[8]; | ||||
/* index1=option, index2 by 0=. 1=, 2=?, 3=! 4=none */ | /* 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_dictrules; // language_1 translation rules file | ||||
char *data_dictlist; // language_2 dictionary lookup file | char *data_dictlist; // language_2 dictionary lookup file | ||||
extern int option_tone1; | extern int option_tone1; | ||||
extern int option_tone2; | 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_waveout; | ||||
extern int option_quiet; | extern int option_quiet; | ||||
extern int option_phonemes; | extern int option_phonemes; | ||||
extern int option_phoneme_input; // allow [[phonemes]] in input text | extern int option_phoneme_input; // allow [[phonemes]] in input text | ||||
extern int option_phoneme_variants; | extern int option_phoneme_variants; | ||||
extern int option_sayas; | extern int option_sayas; | ||||
extern int option_wordgap; | |||||
extern int count_characters; | extern int count_characters; | ||||
extern int count_words; | extern int count_words; | ||||
extern char skip_marker[N_MARKER_LENGTH]; | extern char skip_marker[N_MARKER_LENGTH]; | ||||
#define N_PUNCTLIST 60 | #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[]; | extern int speech_parameters[]; | ||||
short freq[N_PEAKS]; // 100% = 256 | short freq[N_PEAKS]; // 100% = 256 | ||||
short height[N_PEAKS]; // 100% = 256 | short height[N_PEAKS]; // 100% = 256 | ||||
short width[N_PEAKS]; // 100% = 256 | short width[N_PEAKS]; // 100% = 256 | ||||
short freqadd[N_PEAKS]; // Hz | |||||
// copies without temporary adjustments from embedded commands | // copies without temporary adjustments from embedded commands | ||||
short freq2[N_PEAKS]; // 100% = 256 | short freq2[N_PEAKS]; // 100% = 256 |
voice->width[pk] = 256; | voice->width[pk] = 256; | ||||
voice->breath[pk] = 0; | voice->breath[pk] = 0; | ||||
voice->breathw[pk] = breath_widths[pk]; // default breath formant woidths | voice->breathw[pk] = breath_widths[pk]; // default breath formant woidths | ||||
voice->freqadd[pk] = 0; | |||||
// adjust formant smoothing depending on sample rate | // adjust formant smoothing depending on sample rate | ||||
formant_rate[pk] = (formant_rate_22050[pk] * 22050)/samplerate; | formant_rate[pk] = (formant_rate_22050[pk] * 22050)/samplerate; | ||||
int freq = 100; | int freq = 100; | ||||
int height = 100; | int height = 100; | ||||
int width = 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) | if(ix < 2) | ||||
return; | return; | ||||
voice->height[formant] = int(height * 2.56001); | voice->height[formant] = int(height * 2.56001); | ||||
if(width >= 0) | if(width >= 0) | ||||
voice->width[formant] = int(width * 2.56001); | voice->width[formant] = int(width * 2.56001); | ||||
voice->freqadd[formant] = freqadd; | |||||
} | } | ||||
*p = 0; // remove previous variant name | *p = 0; // remove previous variant name | ||||
sprintf(buf,"+%s",&vname[3]); // omit !v/ from the variant filename | sprintf(buf,"+%s",&vname[3]); // omit !v/ from the variant filename | ||||
strcat(voice_identifier,buf); | strcat(voice_identifier,buf); | ||||
langopts = &translator->langopts; | |||||
} | } | ||||
VoiceReset(tone_only); | VoiceReset(tone_only); | ||||
break; | break; | ||||
case V_INTONATION: // intonation | case V_INTONATION: // intonation | ||||
sscanf(p,"%d %d",&option_tone1,&option_tone2); | |||||
sscanf(p,"%d %d",&langopts->intonation_group,&option_tone2); | |||||
break; | break; | ||||
case V_DICTRULES: // conditional dictionary rules and list entries | case V_DICTRULES: // conditional dictionary rules and list entries |
length4 = length2/4; | length4 = length2/4; | ||||
for(ix=0; ix<N_PEAKS; ix++) | 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); | 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].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; | peaks[ix].height1 = (fr1->fheight[ix] * v->height[ix]) << 6; |