Fix to UTF-8/8-bit character set recognition. lang=de, more additions to translation rules, changed phoneme name [OI] to [OY]. lang=it, turned of "syntactic doubling" (temporarily?) git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@51 d46cf337-b52f-0410-862d-fd96e6ae7743master
@@ -27,7 +27,7 @@ _5 'fynf | |||
_6 'zEks | |||
_7 'zi:b@n | |||
_8 '_axt | |||
_9 'nOIn | |||
_9 'nOYn | |||
_10 'tse:n | |||
_11 '_Elf | |||
_12 'tsvWlf | |||
@@ -37,7 +37,7 @@ _15 'fynftse:n | |||
_16 'zEktse:n | |||
_17 'zi:btse:n | |||
_18 '_axttse:n | |||
_19 'nOIntse:n | |||
_19 'nOYntse:n | |||
_2X 'tsvantsIC | |||
_3X 'd@-*aItsIC | |||
_4X 'fi:*tsIC | |||
@@ -45,7 +45,7 @@ _5X 'fynftsIC | |||
_6X 'zEktsIC | |||
_7X 'zi:btsIC | |||
_8X '_axttsIC | |||
_9X 'nOIntsIC | |||
_9X 'nOYntsIC | |||
_0C 'hUnd3t | |||
_0M1 'taUz@nt | |||
_1M1 'taUz@nt // no '1' before thousand | |||
@@ -67,12 +67,12 @@ bd band | |||
bde bEnd@ | |||
bzw b@tsi:hUNsvaIz@ | |||
chr k@-*Istu:s | |||
dm d'OItSm,A:*k $capital $only $abbrev | |||
dm d'OYtSm,A:*k $capital $only $abbrev | |||
dr dOkt'o:* | |||
evtl e:vEntu:'El | |||
od o:d3 | |||
fr f@-*aU | |||
frl f@-*OIlaIn | |||
frl f@-*OYlaIn | |||
hr hE* | |||
hrsg hE*'aUsge:b3 | |||
inkl Inklu:s'i:v@ | |||
@@ -127,7 +127,7 @@ beim baIm $u+ $brk | |||
bis bIs $u+ $pause | |||
da $u+ | |||
durch $u+ $pause | |||
für fy:* $u+ $pause | |||
für fy:* $u+ $pause $only | |||
gegen ge:g@n $u+ $pause | |||
gegend ge:g@nt | |||
hin hIn | |||
@@ -468,6 +468,8 @@ extravagant $1 | |||
extrem Ekstr'e:m | |||
feuerrot $3 | |||
friedvoll f@-*'i:tf,Ol | |||
furchen fU*C@n | |||
furie $alt | |||
geben ge:b@n | |||
@@ -533,10 +535,14 @@ mikrofiche maIk@-*o:fIS | |||
miteinander $1 | |||
mitte mIt@ | |||
modell mo:d'El | |||
monoton $3 | |||
monsun $2 | |||
montag mo:ntA:k | |||
mors mO*s | |||
mumie $alt | |||
nebulos $3 | |||
negligier ne:gli:Z'i:* | |||
negligent ne:gli:dZ'Ent | |||
oberen o:b@*@n | |||
oboe o:bo:@ | |||
@@ -544,6 +550,7 @@ orgie $alt | |||
ok o:k'e: | |||
passage pas'aZ@ | |||
perplex $2 | |||
petersilie $alt | |||
pinie $alt | |||
planet plan'Et | |||
@@ -551,7 +558,8 @@ pochier pOS'i:* | |||
pochs pOxs | |||
präsident $3 | |||
prämie $alt | |||
problem p@-*Obl'e:m | |||
privatisier p@-*i:vati:z'i:* | |||
problematisier p@-*o:ble:m'a:tIzi:* | |||
reliquie $alt | |||
rupie $alt |
@@ -70,17 +70,21 @@ | |||
tr) ain En | |||
akqu %akv | |||
@A) al (_ 'A:l | |||
g) al (_ 'A:l | |||
k) al (_ 'A:l | |||
n) al (_ 'A:l | |||
&kan) al (_ ,A:l | |||
&sign) al (_ ,A:l | |||
r) al (_ 'A:l | |||
t) al (_ 'A:l | |||
@) an (_ 'A:n | |||
ein) an (der 'an | |||
@) ant (_ 'ant | |||
_) anthropo ,ant@-*o:p%o: | |||
_) anti (@P4 ,anti: | |||
anier (_N 'A:ni:3 | |||
_) an (ten an | |||
_) an (th an | |||
_) appe (ll@ ,apE | |||
_) archa (i %a*CA | |||
arier (_N 'A:*i:3 | |||
@@ -172,6 +176,7 @@ | |||
_) ch (or k | |||
bre) ch (en x | |||
chro k@-*o: | |||
nä) chs (t Cs | |||
c (ie s | |||
pla) c (ie ts | |||
@@ -191,6 +196,7 @@ | |||
dt t | |||
ddt t | |||
_) daten (@P5 d'at@n | |||
_) deal _^_EN | |||
_) deme de:mE | |||
demo (g de:mo: | |||
@@ -229,7 +235,7 @@ | |||
e (x E | |||
ei aI | |||
eu OI | |||
eu OY | |||
ey (_ e: | |||
eb (t_ e:p | |||
@@ -242,13 +248,19 @@ | |||
e (gt_+ e: | |||
&) el (_ @l | |||
&) eln (_S1 n | |||
&) elnd (_S2 nt | |||
&) e (lt_ @ | |||
&) em (_NS2 @m | |||
&) em (_ 'e:m | |||
_) end (C@P3 'Ent | |||
_) endo (@ ,Endo: | |||
@) en (_S2 @n | |||
&) end (_N @nt | |||
&) end (_NS3 @nt | |||
&) ende (_S4 @nd@ | |||
&) endem (_S5 @nd@m | |||
&) enden (_S5 @nd@n | |||
&) ender (_S5 @nd3 | |||
&) endes (_S5 @nd@s | |||
&) end (_ @nd | |||
ier) end (_NS3 @nt | |||
ier) end (_ @nd | |||
@@ -260,7 +272,7 @@ | |||
@) er (r E* | |||
@) er (ti E* | |||
@) er (nC E* | |||
@) er (_S2 3 | |||
@) er (_S2 3 | |||
&) ere (_S3 @*@ | |||
&) erem (_S4 @*@m | |||
&) eren (_S4 @*@n | |||
@@ -313,6 +325,9 @@ | |||
_) ent (@P3 _|%Ent | |||
_) enten Ent@n | |||
_) ent (er Ent | |||
t) en (t En | |||
qu) en (tA En | |||
&) en (tum @n | |||
&) e (nz_ 'E | |||
_) epi (@ ,e:pi: | |||
_) epi (sk e:pI | |||
@@ -350,8 +365,12 @@ | |||
_) flug fl'u:g | |||
foto fo:to: | |||
_) free _^_EN | |||
_) feudal f%OIdA:l | |||
_) feuer (@ fOI@* | |||
_) feudal f%OYdA:l | |||
_) feuer (@ fOY@* | |||
_) frev f@-*e:f | |||
_) froh (@P4 f@-*'o: | |||
_) frohlock f@-*o:l'Ok | |||
_) fung (A fUNg | |||
.group g | |||
_) g (_ ge: | |||
@@ -478,7 +497,9 @@ | |||
i (i i:_! | |||
@) ik (_ 'i:k | |||
s) ik (_ 'i:k | |||
@r) ik (_ Ik | |||
br) ik (_ 'i:k | |||
@t) ik (_ =i:k | |||
polit) ik 'i:k | |||
@) ik (el_ 'i:k | |||
@@ -492,6 +513,7 @@ | |||
_) inter Int@* | |||
@) ion (_ j'o:n | |||
@) io (n Io: | |||
io Io: | |||
@) is (_ Is | |||
&) isch (_ =IS | |||
is (mus_ 'Is | |||
@@ -510,7 +532,7 @@ | |||
ieh i: | |||
@) ie (_ 'i: | |||
&) ie (ll_ i:,E | |||
&) ie (ll_ I'E | |||
&) ie (r_ 'i: | |||
u) ie (r_ _|'i: | |||
&) ie (rlich 'i: | |||
@@ -614,6 +636,7 @@ | |||
mitt (eC mIt | |||
mitt (l mIt | |||
_) mo (rb m%O | |||
_) mono (@ m,o:no: | |||
_) motor m%o:to:* | |||
_) ms _^_EN | |||
musik m%u:zi:k | |||
@@ -625,12 +648,19 @@ | |||
ng N | |||
// ng (A Ng | |||
// ng (l Ng | |||
o) ng (e ng | |||
o) ng (A Ng | |||
ng (r Ng | |||
nk Nk | |||
nk (A nk | |||
fu) nk Nk | |||
nce (_ _^_EN | |||
_) ne (b ne: | |||
nebeneina (nd n,e:b@n_|aIn'a | |||
_) ne (g ne: | |||
neglig ne:gli:Z | |||
neglige ne:gli:Z | |||
&in) nen (_S3 @n | |||
&) ness _^_EN | |||
news _^_EN | |||
@@ -658,7 +688,9 @@ | |||
_) ob (jek %Op | |||
_) obst (reP4 'o:pst | |||
@) o (g_ 'o: | |||
t) ogen (_ o:g'e:n | |||
@) o (gin_ 'o: | |||
o (l_ 'o: | |||
o (m_ 'o: | |||
@A) o (n_ 'o: | |||
@) oo (_ u: | |||
@@ -666,6 +698,7 @@ | |||
z) oo (m u: | |||
&t) or (_ =o:* | |||
&) oren (_ 'o:*@n | |||
oso (_ 'o:zo: | |||
st) o (ss o: | |||
@@ -680,8 +713,9 @@ | |||
passagie pasaZ'i: | |||
_) pay _^_EN | |||
_) peri p,e:*i: | |||
_) perio p,e:*Io: | |||
_) periphe p,e:*i:fe: | |||
_) personen (@P8 pE*s'o:n@n | |||
philie f'i:li: | |||
_) pro (@ %p@-*o: | |||
@@ -690,10 +724,14 @@ | |||
_) poly (@P4 p,o:ly: | |||
partei p%a*taI | |||
_) perfe (k p%E*fE | |||
_) polik p'o:li:k | |||
_) po (lit p%o: | |||
pool _^_EN | |||
power _^_EN | |||
_) preß (@P4 p@-*'Es | |||
_) prinzipien (@P9 p@-*Ints'i:pI@ | |||
_) privat (@P6 p@-*i:v'A:t | |||
problem p@-*%o:ble:m | |||
_) psycho (@P6 ps,y:Co: | |||
_) psycho (ti psy:C'o: | |||
_) pu (e p%u: | |||
@@ -806,6 +844,7 @@ | |||
_) teen _^_EN | |||
thrill _^_EN | |||
_pa) th t | |||
the (era te: | |||
@) tient (_ tsI'Ent | |||
@) tion tsI,o:n | |||
@) tion (_ tsI'o:n | |||
@@ -943,9 +982,19 @@ | |||
_) z (_ tsEt | |||
z ts | |||
z) z | |||
ziell tsj'El | |||
_) zer (@ %tsE* | |||
_) zentral (@P7 tsEnt@-*'A:l | |||
_) zentral (i tsEnt@-*al | |||
_) zer (@P3 tsE* | |||
_) zere (b tse:*e: | |||
_) zere (m tse:*e: | |||
ziell tsj'El | |||
_) zie (ge@P3 ts'aI | |||
_) zeit (@P4 ts'aIt | |||
_) ziel (@P4 ts'i:l | |||
_) zier (@P4 ts'i:* | |||
_) zigaretten (@P10 tsi:ga*'Et@n | |||
_) zigeu tsi:g'OY | |||
_) zu (C@P2 ts%u: | |||
_) zu (nC tsU | |||
_) zurück (@P6 tsu:*'yk | |||
@@ -955,7 +1004,7 @@ | |||
.group ä | |||
ä E: | |||
äh (+ e: | |||
äu OI | |||
äu OY | |||
ä (C% E | |||
ä (CC E | |||
@@ -969,6 +1018,7 @@ | |||
ö Y: | |||
öh (+ Y: | |||
ö (_ 'Y: | |||
ö (C% W | |||
ö (CC W | |||
ö (sch W | |||
@@ -993,11 +1043,14 @@ | |||
.group | |||
é e: | |||
ée 'e: | |||
é (_ 'e: | |||
, (D kOma | |||
/ slaS | |||
% p@-*o:ts'Ent | |||
$ dOl@ | |||
€ OI*o: | |||
€ OY*o: | |||
£ paUnd | |||
. pUnkt |
@@ -44,7 +44,7 @@ Dictionary de_dict | |||
3 @ @- a A A: aI aU | |||
E E2 E: e: I i: O o: | |||
OI U u: W y y: Y: | |||
OY U u: W y y: Y: | |||
* : ; b C C2 d D | |||
dZ f g h j k l m | |||
@@ -159,7 +159,7 @@ o: u u: y Y y: Y: | |||
* : b c C d dZ f | |||
g h j J k l m n | |||
N n^ p R s S s2 t | |||
tS ts v z Z z2 | |||
tS ts v z Z | |||
Dictionary it_dict | |||
@@ -229,11 +229,10 @@ Dictionary sk_dict | |||
l- l: o o: oU r- r: u | |||
u: | |||
* b c d d; dZ f g | |||
h j k l l^ m n N | |||
n^ p r R R^ R^/ s S | |||
t t; tS ts v w x z | |||
Z | |||
* b d d; dZ f g h | |||
j k l l^ m n N n^ | |||
p r R R^ R^/ s S t | |||
t; tS ts v w x z Z | |||
Dictionary sv_dict |
@@ -1800,6 +1800,7 @@ uni ju:nI2 | |||
uninterest Vn'Int@r@st | |||
university ju:nIv'3:sItI2 | |||
unite ju:n'aIt | |||
unless Vnl'Es | |||
unread Vnr'Ed $only | |||
unsure VnS'U@ | |||
untidy Vnt'aIdI2 |
@@ -4848,6 +4848,7 @@ | |||
C) y (abl I2 | |||
y (y | |||
y (C I | |||
C) y I2 | |||
y (Be# aI | |||
@C) y (Be# aI | |||
ye (_ aI |
@@ -273,9 +273,9 @@ ny En^ | |||
_. pont | |||
% sa:zAle:k | |||
@ kukAts | |||
€ Eu*o | |||
€ EuRo | |||
+ plus | |||
§ p'A*AgRAfuS | |||
§ pRARAgRAfuS | |||
@@ -64,7 +64,7 @@ hierar) ch (i C | |||
C) ds tS | |||
ds (C tS | |||
A) ds (A tS: | |||
dsz dz | |||
dsz ts | |||
dsz (C ts | |||
A) dsz (A ts: | |||
dz dz | |||
@@ -218,7 +218,7 @@ _munká) s S | |||
_) semmelweiss sEmmElvEjs | |||
engel) s s | |||
_) saar sAAR | |||
_) saar sa:R | |||
.group t | |||
@@ -285,24 +285,25 @@ _munká) s S | |||
zs Z | |||
zzs Z: | |||
gá) z (sz z2 // don't devoice [z] to [s] | |||
gé) z (sz z2 | |||
há) z (so z2 | |||
há) z (sz z2 | |||
lá) z (sz z2 | |||
má) zc (sz z2 | |||
mé) zc (sz z2 | |||
nehé) z (sé z2 | |||
tű) z (sz z2 | |||
ví) z (sz z2 | |||
ga) zs (ág z2S | |||
_gá) zsz (ámla z2s: | |||
_gá) zsz (ámlá z2s: | |||
_ré) zs (ó z2S | |||
_vá) zs (or z2S | |||
_szára) zs (ág z2S | |||
_kö) zs (ég z2S | |||
gá) z (sz z // don't devoice [z] to [s] | |||
gé) z (sz z | |||
há) z (so z | |||
há) z (sz z | |||
lá) z (sz z | |||
má) zc (sz z | |||
mé) zc (sz z | |||
nehé) z (sé z | |||
tű) z (sz z | |||
ví) z (sz z | |||
tor) z (szülött z | |||
ga) zs (ág zS | |||
_gá) zsz (ámla zs: | |||
_gá) zsz (ámlá zs: | |||
_ré) zs (ó zS | |||
_vá) zs (or zS | |||
_szára) zs (ág zS | |||
_kö) zs (ég zS | |||
.group |
@@ -73,7 +73,7 @@ _3X t@-*'idsat; | |||
_4X St'i*idsat; | |||
_5X p'&t;d;esjat | |||
_6X S'est;d;esjat | |||
_7X s'ed;emdsjat | |||
_7X s'ed;emd;esjat | |||
_8X 'osemd;esjat | |||
_9X d'ev&t;d;esjat | |||
_0C st'o | |||
@@ -138,7 +138,7 @@ bol $u+ // been | |||
// treat as letters if at the end of the clause | |||
a a: $atend // letter-a | |||
k ke: $atend // letter-k | |||
k ka: $atend // letter-k | |||
o o: $atend // letter-o | |||
s es $atend | |||
v ve: $atend |
@@ -628,7 +628,7 @@ o) v (_ u | |||
ě e | |||
ů u: // czech | |||
$ dola:r | |||
% percento | |||
% pertsento | |||
+ plus | |||
// 557 | |||
// 557 |
@@ -16,7 +16,7 @@ | |||
fr 32 118 | |||
fr_ca 11 118 | |||
hi 49 131 | |||
hu 24 114 | |||
hu 23 113 | |||
nl 26 117 | |||
pl 15 107 | |||
sk 29 125 | |||
@@ -224,7 +224,7 @@ | |||
2 ufric/hu_fi fi | |||
2 ufric/ll base is | |||
3 ufric/s base es pt | |||
13 ufric/s_ base fi fr hu es pt ro | |||
11 ufric/s_ base fi fr hu es pt ro | |||
15 ufric/s! base fi hu es pt | |||
2 ufric/s_continue fi hu | |||
2 ufric/sh base pt_pt | |||
@@ -399,8 +399,8 @@ | |||
6 vocw/v base ro | |||
4 vocw/zh base ro | |||
2 vocw/zh_rfx base | |||
4 voc/z base fr hu ro | |||
4 voc/z_ base fr hu ro | |||
3 voc/z base fr ro | |||
3 voc/z_ base fr ro | |||
4 voc/zh base sk ro | |||
3 voc/zh_ base ro | |||
1 voc/zh_2 sk |
@@ -129,7 +129,7 @@ phoneme aI | |||
endphoneme | |||
phoneme OI | |||
phoneme OY | |||
vowel starttype (o) endtype (i) | |||
length 220 | |||
formants vdiph/oi |
@@ -189,12 +189,3 @@ phoneme s2 // second part of geminated [s:] | |||
endphoneme | |||
phoneme z2 // [z] but without switchvoicing | |||
vcd alv frc sibilant | |||
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50 | |||
formants voc/z+ufric/s_ | |||
before _ voc/z_+ufric/s_%80 | |||
lengthmod 6 | |||
endphoneme | |||
@@ -183,8 +183,8 @@ static void Write4Bytes(FILE *f, int value) | |||
int OpenWavFile(const char *path, int rate) | |||
//========================================= | |||
int OpenWavFile(char *path, int rate) | |||
//=================================== | |||
{ | |||
static unsigned char wave_hdr[44] = { | |||
'R','I','F','F',0,0,0,0,'W','A','V','E','f','m','t',' ', | |||
@@ -197,7 +197,7 @@ int OpenWavFile(const char *path, int rate) | |||
if(path[0] == 0) | |||
return(0); | |||
if(path == "stdout") | |||
if(strcmp(path,"stdout")==0) | |||
f_wavfile = stdout; | |||
else | |||
f_wavfile = fopen(path,"wb"); | |||
@@ -220,7 +220,7 @@ static void CloseWavFile(int rate) | |||
{ | |||
unsigned int pos; | |||
if((f_wavfile==NULL) || (wavefile == "stdout")) | |||
if((f_wavfile==NULL) || (f_wavfile == stdout)) | |||
return; | |||
fflush(f_wavfile); |
@@ -1209,6 +1209,7 @@ if(control==2) | |||
espeak_Initialize(AUDIO_OUTPUT_RETRIEVAL,1000,NULL,1); | |||
espeak_SetSynthCallback(TestSynthCallback); | |||
espeak_SetUriCallback(TestUriCallback); | |||
unsigned int unique_identifier=0; | |||
int index=0; |
@@ -300,7 +300,7 @@ static int GetC(void) | |||
if((c2 & 0xc0) != 0x80) | |||
{ | |||
// This is not UTF8. Change to 8-bit characterset. | |||
if(n_bytes > 1) | |||
if((n_bytes == 2) && (ix == 1)) | |||
ungot2 = cbuf[2]; | |||
GetC_unget(c2); | |||
break; | |||
@@ -502,7 +502,7 @@ int Translator::AnnouncePunctuation(int c1, int c2, char *buf, int bufix) | |||
sprintf(p,"\001+10S%s",tone_punct_on); | |||
while(punct_count-- > 0) | |||
sprintf(buf,"%s %s",buf,punctname); | |||
sprintf(p,"%s %s\001S",buf,tone_punct_off); | |||
sprintf(p,"%s %s\001-10S",buf,tone_punct_off); | |||
} | |||
else | |||
{ |
@@ -191,7 +191,7 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events); | |||
extern "C" | |||
#endif | |||
void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*)); | |||
/* This function must be called before synthesis functions are used, in order to deal with | |||
/* This function may be called before synthesis functions are used, in order to deal with | |||
<audio> tags. It specifies a callback function which is called when an <audio> element is | |||
encountered and allows the calling program to indicate whether the sound file which | |||
is specified in the <audio> element is available and is to be played. |
@@ -35,7 +35,7 @@ | |||
#include "translate.h" | |||
#include "wave.h" | |||
const char *version_string = "1.26.06 18.Jun.07"; | |||
const char *version_string = "1.26.08 19.Jun.07"; | |||
const int version_phdata = 0x012601; | |||
int option_device_number = -1; |
@@ -379,7 +379,7 @@ Translator *SelectTranslator(const char *name) | |||
tr->langopts.unstressed_wd1 = 2; | |||
tr->langopts.unstressed_wd2 = 2; | |||
tr->langopts.param[LOPT_IT_LENGTHEN] = 2; // remove lengthen indicator from unstressed or non-penultimate syllables | |||
tr->langopts.param[LOPT_IT_DOUBLING] = 2; | |||
// tr->langopts.param[LOPT_IT_DOUBLING] = 2; | |||
tr->langopts.param[LOPT_SONORANT_MIN] = 130; // limit the shortening of sonorants before short vowels | |||
tr->langopts.param[LOPT_REDUCE] = 1; // reduce vowels even if phonemes are specified in it_list | |||
tr->langopts.numbers = 0x2709; |
@@ -758,6 +758,7 @@ if((wmark > 0) && (wmark < 8)) | |||
char end_phonemes2[N_WORD_PHONEMES]; | |||
// remove any standard suffix and confirm that the prefix is still recognised | |||
phonemes2[0] = 0; | |||
end2 = TranslateRules(word, phonemes2, N_WORD_PHONEMES, end_phonemes2, wflags|FLAG_NO_PREFIX|FLAG_NO_TRACE, dictionary_flags); | |||
if(end2) | |||
{ |
@@ -227,7 +227,8 @@ extern const int param_defaults[N_SPEECH_PARAM]; | |||
#define LOPT_LENGTH_MODS 6 | |||
// increase this to prevent sonorants being shortened before shortened (eg. unstressed) vowels | |||
#define LOPT_SONORANT_MIN 7 | |||
// Italian "syntactic doubling" | |||
// bit 0=Italian "syntactic doubling" of consoants in the word after a word marked with $double attribute | |||
// bit 1=also after a word which ends with a stressed vowel | |||
#define LOPT_IT_DOUBLING 8 | |||
// max. amplitude for vowel at the end of a clause | |||
#define LOPT_MAXAMP_EOC 9 |
@@ -190,7 +190,7 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events); | |||
extern "C" | |||
#endif | |||
ESPEAK_API void espeak_SetUriCallback(int (*UriCallback)(int, const char*, const char*)); | |||
/* This function must be called before synthesis functions are used, in order to deal with | |||
/* This function may be called before synthesis functions are used, in order to deal with | |||
<audio> tags. It specifies a callback function which is called when an <audio> element is | |||
encountered and allows the calling program to indicate whether the sound file which | |||
is specified in the <audio> element is available and is to be played. |