Browse Source

[1.30.04] SSML <audio src=""> now works without using a UriCallback() function, and works with the command-line espeak.

Pitch changes for mbrola are now applied over the first 80% of the phoneme, not over the whole length of the phoneme.  This seems to give better intonation for mbrola voices.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@118 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 17 years ago
parent
commit
af575bc1db

+ 8
- 2
dictsource/af_list View File

natasha n%at'aSa natasha n%at'aSa
naudé nOd'e@ naudé nOd'e@
neil _^_EN neil _^_EN
ontong OntON
philip fIl@p philip fIl@p
phillips fIl@ps phillips fIl@ps
pierre p'e@r pierre p'e@r
petronella pe@trun'&la
petrus pe@trWs petrus pe@trWs
phoebe fi:bi phoebe fi:bi
rachmaninoff rax2m'aninOf rachmaninoff rax2m'aninOf
my $u $verbf my $u $verbf
jou $u $verbf jou $u $verbf
hom $u $verbf hom $u $verbf
haar $u $verbf haar $u $only $verbf
se s@ se s@


dis $u dis $u
onkunde $1 onkunde $1
onmag $1 onmag $1
onmin $1 onmin $1
oorleg $2
oorstroom $2
oplaas $2 oplaas $2
onraad $1 onraad $1
onrus $1 onrus $1
oorleef $2 oorleef $2
oorsee $2 oorsee $2
oorsese $2 oorsese $2
oorspronklike $2
oorval $2 $verb oorval $2 $verb
oudsher @Utsh&r


pandemonium pand@m'o@niWm pandemonium pand@m'o@niWm
parate par'A:t@ parate par'A:t@
petite p@tit petite p@tit
pinotage pinut'A:Z pinotage pinut'A:Z
pirouette p@ru:'Et pirouette p@ru:'Et
primaat $2
primate $2


rebelleer r@b@le@r rebelleer r@b@le@r
retireer r@t@re@:r retireer r@t@re@:r

+ 75
- 7
dictsource/af_rules View File

//maintainer: Willem van der Walt //maintainer: Willem van der Walt
// email: wvdwalt@csir.co.za // email: wvdwalt@csir.co.za
// tel: +27 12 8413996 // tel: +27 12 8413996
// Meraka Institute, CSIR // Meraka Institute, CSIR
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
skilf) e (r @ // fix e sound: skilferagtig/skilferdeeg/-kors/afgeskilferde/verskilfering skilf) e (r @ // fix e sound: skilferagtig/skilferdeeg/-kors/afgeskilferde/verskilfering
syf) e (r @ // fix e sound: (be-/in-/ont-/uitsyfering
CAC) e (rkK & // fix e sound: deurgewerk; exception to: CAC) e (CC CAC) e (rkK & // fix e sound: deurgewerk; exception to: CAC) e (CC
CAp) e (rkC @ // fix e sound: hiperkrities/koperkleurig/koperknope CAp) e (rkC @ // fix e sound: hiperkrities/koperkleurig/koperknope
CAw) e (rkA & // buitewerker/bywerking/genadewerking/grondbewerking/klerewerker/nawerking... CAw) e (rkA & // buitewerker/bywerking/genadewerking/grondbewerking/klerewerker/nawerking...
Cing) e (lA @ // fix e sound: dwingeland/klingeling/kringelend/tingeling Cing) e (lA @ // fix e sound: dwingeland/klingeling/kringelend/tingeling
maand) e (lA @ // fix e sound: (twee)maandelikse/maandelange maand) e (lA @ // fix e sound: (twee)maandelikse/maandelange
KeuC) e (lC@ @ // fix e sound: euweldaad/kneukelbeentjie/kreupelsorg/onkreukelbaar... KeuC) e (lC@ @ // fix e sound: euweldaad/kneukelbeentjie/kreupelsorg/onkreukelbaar...
@mp) e (lC@ @ // fix e sound: dompeldoop/-koker/-verwarmer/drumpeltrapper/pampelmoes/rimpelpapier...
@k) e (lde_ @ // fix e sound: gekronkelde/(ge/ver)kreukelde @k) e (lde_ @ // fix e sound: gekronkelde/(ge/ver)kreukelde
mp) e (lde_ @ // fix e sound: gemompelde/oorrompelde/verskrompelde and similar mp) e (lde_ @ // fix e sound: gemompelde/oorrompelde/verskrompelde and similar
@C) e (lk_ & // fix e sound: many compounds ending in kelk/melk @C) e (lk_ & // fix e sound: many compounds ending in kelk/melk
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
etjie ici &) etjie ici
Cn) etjies Eicis // kraaknetjies/hipernetjies Cn) etjies Eicis // kraaknetjies/hipernetjies
nn) etjies icis // kannetjies/mannetjies/pennetjies, etc. nn) etjies icis // kannetjies/mannetjies/pennetjies, etc.
&) elik (_S4 @l@k &) elik (_S4 @l@k
_) er (v &r' // ervaar/ervare/ervarings/ervaringe _) er (v &r' // ervaar/ervare/ervarings/ervaringe
&) ere (_ @r@ &) ere (_ @r@
@l) ere (_ e@r@ // fix e sound: staanlere/toonlere @l) ere (_ e@r@ // fix e sound: staanlere/toonlere
sw) ere (_ e@:r@ // fix e sound: pitswere and similar compounds
@) ery (_ @reI @) ery (_ @reI
@) ery (e_ @reI // fix 2nd e sound: delwerye and similar @) ery (e_ @reI // fix 2nd e sound: delwerye and similar
eti (ket %Et%i // shorten e sound and move stress: etiket/-te eti (ket %Et%i // shorten e sound and move stress: etiket/-te
_) e (ks %E //move default stress in words starting with eks _) e (ks %E //move default stress in words starting with eks
_C) e (on_ 'i //Leon, Deon etc. _C) e (on_ 'i //Leon, Deon etc.
CoeC) e (C+ @ //fix e in boetedoening, boedelbelasting and many others CoeC) e (C+ @ //fix e in boetedoening, boedelbelasting and many others
CoeC) e (tjie i // fix e sound: (water)poeletjie/(garing)spoeletjie/groenetjies, etc.
orr) e (l @ //fix e in borrel, orrel, korrel in compounds orr) e (l @ //fix e in borrel, orrel, korrel in compounds
intell) e (k %E //intellek, and friends intell) e (k %E //intellek, and friends
p) e (ring 'e@ //emansipering and others e sound and stress p) e (ring 'e@ //emansipering and others e sound and stress
flu (we fl%y // move default stress: fluweel/fluwele and compounds flu (we fl%y // move default stress: fluweel/fluwele and compounds
folio fo@li_u // fix o sounds: folio and compounds folio fo@li_u // fix o sounds: folio and compounds
@) fonie fun'i // kakofonie/simfonieorkes/telefonie @) fonie fun'i // kakofonie/simfonieorkes/telefonie
@) fonies f'o@nis // fix stress: simfoniese/polifonies/telefonies
fon (tein f%On // move default stress: fontein/fonteinwater, etc. fon (tein f%On // move default stress: fontein/fonteinwater, etc.
_) for (C f%Or // formeel/formele/forseer/fortuin _) for (C f%Or // formeel/formele/forseer/fortuin
fore (l f%ur& // fix stress and e sound: forel/-e and compounds fore (l f%ur& // fix stress and e sound: forel/-e and compounds
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. merino m@rin%u // fix stress and vowel sounds: merino/-skaap/-ram, etc.
me (rrie mE // fix e sound: merrie/-s/perdemerrie and similar compounds
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
oo) n (g n // hoongelag/loongeld/telefoongesprek/woongeriewe and similar oo) n (g n // hoongelag/loongeld/telefoongesprek/woongeriewe and similar
Cui) n (g n // basuingeskal/bruingebrand/bruingeel/tuingereedskap/tuingewas/tuingrond Cui) n (g n // basuingeskal/bruingebrand/bruingeel/tuingereedskap/tuingewas/tuingrond
y) n (g n // fyngoud/hooflyngesprek/langtermyngroei/kaplyngrens y) n (g n // fyngoud/hooflyngesprek/langtermyngroei/kaplyngrens
&) n (gat n // split "ng": mangat/-e/woongat/-e/opwengat/-e
ng (eer Nx2 // diftongeer/gedistingeerde/rangeer and compounds ng (eer Nx2 // diftongeer/gedistingeerde/rangeer and compounds
n (_g N n (_g N
ng (ent Nx2 // kontingent/tangent and derivitives ng (ent Nx2 // kontingent/tangent and derivitives
orang )(oet %ur%aN_ // fix stress and o sound: orangoetang and compounds 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
_) orde Ord@ // fix e sound: ordenende/ordening/ordeteken
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.
orgi (de %Orx2@ // move default stress: orgidee/orgideë and compounds orgi (de %Orx2@ // move default stress: orgidee/orgideë and compounds
orie o@ri orie o@ri
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 (raam %Om // move default stress: omraam and derivitives
om (ring %Om // move default stress om (ring %Om // move default stress
om (seil %Om // move default stress: (on)omseil(baar)
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 omsingel %OmsIN@l // fix stress: omsingel/fix e sound: omsingelde
_) om (sirkel %Om // move default stress: omsirkel and derivitives _) om (sirkel %Om // move default stress: omsirkel and derivitives
opera (K o@p@r%a // stress: opera/operas/operamusiek/-sanger opera (K o@p@r%a // stress: opera/operas/operamusiek/-sanger
opinie o@p'ini // opinie/-s opinie o@p'ini // opinie/-s
opium o@piWm // fix vowel sounds: opium and compounds opium o@piWm // fix vowel sounds: opium and compounds
_) opmerkli (k %Opm&rkl@ // move default stress: opmerklik/-e/-heid
op (nuut %Op // move default stress: opnuut op (nuut %Op // move default stress: opnuut
op (offer Op // fix o sound: selfopperende, etc. op (offer Op // fix o sound: selfopperende, etc.
oppon (A %Op@n // opponent/opponeer oppon (A %Op@n // opponent/opponeer
oppor (tu %Op%Or // fix stress, strip p: opportunis/-me/-ties/opportuun
_) op (reg %Op // move default stress: opreg/-te _) op (reg %Op // move default stress: opreg/-te
op (roerig %Op // oproerig/-e/-heid, but oproer op (roerig %Op // oproerig/-e/-heid, but oproer
op (ruien %Op // move default stress: opruiend/-e op (ruien %Op // move default stress: opruiend/-e
_) op (sy %Op // move default stress: opsy and compounds _) op (sy %Op // move default stress: opsy and compounds
op (standig %Op // move default stress: opstandig/-e/-heid op (standig %Op // move default stress: opstandig/-e/-heid
opti (mA %Opt%i // optimis/-me/-te/-ties/optimaal opti (mA %Opt%i // optimis/-me/-te/-ties/optimaal
_) opu (s o@pW // "op" not prefix: opus/-se
op (winde %Op // move default stress: opwindend and derivitives op (winde %Op // move default stress: opwindend and derivitives
o (rakel %O // fix stress and o sound: orakel/-spreuk/-taal, etc. o (rakel %O // fix stress and o sound: orakel/-spreuk/-taal, etc.
_) or (ga %Or // move default stress: orgaan/organe _) or (ga %Or // move default stress: orgaan/organe
ose (a %o@S%i // fix stress and s and e sounds: oseaan/oseane and compounds ose (a %o@S%i // fix stress and s and e sounds: oseaan/oseane and compounds
@) oties 'o@tis // antibioties/eksoties/eroties/neuroties @) oties 'o@tis // antibioties/eksoties/eroties/neuroties
_) o (va@ %o@ // move default stress: ovaal/ovale/ovaalvormig _) o (va@ %o@ // move default stress: ovaal/ovale/ovaalvormig
ovu %Ov%y // fix stress, o and v sounds: ovulasie/ovuleer
ower (@ o@v@r // lowergroen/betowerend/dowerig/compounds of owerheid ower (@ o@v@r // lowergroen/betowerend/dowerig/compounds of owerheid
ower (spelig %o@v@r // move default stress: owerspelig/-e
oë u@ // oë u@ //


.group on .group on
onheil ''OnheIl // stress: onheil/e/onheilbringer/onheilsvoorspelling onheil ''OnheIl // stress: onheil/e/onheilbringer/onheilsvoorspelling
onheil (ig %Onh'eIl // stress: onheilig/e onheil (ig %Onh'eIl // stress: onheilig/e
onheil (spel %Onh%eIl // stress: onheilspellend/e onheil (spel %Onh%eIl // stress: onheilspellend/e
oniks o@n@ks // "on" not prefix: oniks and compounds: onikssteen, etc.
_)on (koste On // restore default stress: onkoste/-s and compounds _)on (koste On // restore default stress: onkoste/-s and compounds
_) on (kruid On // restore default stress: onkruid/-doder and similar _) on (kruid On // restore default stress: onkruid/-doder and similar
_) on (lus On // restore default stress: onlus/-te/onlusgebied, etc.
_) onnie Oni // onnie/-s; not on- prefix _) onnie Oni // onnie/-s; not on- prefix
_) on (paar On // restore default stress: onpaar/-skoene
onreg (K Onr&x2 // stress: onreg/te/onregmatig onreg (K Onr&x2 // stress: onreg/te/onregmatig
on (regv++ %On // stress: onregverdig/e/heid on (regv++ %On // stress: onregverdig/e/heid
on (sin_N On // restore default stress: onsin on (sin_N On // restore default stress: onsin
on (skuld_N 'On // restore default stress: onskuld on (skuld_N 'On // restore default stress: onskuld
_) ont (@P3 %Ont _) ont (@P3 %Ont
_) on (taal %On // "ont" not prefix here: ontaalkundig/-e
_) on (tasba %On // prevent short break after t: ontasbaar/-heid/ontasbare _) on (tasba %On // prevent short break after t: ontasbaar/-heid/ontasbare
ont (d@ %On // remove t sound: ontdaan/belastingontduiking/ontdooi ont (d@ %On // remove t sound: ontdaan/belastingontduiking/ontdooi
onteenseg Onte@ns'&x2 // onteenseglik/e onteenseg Onte@ns'&x2 // onteenseglik/e
on (toe %On // ontoereikend/heid on (toe %On // ontoereikend/heid
on (tugtig %On // fix stress and avoid ont prefix: ontugtig/-e/-heid on (tugtig %On // fix stress and avoid ont prefix: ontugtig/-e/-heid
on (tug On // stress on 1st slb and avoid ont prefix: ontug/-pleger... on (tug On // stress on 1st slb and avoid ont prefix: ontug/-pleger...
on (twyfel %On // "ont" not prefix: ontwyfelbaar/-bare/-baarheid
on (tyd %On // ontydig and derivitives on (tyd %On // ontydig and derivitives
_) onuit (@P5 On_Yyt // fix stress: onuitblusbaar/onuithou(d)baar/onuitputlik/onuitroeibaar/onuitspreekbaar
_) on (uitge@++P2 On_ // fix stress: onuitgedoof/onuitgegee/onuitgekeer/onuitgeloot/onuitgemaak...
_) on (wAs 'On // onwis/onwys _) on (wAs 'On // onwis/onwys
_) onweer Onve@r // stress on 1st slb.: onweer/-snag/-swolke... _) onweer Onve@r // stress on 1st slb.: onweer/-snag/-swolke...
_) onweer (l %Onv%e@r // but onweerlegbaar/-bare/-baarheid _) onweer (l %Onv%e@r // but onweerlegbaar/-bare/-baarheid
_) onweer (staan %Onv%e@r // onweerstaanbaar/-bare/-baarheid _) onweer (staan %Onv%e@r // onweerstaanbaar/-bare/-baarheid
_) onge (@P4 Onx2@ _) onge (@P4 Onx2@
_) ongees %Onx2%e@s // ongeesdriftig; see rule: _) onge (@P4 Onx2@ _) ongees %Onx2%e@s // ongeesdriftig; see rule: _) onge (@P4 Onx2@
onge (diert Onx2@ // restore default stress for ongedierte/-s
_) ongeloofli (k Onx2@l'o@fl@ // to avoid "lik" suffix retranslation of "ongeloof" _) ongeloofli (k Onx2@l'o@fl@ // to avoid "lik" suffix retranslation of "ongeloof"
onge (luk_ o~Nx2@ // ongeluk/verkeersongeluk, etc. onge (luk_ o~Nx2@ // ongeluk/verkeersongeluk, etc.
onge (lukke_ o~Nx2@ // ongelukke/verkeersongelukke, etc. onge (lukke_ o~Nx2@ // ongelukke/verkeersongelukke, etc.
onder (skeid_N On@r // restore default stress: onderskeid onder (skeid_N On@r // restore default stress: onderskeid
onderstebo %On@rst@bo@ // fix stress: onderstebo/koponderstebo onderstebo %On@rst@bo@ // fix stress: onderstebo/koponderstebo
onder (steu %On@r // exception to default stress rule: ondersteun/-ing/-ers onder (steu %On@r // exception to default stress rule: ondersteun/-ing/-ers
onder (stre %On@r // move default stress: onderstreep/-te/onderstreping
onder (vang %On@r // move default stress: ondervang/-ing
onder (vin %On@r // exception to default stress rule: ondervind/ondervinding onder (vin %On@r // exception to default stress rule: ondervind/ondervinding
onder (vra %On@r // move default stress: ondervra/-ging onder (vra %On@r // move default stress: ondervra/-ging
onder (werping %On@r // move default stress: onderwerping/-sklousule onder (werping %On@r // move default stress: onderwerping/-sklousule
oor (blyw %o@r // move default stress: oorblywend/-e oor (blyw %o@r // move default stress: oorblywend/-e
oorbodig o@rb'o@d@x2 // stress: oorbodig/-e/-heid oorbodig o@rb'o@d@x2 // stress: oorbodig/-e/-heid
_) oor (dag %o@r // move default stress: oordag/-te _) oor (dag %o@r // move default stress: oordag/-te
_) oorde (k %o@rd& // fix stress and e sound: oordek/-king/-te
_) oor (denk %o@r // move default stress: oordenk/-ing/-s
oordrewe o@rdr'e@v@ // stress: oordrewe/oordrewenheid oordrewe o@rdr'e@v@ // stress: oordrewe/oordrewenheid
oor (dink %o@r // move default stress oor (dink %o@r // move default stress
oor (doen %o@r // move default stress oor (doen %o@r // move default stress
oor (donder %o@r // move default stress: oordonder/-ing oor (donder %o@r // move default stress: oordonder/-ing
oor (draag %o@r // move default stress: oordraagbaar/-lik, etc. oor (draag %o@r // move default stress: oordraagbaar/-lik, etc.
_) oor (dryC %o@r // move default stress: oordryf/oordrywing _) oor (dryC %o@r // move default stress: oordryf/oordrywing
_) oordwars %o@rdwars // fix stress and d sound: oordwars/-e
oor (een %o@r // move default stress: ooreen/ooreenkom/ooreenkoms/ooreenstem oor (een %o@r // move default stress: ooreen/ooreenkom/ooreenkoms/ooreenstem
oor (een@@ ,o@r // move default stress: ooreenkomstig/ooreenstemmend oor (een@@ ,o@r // move default stress: ooreenkomstig/ooreenstemmend
oor (eet %o@r_ // move default stress: ooreet/-gewoonte/-patroon oor (eet %o@r_ // move default stress: ooreet/-gewoonte/-patroon
oorerflik %o@r_&rfl@k // stress and pause: oorerflik/-e/-heid oorerflik %o@r_&rfl@k // stress and pause: oorerflik/-e/-heid
oor (eis %o@r_ // stress, short break: ooreis/-ing oor (eis %o@r_ // stress, short break: ooreis/-ing
oor (gank %o@r // move default stress: oorganklik/-e/-heid oor (gank %o@r // move default stress: oorganklik/-e/-heid
_) oor (groei %o@r // move default stress: oorgroei/-de
_) oor (haas %o@r // move default stress: oorhaas/-tig/-ting
oor (hand@ o@r' // stress oorhandig/ing, but oorhand oor (hand@ o@r' // stress oorhandig/ing, but oorhand
oor (heers %o@r // move default stress oor (heers %o@r // move default stress
_) oor (hoofs %o@r // move default stress: oorhoofs/-e
oorkoepel o@rk'up@l // stress and pronunc. of el: oorkoepelend/oorkoepeling oorkoepel o@rk'up@l // stress and pronunc. of el: oorkoepelend/oorkoepeling
_) oorlede o@rl'e@d@ // stress oorlede/ne/s _) oorlede o@rl'e@d@ // stress oorlede/ne/s
oorle (wAn o@rl''e@ // stress on 2nd slb.: oorlewing/-sekuriteit/-situasie/oorlewendes oorle (wAn o@rl''e@ // stress on 2nd slb.: oorlewing/-sekuriteit/-situasie/oorlewendes
oor (meester %o@r // move default stress: oormeester oor (meester %o@r // move default stress: oormeester
_) oor (peins %o@r // move default stress: oorpeins/-ing
oor (reed %o@r // move default stress oor (reed %o@r // move default stress
oor (redA %o@r // move default stress: oorredingskrag oor (redA %o@r // move default stress: oorredingskrag
oor (rompel %o@r // move default stress oor (rompel %o@r // move default stress
oor (sk %o@r // stress: oorskadu/oorskat/oorskrei _) oor (skadu %o@r // move default stress: oorskadu/-wing
_) oor (skiet o@r // stress on 1st slb.: oorskiet and compounds _) oor (skat %o@r // move default stress: oorskat/-te/-ting
oor (skrei %o@r // stress: oorskrei/-ding snd compounds
oor (spronk %o@r // move default stress: (on)oorspronklik and compounds oor (spronk %o@r // move default stress: (on)oorspronklik and compounds
_) oor (stelp %o@r // move default stress: oorstelp/-ing
_) oor (stromi %o@r // move default stress: oorstroming and compounds
oor (stur %o@r // move default stress: oorsturig/-e/-heid oor (stur %o@r // move default stress: oorsturig/-e/-heid
_) oorstuurs %o@rsty:rs // move default stress: oorstuurs/-e/-heid
oor (tr %o@r // oortree/oortreding/oortref oor (tr %o@r // oortree/oortreding/oortref
oor (trek o@r // restore default stress: oortreksel/oortrekpapier/oortrektrui oor (trek o@r // restore default stress: oortreksel/oortrekpapier/oortrektrui
_) oor (trom o@r // restore default stress: oortrom/-me
oor (tuig %o@r // oortuig/oortuiging/oortuigende oor (tuig %o@r // oortuig/oortuiging/oortuigende
_) oor (vleuel %o@r // move default stress: oorvleuel/-ing _) oor (vleuel %o@r // move default stress: oorvleuel/-ing
_) oor (vloedig %o@r // move default stress: oorvloedig/-e vs. oorvloed _) oor (vloedig %o@r // move default stress: oorvloedig/-e vs. oorvloed
p p p p
p (p p (p
_) paarl p&:r@L // Paarl/Paarlberg/Paarlvallei _) paarl p&:r@L // Paarl/Paarlberg/Paarlvallei
_) padda p''ada // fix stress and 2nd a sound: paddavis/paddaman, etc.
pajama p@dZ'A:ma //pajama and compounds pajama p@dZ'A:ma //pajama and compounds
pak (A pak? // pakesel/pakos/verpakafdeling pak (A pak? // pakesel/pakos/verpakafdeling
pakistan p%ak%istan //first a and stress pakistan p%ak%istan //first a and stress
pakke (t p%akE // pakket/-te and compounds pakke (t p%akE // pakket/-te and compounds
pale (t p%alE // fix stress and a sound: palet/-te and compounds
palin (dro p%al@n // fix stress and a sound: palindroom/-drome/-dromies
_) palja (K palj''a // fix stress on -jas: (ge)paljas/paljasse/paljasagtig/-e _) palja (K palj''a // fix stress on -jas: (ge)paljas/paljasse/paljasagtig/-e
pal (miet p%al // move default stress: palmiet and compounds pal (miet p%al // move default stress: palmiet and compounds
_) pan (dem p%an // move default stress: pandemie/-s and compounds _) pan (dem p%an // move default stress: pandemie/-s and compounds
_) pan (do p%an // move default stress: pandoer/-e/Pandora/pandok
panga paNga // fix g sound: panga/-s panga paNga // fix g sound: panga/-s
pano (ram p%an%u // fix stress and vowel sounds: panorama/panoramies
_) pan (to p%an // move default stress: pantoffel and compounds/pantoen _) pan (to p%an // move default stress: pantoffel and compounds/pantoen
papaja p%ap'A:ia //papaja and compounds papaja p%ap'A:ia //papaja and compounds
papawer p%apA:v@r // move default stress: papawer/-s and compounds papawer p%apA:v@r // move default stress: papawer/-s and compounds
pa (pirus p%a // move default stress: papirus and compounds pa (pirus p%a // move default stress: papirus and compounds
parle (ment p%arl@ // move default stress and fix e sound: parlement and compounds, eg. parle (ment p%arl@ // move default stress and fix e sound: parlement and compounds, eg.
parme (saan p%arm@ // move default stress: parmesaan(kaas) and compounds parme (saan p%arm@ // move default stress: parmesaan(kaas) and compounds
paro (di p%ar%u // fix stress and vowel sounds: parodie and compounds
parti (tu p%art@ // fix stress and i sound: partituur/partiture and compounds parti (tu p%art@ // fix stress and i sound: partituur/partiture and compounds
pa (tat p@ // patat/warmpatat/wurgpatat pa (tat p@ // patat/warmpatat/wurgpatat
patie (K p%at'i //words ending in patie has stress at end + a sound/simpatiek patie (K p%at'i //words ending in patie has stress at end + a sound/simpatiek
para (C ,para //paralel, paragraaf etc. para (C ,para //paralel, paragraaf etc.
parade (K p@rA:d@ // parade and compounds parade (K p@rA:d@ // parade and compounds
par (C@ p%ar // (ge)parkeer/parkeerplek/party(keer/maal...)/parfuum/parmantig par (C@ p%ar // (ge)parkeer/parkeerplek/party(keer/maal...)/parfuum/parmantig
pars (C pars // restore default stress: parsbalie/-kuip/-tyd, etc.
_) pas (AA pas // pasaangeër/pasoortreding _) pas (AA pas // pasaangeër/pasoortreding
pas (op p%as // pasop/pasoppens pas (op p%as // pasop/pasoppens
passa (sier p%as%a // stress: passasier and compounds passa (sier p%as%a // stress: passasier and compounds
_) pa (stei p%a // move default stress: pastei and compounds _) pa (stei p%a // move default stress: pastei and compounds
_) pasto (rA p%ast%u // pastorie/-paar/-moeder/pastoraal/pastorale _) pasto (rA@ p%ast%u // pastorie/-paar/-moeder/pastoraal/pastorale
_) pa (sto p%a // move default stress: pastoor/pastore
_) pa (tA p%a // pateties/patee/patent/paterniteit _) pa (tA p%a // pateties/patee/patent/paterniteit
pa (trA p%a // patrollie/patroon/patrys pa (trA p%a // patrollie/patroon/patrys
patri (@ p%atr%i // move default stress: patriarg/patriot/-te and derivitives patri (@ p%atr%i // move default stress: patriarg/patriot/-te and derivitives
pa (Ciljoe p%a% // fix stress: pawiljoen/paviljoen/-e and compounds pa (Ciljoe p%a% // fix stress: pawiljoen/paviljoen/-e and compounds
polio po@li;u // polio and compounds polio po@li;u // polio and compounds
_) peli (ka p%El%i // move default stress: pelikaan/pelikane _) peli (ka p%El%i // move default stress: pelikaan/pelikane
pe (narie p@ // fix e sound: penarie/-s and compounds
pen (dule p%En // move defaul;t stress: pendule/-s pen (dule p%En // move defaul;t stress: pendule/-s
pene (_ p@n@ // geroepenes/ontslapenes/uitgeworpenes pene (_ p@n@ // geroepenes/ontslapenes/uitgeworpenes
pene (trA p%En@ // fix e sounds: penetrasie/(ge)penetreer pene (trA p%En@ // fix e sounds: penetrasie/(ge)penetreer
penisi (lli p%En@s@ // fix stress and vowel sounds: penisillien/penisilline and compounds
pensi (oen p%EnS%i; // move default stress: pensioen and compounds pensi (oen p%EnS%i; // move default stress: pensioen and compounds
ry) per (d p&:r // fix e sound: ryperd/-e ry) per (d p&:r // fix e sound: ryperd/-e
_) perde p'&:rd@ _) perde p'&:rd@
perfek p@rfEk // perfek/-te/-sie/-sionis perfek p@rfEk // perfek/-te/-sie/-sionis
peri (o p%e@r%i; // stress: periode/-s and compounds peri (o p%e@r%i; // stress: periode/-s and compounds
peri (stal p%Er@ // fix stress and vowel sounds: peristalties/-e/peristaltiek peri (stal p%Er@ // fix stress and vowel sounds: peristalties/-e/peristaltiek
perle (moe p%&rl@ // move default stress: perlemoen/perlemoer and compounds per (kussie p@r // fix stress and e sound: perkussie and compounds
perle (moe p%&rl@ // move default stress: perlemoen/perlemoer and compounds/reperkussie/-s
pe (rron p@ // move default stress and fix e sound: perron and derivitives pe (rron p@ // move default stress and fix e sound: perron and derivitives
r) peling (_ p@l@N //verwerpeling etc. r) peling (_ p@l@N //verwerpeling etc.
peloton pEl@t'On peloton pEl@t'On
permanen p&rman'En // permanent/e/permanensie permanen p&rman'En // permanent/e/permanensie
permit p@rm'It permit p@rm'It
per (seel p%&r // move default stress: perseel and compounds
per (sepsi p@r // fix stress and 1st e sound: persepsie/-s and compounds
per (so p@r // persoon/persone per (so p@r // persoon/persone
perso (neel p%&rs%u // personeel and compounds perso (neel p%&rs%u // personeel and compounds
pervers p@rf&rs // pervers/perversie pervers p@rf&rs // pervers/perversie
pe (tieter p@ // fix stress and 1st e sound: petieterig/-e/-heid
pe (tisi p@ // fix stress and e sound: petisie/petisionaris and compounds
_) pe (trA_ pe@ // lengthen e sound: Petro/Petra _) pe (trA_ pe@ // lengthen e sound: Petro/Petra
petrol pEtr@l_ // o = schwa: petrol and compounds petrol pEtr@l_ // o = schwa: petrol and compounds
petrol (eum p@tro@l // move default stress and soften e: petroleum and compounds petrol (eum p@tro@l // move default stress and soften e: petroleum and compounds
pe (tunia p@ // fix stress and e sound: petunia/-s pe (tunia p@ // fix stress and e sound: petunia/-s
ph (_ f // fix ph sound: Rudolph/Joseph ph (_ f // fix ph sound: Rudolph/Joseph
phi (lippA_ f@ // fix stress and 1st i sound: Philippa/Philippi phi (lippA_ f@ // fix stress and 1st i sound: Philippa/Philippi
pi (kant p%i // move default stress: pikant/-e, etc.
pikke (wyn p@k@ // move default stress: pikkewyn and compounds
_) pi (la p%i // move default stress: pilaar/pilare/pilatus _) pi (la p%i // move default stress: pilaar/pilare/pilatus
pio (nier p%i%u // fix stress and vowel sounds: pionier and compounds pio (nier p%i%u // fix stress and vowel sounds: pionier and compounds
pira (mi p%ir%a // move default stress: piramide/-s/piramiedvormig pira (mi p%ir%a // move default stress: piramide/-s/piramiedvormig
_) pla (kka pl%a // move default stress: plakkaat/plakkate _) pla (kka pl%a // move default stress: plakkaat/plakkate
plane (tA pl%an@' // planetarium/interplanetêr plane (tA pl%an@' // planetarium/interplanetêr
planete pl%ane@t@ // move default stress and fix a sound: planete and compounds like planetebaan planete pl%ane@t@ // move default stress and fix a sound: planete and compounds like planetebaan
plant (aardi pl%ant_ // fix stress and insert short break: plantaardig/-e
_) pla (ta pl%a // move default stress: plataan/-boom/platane _) pla (ta pl%a // move default stress: plataan/-boom/platane
plei (dooi pl%eI // (slot)pleidooi/-e plei (dooi pl%eI // (slot)pleidooi/-e
plesier pl@s'i:r plesier pl@s'i:r
po (liep p%u // fix stress and o sound: poliep/-e/-agtig and compounds of poliep po (liep p%u // fix stress and o sound: poliep/-e/-agtig and compounds of poliep
polisie pul'isi polisie pul'isi
poli (tAAC p%Ol@ // politiek/politoer and compounds poli (tAAC p%Ol@ // politiek/politoer and compounds
polities p%ulit%is // fix stress and o sound: polities/-e
pol (vy p%Ol // move default stress: polvy/-e and compounds
_) pon (dok p%On // move default stress: pondok/-ke/-kie _) pon (dok p%On // move default stress: pondok/-ke/-kie
popu ,pOpy popu ,pOpy
_) por (C %pOr //portret portaal etc. _) por (C %pOr //portret portaal etc.
primi (t pr@m@ // make i sounds schwa: primitief/primitiewe primi (t pr@m@ // make i sounds schwa: primitief/primitiewe
prinsi (pA pr@ns@ // move default stress: prinsipaal/prinsipale/prinsipaals/prinsipieel/-ële prinsi (pA pr@ns@ // move default stress: prinsipaal/prinsipale/prinsipaals/prinsipieel/-ële
prinsipe (K pr@nsip@ // stress on 2nd slb.: prinsipe/-s prinsipe (K pr@nsip@ // stress on 2nd slb.: prinsipe/-s
priso (nier pr@s@ // fix stress and vowel sounds: prisonier and many compounds
ple (k pl& ple (k pl&
posisie puz'isi posisie puz'isi
predi (kant pr%e@d@ // predikant and compounds predi (kant pr%e@d@ // predikant and compounds
pro (gram pr%u // fix stress and o sound: program/-e/ontwikkelingsprogram pro (gram pr%u // fix stress and o sound: program/-e/ontwikkelingsprogram
pro (CA pr%u // probeer/produk/proses/professie/provinsie pro (CA pr%u // probeer/produk/proses/professie/provinsie
prokie pro@k%i //sprokie and compounds prokie pro@k%i //sprokie and compounds
promenade pr%Om@nA:d@ // fix stress and vowel sounds: promenade/-dek/-konsert, etc.
promisku pr%Om@sky // fix stress and o sound: promisku/-e/-íteit promisku pr%Om@sky // fix stress and o sound: promisku/-e/-íteit
proposi pr%Op@zi // stress, o and s sounds: (besigheids)proposisie/-si, etc. proposi pr%Op@zi // stress, o and s sounds: (besigheids)proposisie/-si, etc.
prosa pr'o@sa //prosa and compounds prosa pr'o@sa //prosa and compounds
prosa (ïe pr%o@sA: // fix stress and vowel sounds: prosaïes/-e
proses pr%usEs // proses/versoeningsproses/strafproseswet proses pr%usEs // proses/versoeningsproses/strafproseswet


projek pr%ujEk projek pr%ujEk
projek (tiel pr%o@j%Ek // fix stress: projektiel/-e and compounds
proku (rA pr%Ok%y // prokureur and compounds/prokurasie proku (rA pr%Ok%y // prokureur and compounds/prokurasie
prominen prOmin'En // prominent/e/prominensie prominen prOmin'En // prominent/e/prominensie
propag ,prOpax2 propag ,prOpax2


prosedure prOs@d'yr@ prosedure prOs@d'yr@
prosti (tu pr%Ost@ // fix stress and i sound: prostituut/prostitute/prostitusie and compounds
protes prut'Es protes prut'Es
protes (te_N pr%utEs // proteste, but prevent breaking protestering protes (te_N pr%utEs // proteste, but prevent breaking protestering
protest ,prOt@st protest ,prOt@st
provi (and pr%o@v%i // fix stress and v sound: proviand/-meester, etc. provi (and pr%o@v%i // fix stress and v sound: proviand/-meester, etc.
ps (igA s // psigologie/kinderpsigoloog ps (igA s // psigologie/kinderpsigoloog
psalm p@sal@m // schwa between p and s psalm p@sal@m // schwa between p and s
psalmis p@s%al@mIs // move default stress: psalmis/-te


pub (li p%Wb pub (li p%Wb
puntener p%Wnt@ne@r // stress and 2nd e sound: puntenerig and derivitives puntener p%Wnt@ne@r // stress and 2nd e sound: puntenerig and derivitives
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
polisie) se (lK s& // fix e sound: polisiesel/-le
_) seme (Ct s@mE // sementtafel/blad/vierkant/semester/-s _) seme (Ct s@mE // sementtafel/blad/vierkant/semester/-s
_) semi (_ sEmi // fix e sound: semi/semi-formeel, etc. _) semi (_ sEmi // fix e sound: semi/semi-formeel, etc.
semi (na s%Em%i // seminaar/seminare/seminarium semi (na s%Em%i // seminaar/seminare/seminarium
@) tiewe (_ t'iv@ // alternatiewe/aktiewe/instinktiewe/(ak)kumulatiewe @) tiewe (_ t'iv@ // alternatiewe/aktiewe/instinktiewe/(ak)kumulatiewe
tink (tink t@Nk // move default stress: tinktinkie/-s tink (tink t@Nk // move default stress: tinktinkie/-s
ti (ra t%i // move default stress tiran tirade ti (ra t%i // move default stress tiran tirade
titel tit@l // fix e sound: (on)getiteld/titelblad/-geveg and many similar
tj tS tj tS
@) tj (a tj // separate tj: agtjarig/blatjang/bontjas/olifantjag/ouditjaar/tweegatjakkals @) tj (a tj // separate tj: agtjarig/blatjang/bontjas/olifantjag/ouditjaar/tweegatjakkals
@) tjank tSaNk // but: angstjank, etc. @) tjank tSaNk // but: angstjank, etc.
tje (llis tS%E // move default stress and fix e sound: tjellis/-te tje (llis tS%E // move default stress and fix e sound: tjellis/-te
tj (ie c tj (ie c
_) tj (ie tS _) tj (ie tS
re) tjie ici // fix e sound: portretjies/sigaretjie
ui) tj tj // uitjaag/uitjou/uitjubel ui) tj tj // uitjaag/uitjou/uitjubel
ui) tjie ci // beskuitjie/fluitjie/ruitjie/uitjie, etc. ui) tjie ci // beskuitjie/fluitjie/ruitjie/uitjie, etc.
_) th (@@ t _) th (@@ t
virtu v@rtS%y //virtueel virtuose etc. fix v and t sounds and assure lack of stress virtu v@rtS%y //virtueel virtuose etc. fix v and t sounds and assure lack of stress
ver (kyker f'&:r //verkyker and compounds ver (kyker f'&:r //verkyker and compounds
_) ver (@P3 f@r _) ver (@P3 f@r
@C) ver (_ f&:r // fix e sound in compounds ending in -ver
verant (w f@r%ant // (on)verantwoordelik/-heid/verantwoording verant (w f@r%ant // (on)verantwoordelik/-heid/verantwoording
verant (woord_ f@r_ant // fix stress: (on)verantwoord (single word) verant (woord_ f@r_ant // fix stress: (on)verantwoord (single word)
verant (woorde_ f@r_ant // fix stress: (on)verantwoorde (single word) verant (woorde_ f@r_ant // fix stress: (on)verantwoorde (single word)
volwasse fOlv'as@ // (on)volwassene/s/(on)volwassenheid volwasse fOlv'as@ // (on)volwassene/s/(on)volwassenheid
vo (lC f%O // volledig/volmaakte/voltooi vo (lC f%O // volledig/volmaakte/voltooi
vol (g fOl // volgeling/volgende/volgorde vol (g fOl // volgeling/volgende/volgorde
vol (groei f%Ol // fix stress: (on)volgroeid/-e/-es
voren f'o@r@n // alvorens/vorentoe voren f'o@r@n // alvorens/vorentoe
voog (dy f%o@x2 // fix stress: voogdy and compounds voog (dy f%o@x2 // fix stress: voogdy and compounds
voorbar fo@rb'A:r // move default stress: voorbarig and derivitives voorbar fo@rb'A:r // move default stress: voorbarig and derivitives
lyks) w (aaC v // fix w sound: lykswaad/-waak 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.
plaas) w (erC v // fix w sound: plaaswerf/-werwe
s) w (ou v // fix w sound: bamboeswoud/keerkringswoud and similar s) w (ou v // fix w sound: bamboeswoud/keerkringswoud and similar
s) w (r v // fix w sound: skeepswrak/sielswroeging/aardswreedheid s) w (r v // fix w sound: skeepswrak/sielswroeging/aardswreedheid
wreed (a vre@t_ // fix d sound and insert short pause: wreedaard/-s wreed (a vre@t_ // fix d sound and insert short pause: wreedaard/-s

+ 3
- 4
dictsource/dict_phonemes View File



Dictionary zhy_dict Dictionary zhy_dict


a aa aai aan aau ai ang au a aa aai aan aau ai au e
e ei eng eo eoi eu i ing ei eo eoi eu i iu o oe
iu ng o oe oen oi ong ou oi ong ou u ui yu
u ui ung yu


b c d f g h j k b c d f g h j k
l m n N p r s t l m n N p r s t

+ 1
- 15
src/compiledata.cpp View File

#define tINCLUDE 31 #define tINCLUDE 31


extern void Write4Bytes(FILE *f, int value); extern void Write4Bytes(FILE *f, int value);
extern int Read4Bytes(FILE *f);
extern void MakeVowelLists(void); extern void MakeVowelLists(void);
extern void FindPhonemesUsed(void); extern void FindPhonemesUsed(void);
extern void DrawEnvelopes(); extern void DrawEnvelopes();
} }




int Read4Bytes(FILE *f)
{//====================
// Read 4 bytes (least significant first) into a word
int ix;
unsigned char c;
int acc=0;

for(ix=0; ix<4; ix++)
{
c = fgetc(f) & 0xff;
acc += (c << (ix*8));
}
return(acc);
}



static FILE *fopen_log(FILE *f_log, const char *fname,const char *access) static FILE *fopen_log(FILE *f_log, const char *fname,const char *access)
{//================================================== {//==================================================

+ 102
- 10
src/readclause.cpp View File

return(buf); return(buf);
} }


int Read4Bytes(FILE *f)
{//====================
// Read 4 bytes (least significant first) into a word
int ix;
unsigned char c;
int acc=0;

for(ix=0; ix<4; ix++)
{
c = fgetc(f) & 0xff;
acc += (c << (ix*8));
}
return(acc);
}



static int LoadSoundFile(const char *fname, int index) static int LoadSoundFile(const char *fname, int index)
{//=================================================== {//===================================================
int length; int length;
char fname_temp[100]; char fname_temp[100];
char fname2[sizeof(path_home)+13+40]; char fname2[sizeof(path_home)+13+40];
char command[sizeof(fname2)+sizeof(fname2)+30]; char command[sizeof(fname2)+sizeof(fname2)+40];


if(fname == NULL) if(fname == NULL)
{ {
#ifdef PLATFORM_POSIX #ifdef PLATFORM_POSIX
if((f = fopen(fname,"rb")) != NULL) if((f = fopen(fname,"rb")) != NULL)
{ {
int header[11]; int ix;
fread(header, 1, 44, f); const char *resample;
int header[3];

fseek(f,20,SEEK_SET);
for(ix=0; ix<3; ix++)
header[ix] = Read4Bytes(f);


if(header[6] != samplerate) // if the sound file is not mono, 16 bit signed, at the correct sample rate, then convert it
if((header[0] != 0x10001) || (header[1] != samplerate) || (header[2] != samplerate*2))
{ {
fclose(f); fclose(f);
f = NULL; f = NULL;


if(header[2] == samplerate)
resample = "";
else
resample = "polyphase";

sprintf(fname_temp,"%s.wav",tmpnam(NULL)); sprintf(fname_temp,"%s.wav",tmpnam(NULL));
sprintf(command,"sox \"%s\" -r %d -w %s polyphase\n",fname,samplerate,fname_temp); sprintf(command,"sox \"%s\" -r %d -w -s -c1 %s %s\n", fname, samplerate, fname_temp, resample);
if(system(command) == 0) if(system(command) == 0)
{ {
fname = fname_temp; fname = fname_temp;


length = GetFileLength(fname); length = GetFileLength(fname);
fseek(f,0,SEEK_SET); fseek(f,0,SEEK_SET);
p = Alloc(length); if((p = (char *)realloc(soundicon_tab[index].data, length)) == NULL)
{
fclose(f);
return(4);
}
fread(p,length,1,f); fread(p,length,1,f);
fclose(f); fclose(f);
remove(fname_temp); remove(fname_temp);


ip = (int *)(&p[40]); ip = (int *)(&p[40]);
soundicon_tab[index].length = (*ip) / 2; // length in samples soundicon_tab[index].length = (*ip) / 2; // length in samples
soundicon_tab[index].data = p+44; // skip WAV header soundicon_tab[index].data = p;
return(0); return(0);
} // end of LoadSoundFile } // end of LoadSoundFile


// Find the sound icon number for a punctuation chatacter // Find the sound icon number for a punctuation chatacter
int ix; int ix;


for(ix=0; ix<n_soundicon_tab; ix++) for(ix=N_SOUNDICON_SLOTS; ix<n_soundicon_tab; ix++)
{ {
if(soundicon_tab[ix].name == c) if(soundicon_tab[ix].name == c)
{ {
} }




static int LoadSoundFile2(const char *fname)
{//=========================================
// Load a sound file into one of the reserved slots in the sound icon table
// (if it'snot already loaded)

int ix;
static int slot = -1;

for(ix=0; ix<n_soundicon_tab; ix++)
{
if(((soundicon_tab[ix].filename != NULL) && strcmp(fname, soundicon_tab[ix].filename) == 0))
return(ix); // already loaded
}

// load the file into the next slot
slot++;
if(slot >= N_SOUNDICON_SLOTS)
slot = 0;

if(LoadSoundFile(fname, slot) != 0)
return(-1);

soundicon_tab[slot].filename = (char *)realloc(soundicon_tab[ix].filename, strlen(fname)+1);
strcpy(soundicon_tab[slot].filename, fname);
return(slot);
}




int Translator::AnnouncePunctuation(int c1, int c2, char *buf, int bufix) int Translator::AnnouncePunctuation(int c1, int c2, char *buf, int bufix)
{//====================================================================== {//======================================================================


if((attr1 = GetSsmlAttribute(px,"src")) != NULL) if((attr1 = GetSsmlAttribute(px,"src")) != NULL)
{ {
char fname[256];
attrcopy_utf8(buf,attr1,sizeof(buf)); attrcopy_utf8(buf,attr1,sizeof(buf));


if(uri_callback == NULL) if(uri_callback == NULL)
{ {
// we could load the audio file as a sound icon (assuming it's a local WAV file) if((xmlbase != NULL) && (buf[0] != '/'))
// But when to free() the data? {
sprintf(fname,"%s/%s",xmlbase,buf);
index = LoadSoundFile2(fname);
}
else
{
index = LoadSoundFile2(buf);
}
if(index >= 0)
{
sprintf(buf,"%c%dI",CTRL_EMBEDDED,index);
strcpy(&outbuf[outix],buf);
outix += strlen(buf);
sp->parameter[espeakSILENCE] = 1;
}
} }
else else
{ {


if(iswalnum(c1)) if(iswalnum(c1))
any_alnum = 1; any_alnum = 1;
else
if(iswspace(c1))
{
if(translator_name == 0x6a626f)
{
// language jbo : lojban
// treat "i" or ".i" as end-of-sentence
if(buf[ix-1] == 'i')
{
if(iswspace(buf[ix-2]) || ((buf[ix-2] == '.') && iswspace(buf[ix-3])))
{
UngetC(c2);
buf[ix] = ' ';
buf[ix+1] = 0;
return(CLAUSE_PERIOD);
}
}
}
}


if(iswupper(c1)) if(iswupper(c1))
{ {

+ 1
- 3
src/speak.cpp View File

else else
fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x)\n",result,version_phdata); fprintf(stderr,"Wrong version of espeak-data 0x%x (expects 0x%x)\n",result,version_phdata);
} }
#ifndef PLATFORM_WINDOWS LoadConfig();
LoadConfig(); // causes problem on Windows, don't know why
#endif
SetVoiceStack(NULL); SetVoiceStack(NULL);
SynthesizeInit(); SynthesizeInit();



+ 0
- 2
src/speak_lib.cpp View File

int param; int param;
int result; int result;


#ifndef __WIN32__
LoadConfig(); LoadConfig();
#endif
WavegenInit(22050,0); // 22050 WavegenInit(22050,0); // 22050
if((result = LoadPhData()) != 1) if((result = LoadPhData()) != 1)
{ {

+ 39
- 15
src/synth_mbrola.cpp View File

} }




static char *WritePitch(int env, int pitch1, int pitch2, int split) static char *WritePitch(int env, int pitch1, int pitch2, int split, int final)
{//================================================================ {//===========================================================================
// final=1: only give the final pitch value.
int x; int x;
int ix; int ix;
int pitch_base; int pitch_base;
int min = 999; int min = 999;
int y_max=0; int y_max=0;
int y_min=0; int y_min=0;
int env100 = 80; // apply the pitch change only over this proportion of the mbrola phoneme(s)
int y2; int y2;
int y[4]; int y[4];
int env_split; int env_split;
char buf[40]; char buf[50];
static char output[40]; static char output[50];


output[0] = 0; output[0] = 0;
pitch_env = envelope_data[env]; pitch_env = envelope_data[env];


if(split > 0) if(split > 0)
{ {
y2 = (y[ix] * 100)/env_split; y2 = (y[ix] * env100)/env_split;
} }
else else
if(split < 0) if(split < 0)
{ {
y2 = ((y[ix]-env_split) * 100)/env_split; y2 = ((y[ix]-env_split) * env100)/env_split;
} }
else else
{ {
y2 = (y[ix] * 100)/128; y2 = (y[ix] * env100)/128;
} }
if((y2 > 0) && (y2 <= 100)) if((y2 > 0) && (y2 <= env100))
{ {
sprintf(buf," %d %d",y2,p2/4096); sprintf(buf," %d %d",y2,p2/4096);
strcat(output,buf); strcat(output,buf);
} }
} }


p_end = p_end/4096;
if(split <= 0) if(split <= 0)
{ {
sprintf(buf," 100 %d",p_end/4096); sprintf(buf," %d %d",env100,p_end);
strcat(output,buf);
}
if(env100 < 100)
{
sprintf(buf," %d %d",100,p_end);
strcat(output,buf); strcat(output,buf);
} }
strcat(output,"\n"); strcat(output,"\n");

if(final)
sprintf(output,"\t100 %d\n",p_end);
return(output); return(output);
} // end of SetPitch } // end of WritePitch




#ifdef USE_MBROLA_LIB #ifdef USE_MBROLA_LIB
int control; int control;
int done; int done;
int len_percent; int len_percent;
const char *final_pitch;
char buf[80]; char buf[80];
char mbr_buf[120]; char mbr_buf[120];


len = 1; len = 1;
} }
else else
len = (70 * speed_factor2)/256; len = (80 * speed_factor2)/256;


sprintf(buf,"%s\t",WordToString(name)); sprintf(buf,"%s\t",WordToString(name));
strcat(mbr_buf,buf); strcat(mbr_buf,buf);
} }


done = 0; done = 0;
final_pitch = "";


switch(ph->type) switch(ph->type)
{ {


if(name2 == 0) if(name2 == 0)
{ {
sprintf(buf,"%d\t%s", len, WritePitch(p->env,p->pitch1,p->pitch2,0)); sprintf(buf,"%d\t%s", len, WritePitch(p->env,p->pitch1,p->pitch2,0,0));
strcat(mbr_buf,buf); strcat(mbr_buf,buf);
} }
else else
{ {
len1 = (len * len_percent)/100; len1 = (len * len_percent)/100;
sprintf(buf,"%d\t%s", len1, WritePitch(p->env,p->pitch1,p->pitch2,len_percent)); sprintf(buf,"%d\t%s", len1, WritePitch(p->env,p->pitch1,p->pitch2,len_percent,0));
strcat(mbr_buf,buf); strcat(mbr_buf,buf);


sprintf(buf,"%s\t%d\t%s", WordToString(name2), len-len1, WritePitch(p->env,p->pitch1,p->pitch2,-len_percent)); sprintf(buf,"%s\t%d\t%s", WordToString(name2), len-len1, WritePitch(p->env,p->pitch1,p->pitch2,-len_percent,0));
strcat(mbr_buf,buf); strcat(mbr_buf,buf);
} }
done = 1; done = 1;
{ {
len = DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,-1); len = DoSpect(p->ph,prev->ph,phoneme_tab[phonPAUSE],2,p,-1);
len = (len * 1000)/samplerate; len = (len * 1000)/samplerate;
if(next->type == phPAUSE)
len += 50;
final_pitch = WritePitch(p->env,p->pitch1,p->pitch2,0,1);
}
break;

case phLIQUID:
if(next->type == phPAUSE)
{
len += 50;
final_pitch = WritePitch(p->env,p->pitch1,p->pitch2,0,1);
} }
break; break;
} }
strcat(mbr_buf,buf); strcat(mbr_buf,buf);
len -= len1; len -= len1;
} }
sprintf(buf,"%d\n",len); sprintf(buf,"%d%s\n",len,final_pitch);
strcat(mbr_buf,buf); strcat(mbr_buf,buf);
} }



+ 7
- 1
src/synthdata.cpp View File

#include "translate.h" #include "translate.h"
#include "wave.h" #include "wave.h"


const char *version_string = "1.30.03 04.Jan.08"; const char *version_string = "1.30.04 07.Jan.08";
const int version_phdata = 0x013000; const int version_phdata = 0x013000;


int option_device_number = -1; int option_device_number = -1;
char *p; char *p;
char string[200]; char string[200];


for(ix=0; ix<N_SOUNDICON_SLOTS; ix++)
{
soundicon_tab[ix].filename = NULL;
soundicon_tab[ix].data = NULL;
}

sprintf(buf,"%s%c%s",path_home,PATHSEP,"config"); sprintf(buf,"%s%c%s",path_home,PATHSEP,"config");
if((f = fopen(buf,"r"))==NULL) if((f = fopen(buf,"r"))==NULL)
{ {

+ 4
- 4
src/synthesize.cpp View File



static voice_t *new_voice=NULL; static voice_t *new_voice=NULL;


int n_soundicon_tab=0; int n_soundicon_tab=N_SOUNDICON_SLOTS;
SOUND_ICON soundicon_tab[N_SOUNDICON_TAB]; SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];


#define RMS_GLOTTAL1 35 // vowel before glottal stop #define RMS_GLOTTAL1 35 // vowel before glottal stop
case EMBED_I: // play dynamically loaded wav data (sound icon) case EMBED_I: // play dynamically loaded wav data (sound icon)
if((int)value < n_soundicon_tab) if((int)value < n_soundicon_tab)
{ {
if((wcmdq[wcmdq_tail][1] = soundicon_tab[value].length) != 0) if(soundicon_tab[value].length != 0)
{ {
DoPause(10); // ensure a break in the speech DoPause(10); // ensure a break in the speech
wcmdq[wcmdq_tail][0] = WCMD_WAVE; wcmdq[wcmdq_tail][0] = WCMD_WAVE;
wcmdq[wcmdq_tail][1] = soundicon_tab[value].length; wcmdq[wcmdq_tail][1] = soundicon_tab[value].length;
wcmdq[wcmdq_tail][2] = (long)soundicon_tab[value].data; wcmdq[wcmdq_tail][2] = (long)soundicon_tab[value].data + 44; // skip WAV header
wcmdq[wcmdq_tail][3] = 0x1f00; // 16 bit data, amp=32 wcmdq[wcmdq_tail][3] = 0x1500; // 16 bit data, amp=21
WcmdqInc(); WcmdqInc();
} }
} }

+ 2
- 1
src/synthesize.h View File

extern const char *version_string; extern const char *version_string;
extern const int version_phdata; extern const int version_phdata;


#define N_SOUNDICON_TAB 100 #define N_SOUNDICON_TAB 80 // total entries in soundicon_tab
#define N_SOUNDICON_SLOTS 4 // number of slots reserved for dynamic loading of autio files
extern int n_soundicon_tab; extern int n_soundicon_tab;
extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB]; extern SOUND_ICON soundicon_tab[N_SOUNDICON_TAB];



+ 1
- 1
src/translate.cpp View File

WORD_TAB words[N_CLAUSE_WORDS]; WORD_TAB words[N_CLAUSE_WORDS];
int word_count=0; // index into words int word_count=0; // index into words


char sbuf[512]; char sbuf[N_TR_SOURCE];


int terminator; int terminator;
int tone; int tone;

Loading…
Cancel
Save