Browse Source

[1.29.06] Adjust some vowels in en-sc, en-r, en-rp, en-wm

Windows: Fix problem with mbrola voices stopping in Jaws screenreader.
--compile. Don't read and report faults in previous *-dict file.
Added phoneme translation for German mbrola "de6" voice.
Fix to phoneme translation for German voices.
lang=zhy.  Assume word boundary between an ideagraph and an English word.
lang=pt.  Update pt_rules


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

+ 30
- 14
dictsource/pt_list View File

@@ -245,9 +245,10 @@ te $u
nos $u
//se $u

este $u+ // this
este $u+ 'estSi // this
estes $u+ 'estSis // these
esta 'Est& $brk $u+
esse $u+ // that
esse $u+ 'esi // that
essa 'Es& $brk $u+
aquele $u+ // that
aquela $u+
@@ -267,10 +268,10 @@ seu $u+
sua $u+
seus $u+
suas $u+
nosso $u+
nossa $u+
nossos $u+
nossas $u+
nosso $u+ n'OsU
nossa $u+ n'Os&
nossos $u+ n'OsUs
nossas $u+ n'Os&s
dele $u+
dela $u+
deles $u+
@@ -300,9 +301,9 @@ numas $u $brk

por $u $brk // by,for,through
pelo $u $brk
pela $u $brk
pela $u $brk p'el&
pelos $u $brk
pelas $u $brk
pelas $u $brk p'el&s

a $u $brk // to,at
?1 a & $u $brk
@@ -425,7 +426,7 @@ seriam $u
// estar - to be
estar $u
estou $u
está $u
está $u est'a
estamos $u
estais $u
estão $u
@@ -438,6 +439,7 @@ estive $u
esteve $u
estivemos $u
estiveram $u
estiver $u estSiv'Er

estarei $u
estará $u
@@ -586,9 +588,11 @@ roxo x'oSU

// foreign words
?1 alt 'alt
?2 agosto &g'ostU
?1 back b'Ek
?1 blind bl'aind
?1 braille b:r'aily
?2 Braille bR'aili
?1 cancel k'&ns'El
?1 caps k'aps
?1 com kom
@@ -612,24 +616,31 @@ roxo x'oSU
?1 google g'u:g&l
?2 google g'ugol
?1 hardware 'ard,w'Er-
?2 hardware x'ardwe@-
?2 hardware h'ardwe@-
?1 home 'omy
?2 home x'owmi
?2 home h'owmi
?1 hotmail h'Otm'eIl
?2 hotmail xotm'eIl
?2 hotmail hotm'eIl
?1 install ,inst'al
?2 internet iNtern'Et
?2 Intranet iNtRan'Et
?2 inveja iNv'EZ&
?1 kernel k'Ern,El
?2 kernel k'Ern@l
?1 line l'ain
layout l'eI,aUt
?2 logo l'OgU
?1 lock l'Ok
mail m'eIl
mails m'eIls
?1 maior m,&j'Or-
?2 maior maI'Or
?2 maiores maI'O*is
?1 menor myn'Or-
?2 menor men'Or
?2 menores men'O*is
?2 melhor melj'Or
?2 melhores melj'O*is
?2 mouse m'aUzi
?1 menu menu
?1 next n'Ekst
@@ -640,7 +651,9 @@ roxo x'oSU
?1 ovo 'ovu
?1 pause p'au:z
page p'eIdZ
python p'aIT&~N
?2 pior pi'Or
?2 piores pi'O*is
python p'aIT&~N
?1 readme r'i:dmi:
?1 sapi s,ap'i
?1 scanner sk'En&r
@@ -657,8 +670,11 @@ roxo x'oSU
?1 telemóveis t,El,Em'OveIs#
?1 up &p
?1 upload &pl'oud
?2 web w'Eb
?2 verbete verb'etSi
?2 verbetes verb'etSis
?1 yahoo 'i,ah'u
?2 yahoo iax'u
?2 yahoo iah'u
?1 yes j'Es



+ 73
- 42
dictsource/pt_rules View File

@@ -34,7 +34,9 @@
?2 alh alj

a (m &~
a (mA@ &
a (n &~
a (nA@ &
am (_ =&~N
am (C &~m
an (K &~N
@@ -130,67 +132,83 @@

?1 e (e i //eg: candeeiro
?2 ee i
?2 pr) ee (n ee

?2 el (K EU
?2 elh elj

e (be_ E
e (bem_ E
e (bes_ E

e (ca_ E
e (ce_ E
e (cem_ E
e (ces_ E

e (clA_ E
e (clAs_ E
e (clAm_ E
e (co_ E

e (de_ E
e (dem_ E

e (fa_ E

e (gA_ E
e (gAm_ E

e (grA_ E
e (grAm_ E

h) e (gA_ e
h) e (gAm_ e

e (gue_ E
e (guem_ E

e (la_ E
e (las_ E

e (rA_ E
e (rAm_ E
e (rAs_ E

l) e (rA_ e
l) e (rAm_ e

e (rsA_ E
e (rsAm_ E
e (rsAs_ E

e (se_ E
e (sem_ E

e (ssA_ E
e (ssAm_ E

e (stA_ E
e (stAm_ E
e (stAs_ E
e (strA_ E

e (rnA_ E
e (rnAm_ E
e (rnAs_ E

e (rtA_ E
e (rtAm_ E
e (rtAs_ E

e (rrA_ E
e (rrAm_ E
e (rrAs_ E

e (rvA_ E
e (rvAm_ E
e (rvAs_ E

e (ve_ E
e (vem_ E
e (ves_ E

e (rrAs_ E
e (tA_ E
e (tAm_ E

e (vA_ E
e (vAm_ E

e (rrAs_ E

e (x_ E
e (xA_ E
e (xAm_ E
e (xAs_ E
?2 _n) e (t E

em (C eIm
@@ -223,7 +241,6 @@

j) e (tA_ E
j) e (tAm_ E
j) e (tAs_ E

?1 _) es (C@@ S // drop initial "e".
?1 _) e (f i // efectuar, etc.
@@ -425,12 +442,43 @@
oi (s oI
o (iCK o
oo u
c) oo oo
?1 C) oo (_ ow // eg: voo, enjoo, etc...
oy OI

o (g_ O
o (gs_ O
o (Ca_ O
o (cA_ O
o (cAm_ O

o (que_ O
o (quem_ O

p) o (dA_ O
p) o (dAm_ O

o (g_ O

o (ge_ O
o (gem_ O

o (jA_ O
o (jAm_ O

o (ldA_ O
o (ldAm_ O

o (ltA_ O
o (ltAm_ O

o (sA_ O
o (sAm_ O

o (ssA_ O
o (ssAm_ O

o (va_ O
o (vAm_ O
o (veCs_ O

?1 o (l_ 'O
?2 ol (_ Ow
?2 olh olj
@@ -445,21 +493,21 @@

o (brA_ O
o (brAm_ O
o (brAs_ O

o (rCA_ O
o (rCAm_ O
o (rCAs_ O
o (stA_ O
o (stAm_ O
o (stAs_ O

o (tA_ O
o (tAm_ O

?2 ox (_ Oks
?1 oz (_ Os#
?2 oz (_ Oz
o (zes_ O
o (ra_ O
o (ras_ O
?1 _) o (C O // eg: olá, orla, opção, etc...
?1 _C) o (CACAC u // Documento, documentação, localizar, etc.
?1 f) o (rmat u // formatar, formato.
@@ -712,20 +760,3 @@
=) = (=
==) = (_ _::



















+ 1
- 1
espeak-data/voices/!v/f2 View File

@@ -2,7 +2,7 @@ language variant
name female2
gender female

pitch 140 220
pitch 145 200
formant 0 105 80 150
formant 1 110 80 160
formant 2 110 70 150

+ 1
- 1
espeak-data/voices/!v/f4 View File

@@ -14,5 +14,5 @@ formant 6 110 80 150
formant 7 110 75 150
formant 8 110 75 150

stressAdd -20 -20 -20 -20 0 0 60 90
stressAdd -20 -20 -20 -20 0 0 60 80
stressAmp 18 16 20 20 20 20 20 20

+ 2
- 1
espeak-data/voices/en/en View File

@@ -4,6 +4,7 @@ language en 2
gender male

pitch 82 117
replace 03 I i
replace 03 I2 i

formant 0 100 100 105


+ 2
- 0
espeak-data/voices/en/en-rp View File

@@ -7,3 +7,5 @@ phonemes en_rp
replace 00 o@ O@
replace 03 I i
replace 03 I2 i
replace 03 @ a2
replace 03 3 a2

+ 6
- 0
espeak-data/voices/mb/mb-de6 View File

@@ -0,0 +1,6 @@
name german-mbrola-6
language de 6
gender male

mbrola de6 de5_phtrans


+ 1
- 1
espeak-data/voices/mb/mb-us3 View File

@@ -9,4 +9,4 @@ dictrules 3 6
stressLength 170 135 205 205 0 0 245 275

pitch 82 117
mbrola us3
mbrola us3 us3_phtrans

+ 1
- 1
espeak-data/voices/zhy View File

@@ -1,5 +1,5 @@
name cantonese-test
language zh
language zh-yue
phonemes zhy
dictionary zhy
gender male

+ 16
- 16
phsource/compile_report View File

@@ -278,9 +278,9 @@
1 vdiph2/eo ro
1 vdiph2/e[u ro
1 vdiph2/i@ en_n
1 vdiph2/i@_2 en_wm
1 vdiph2/ie fi
1 vdiph2/ii@ en
1 vdiph2/ii@_2 en_wm
1 vdiph2/ii@_3 vi
3 vdiph2/iu base2 vi zhy
1 vdiph2/iu_2 fi
@@ -341,9 +341,9 @@
1 vdiph/i#i ro
6 vdiph/oi base2 en_wm de it la vi
1 vdiph/oi_2 af
10 vdiph/ooi en en_n en_us en_rp cy eo fi no zhy
9 vdiph/ooi en en_n en_us cy eo fi no zhy
1 vdiph/ooi_2 af
1 vdiph/ooi_3 en_wm
2 vdiph/ooi_3 en_rp en_wm
1 vdiph/oou cs
2 vdiph/ou fi zhy
2 vdiph/ou_2 sk ro
@@ -409,7 +409,7 @@
1 voc/zh_2 sk
2 voc/z_pzd base
2 voc/z_pzd_ base
14 vowel/@ base en en_us en_rp cy hi hr
13 vowel/@ base en en_us en_rp cy hi hr
1 vowel/@- base
4 vowel/& en_rp fi hi sv
4 vowel/0 base2 en hi pt
@@ -436,7 +436,7 @@
3 vowel/aa_2 en cy
1 vowel/aa_3 af
2 vowel/aa_4 sv vi
2 vowel/aa_5 en_n
3 vowel/aa_5 en_n en_wm
2 vowel/aa_6 de
1 vowel/aa_7 nl
2 vowel/aa_8 en_us
@@ -459,7 +459,7 @@
1 vowel/@_fnt hr
1 vowel/@_hgh no
18 vowel/i base2 en_n en_rp en_wm cy eo fr hu pl it pt pt_pt ++
1 vowel/i# cy
2 vowel/i# en_rp cy
5 vowel/i_2 de nl la sv
3 vowel/i_3 af fr sk
4 vowel/i_4 fi hu it is
@@ -468,13 +468,14 @@
1 vowel/i_6 hr
3 vowel/i_en en en_us vi
2 vowel/i_fnt hi
10 vowel/ii en_wm cy de fr_ca nl is zhy
12 vowel/ii en_rp en_wm cy de fr_ca nl is zhy
3 vowel/ii# cy pl ru
1 vowel/ii_2 la
7 vowel/ii_3 en_rp fi hi sk hr sv no
7 vowel/ii_4 en en_n en_rp
6 vowel/ii_3 fi hi sk hr sv no
5 vowel/ii_4 en en_n
2 vowel/ii_6 en_wm
1 vowel/ii_en en
5 vowel/@_low hi ro no
10 vowel/@_low en_rp hi ro no
11 vowel/o base2 en en_wm de hi it la pt_pt sv
4 vowel/o_2 cy hi hu no
2 vowel/o-_2 en_n en_wm
@@ -500,7 +501,7 @@
4 vowelr/r-voc hi sk hr
2 vowelr/V3_r en en_sc
1 vowelr/V_r en
7 vowel/u en_n cy de eo fr cs la
6 vowel/u cy de eo fr cs la
5 vowel/u# en en_sc
5 vowel/u_2 fi fr sk hr ro
1 vowel/u#_2 sv
@@ -508,14 +509,15 @@
1 vowel/u_4 en_n
2 vowel/u#_4 en_sc
1 vowel/u_5 sw
3 vowel/u_6 en_rp pt_pt
2 vowel/u_6 pt_pt
1 vowel/u_7 vi
17 vowel/u_bck base2 cy fi fr_ca hi hu nl pl sk hr it pt ++
1 vowel/u_fnt en_rp
2 vowel/uu en en_wm
3 vowel/uu_2 base2 de la
1 vowel/uu_3 af
2 vowel/uu_4 fi sv
7 vowel/uu_bck fr_ca hi hu pt no zhy
8 vowel/uu_bck en_n fr_ca hi hu pt no zhy
1 vowel/V en_sc
4 vowel/V_2 en af ru
3 vowel/V_3 en_rp hi vi
@@ -541,9 +543,9 @@
5 vwl_en/aU@ en en_n en_us en_sc en_wm
12 vwl_en/@L en en_us en_sc en_rp en_wm af
3 vwl_en/@L_2 en_sc
1 vwl_en_n/aa_5 en_n
1 vwl_en_n/O@ en_n
1 vwl_en_n/u_ en_n
4 vwl_en_rp/@ en_rp
3 vwl_en_rp/aa en_rp
1 vwl_en_rp/aU@ en_rp
1 vwl_en_rp/e@ en_rp
@@ -565,9 +567,7 @@
3 vwl_en_us/or en_us en_sc
1 vwl_en_us/ur en_us
1 vwl_en_us/V en_us
2 vwl_en_wm/aa en_wm
1 vwl_en_wm/i en_wm
2 vwl_en_wm/ii en_wm
3 vwl_fr/@R fr pt_pt
1 vwl_fr/@R2 fr_ca
1 vwl_hi/A hi

+ 2
- 1
phsource/mbrola/de4 View File

@@ -35,10 +35,11 @@
0 y NULL 0 Y
0 W NULL 0 9
0 A: NULL 0 a:
0 A NULL 0 a:
0 Y: NULL 0 2:
0 OI NULL 0 OY
0 3 NULL 0 6
0 _! NULL 0 ?
0 _| NULL 0 ?
0 pF NULL 0 pf
0 r NULL 0 R


+ 3
- 1
phsource/mbrola/de5 View File

@@ -17,10 +17,12 @@
0 y NULL 0 Y
0 W NULL 0 9
0 A: NULL 0 a:
0 A NULL 0 a:
0 Y: NULL 0 2:
0 OI NULL 0 OY
0 3 NULL 0 6
0 _! NULL 0 ?
//0 _! NULL 0 ?
0 _| NULL 0 ?
0 pF NULL 0 pf
0 r NULL 0 R


+ 4
- 4
phsource/ph_english_n View File

@@ -56,7 +56,7 @@ endphoneme
phoneme U
vowel starttype (o) endtype (o)
length 150
formants vowel/u
formants vowel/uu_bck
endphoneme


@@ -88,8 +88,8 @@ endphoneme

phoneme A@
vowel starttype (a) endtype (@)
length 240
formants vowel/aa_5
length 250
formants vwl_en_n/aa_5
linkout r-
endphoneme

@@ -170,7 +170,7 @@ endphoneme


phoneme oU
vowel starttype (o) endtype (u)
vowel starttype (o) endtype (o)
length 210
formants vowel/o_4
endphoneme

+ 18
- 17
phsource/ph_english_rp View File

@@ -7,7 +7,7 @@
phoneme @ // Schwa
vowel starttype (@) endtype (@)
formants vowel/@
before _ vwl_en_rp/@
before _ vowel/@_low
unstressed
linkout r-
length 140
@@ -17,7 +17,7 @@ endphoneme
phoneme 3 // Schwa, used for rhotic schwa in American
vowel starttype (@) endtype (@)
formants vowel/@
before _ vwl_en_rp/@
before _ vowel/@_low
unstressed
linkout r-
beforevowel @
@@ -26,7 +26,7 @@ endphoneme

phoneme @2 // Schwa, changes to I before a vowel
vowel starttype (@) endtype (@)
formants vwl_en_rp/@
formants vowel/@_low
unstressed
beforevowel I
length 120
@@ -34,7 +34,7 @@ endphoneme

phoneme @5 // Schwa, changes to U before a vowel
vowel starttype (@) endtype (@)
formants vwl_en_rp/@
formants vowel/@_low
unstressed
beforevowelpause U
length 140
@@ -69,14 +69,23 @@ endphoneme
phoneme I
vowel starttype (i) endtype (i)
length 130
formants vowel/ii_4
formants vowel/ii
linkout ;
endphoneme

phoneme I2
vowel starttype (i) endtype (i)
unstressed
length 140
formants vowel/ii
linkout ;
endphoneme


phoneme i // optional variant of [I] for end of words
vowel starttype (i) endtype (i)
length 140
formants vowel/ii_3
formants vowel/i#
linkout ;
endphoneme

@@ -105,20 +114,12 @@ phoneme U
endphoneme


phoneme I2
vowel starttype (i) endtype (i)
unstressed
length 140
formants vowel/ii_4
linkout ;
endphoneme


phoneme a2
vowel starttype (@) endtype (@)
unstressed
length 150
formants vowel/@
formants vowel/@_low
linkout r-
endphoneme

@@ -193,7 +194,7 @@ endphoneme
phoneme u:
vowel starttype (u) endtype (u)
length 190
formants vowel/u_6
formants vowel/u_fnt
before l/2 vwl_en/u_L-40+l/L2_uL
endphoneme

@@ -229,7 +230,7 @@ endphoneme
phoneme OI
vowel starttype (o) endtype (i)
length 230
formants vdiph/ooi
formants vdiph/ooi_3
endphoneme



+ 1
- 1
phsource/ph_english_sc View File

@@ -116,7 +116,7 @@ endphoneme

phoneme 0
vowel starttype (o) endtype (o)
length 180
length 200
formants vowel/oo_2
reduceto @ 0
endphoneme

+ 15
- 14
phsource/ph_english_wm View File

@@ -35,11 +35,22 @@ endphoneme
phoneme I
vowel starttype (i) endtype (i)
length 140
formants vwl_en_wm/ii
formants vowel/ii_6
before l vowel/ii
linkout ;
endphoneme


phoneme I2
vowel starttype (i) endtype (i)
unstressed
length 140
formants vowel/ii_6
before l vowel/ii
linkout ;
endphoneme


phoneme i // optional variant of [I] for end of words
vowel starttype (i) endtype (i)
length 220
@@ -71,16 +82,6 @@ phoneme U
endphoneme


phoneme I2
vowel starttype (i) endtype (i)
unstressed
length 140
formants vwl_en_wm/ii
before l vowel/ii
linkout ;
endphoneme


phoneme a2
vowel starttype (@) endtype (@)
unstressed
@@ -93,7 +94,7 @@ endphoneme
phoneme A:
vowel starttype (a) endtype (a)
length 240
formants vwl_en_wm/aa
formants vowel/aa_5
linkout r-
endphoneme

@@ -101,7 +102,7 @@ endphoneme
phoneme A@
vowel starttype (a) endtype (a)
length 240
formants vwl_en_wm/aa
formants vowel/aa_5
linkout r-
endphoneme

@@ -211,7 +212,7 @@ endphoneme
phoneme i@
vowel starttype (i) endtype (@)
length 240
formants vdiph2/ii@_2
formants vdiph2/i@_2
linkout r-
endphoneme


BIN
phsource/vdiph/@u_2 View File


BIN
phsource/vdiph/ae_2 View File


BIN
phsource/vdiph/ooi_3 View File


BIN
phsource/vdiph/oou View File


BIN
phsource/vdiph2/i@_2 View File


BIN
phsource/vowel/V_3 View File


BIN
phsource/vowel/e# View File


BIN
phsource/vowel/i# View File


BIN
phsource/vowel/i#_3 View File


phsource/vwl_en_wm/ii → phsource/vowel/ii_6 View File


BIN
phsource/vowel/o_4 View File


BIN
phsource/vowel/u_fnt View File


BIN
phsource/vowel/vowelchart.png View File


BIN
phsource/vwl_en_wm/aa → phsource/vwl_en_n/aa_5 View File


BIN
phsource/vwl_en_wm/i View File


+ 10
- 10
platforms/windows/windows_sapi/ttsengobj.cpp View File

@@ -117,7 +117,7 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events)
Event = &Events[n_Events++];
Event->eEventId = SPEI_TTS_BOOKMARK;
Event->elParamType = SPET_LPARAM_IS_STRING;
Event->ullAudioStreamOffset = ((event->audio_position + audio_offset) * 441)/10; // ms -> bytes
Event->ullAudioStreamOffset = ((event->audio_position + audio_offset) * srate)/10; // ms -> bytes
Event->lParam = (long)event->id.name;
Event->wParam = wcstol((wchar_t *)event->id.name,&tailptr,10);
}
@@ -125,11 +125,11 @@ int SynthCallback(short *wav, int numsamples, espeak_EVENT *events)
if(event->type == espeakEVENT_SENTENCE)
{
Event = &Events[n_Events++];
Event->eEventId = SPEI_SENTENCE_BOUNDARY;
Event->elParamType = SPET_LPARAM_IS_UNDEFINED;
Event->ullAudioStreamOffset = (event->audio_position * 441)/10; // ms -> bytes
Event->lParam = event->text_position-1 + text_offset;
Event->wParam = 0; // TEMP
Event->eEventId = SPEI_SENTENCE_BOUNDARY;
Event->elParamType = SPET_LPARAM_IS_UNDEFINED;
Event->ullAudioStreamOffset = ((event->audio_position + audio_offset) * srate)/10; // ms -> bytes
Event->lParam = 0;
Event->wParam = 0; // TEMP
}
#endif
}
@@ -760,15 +760,15 @@ STDMETHODIMP CTTSEngObj::GetOutputFormat( const GUID * pTargetFormatId, const WA
int FAR PASCAL CompileDictionary(const char *voice, const char *path_log)
{//===========================================================
FILE *f_log;
FILE *f_log3;
char fname[120];
f_log = fopen(path_log,"w");
f_log3 = fopen(path_log,"w");
sprintf(fname,"%s/",path_install);
espeak_SetVoiceByName(voice);
espeak_CompileDictionary(fname,f_log);
fclose(f_log);
espeak_CompileDictionary(fname,f_log3);
fclose(f_log3);
return(0);
}

+ 18
- 15
src/compiledict.cpp View File

@@ -501,7 +501,7 @@ int compile_dictlist_file(const char *path, const char* filename)
char *p;
int count=0;
FILE *f_in;
char buf[256];
char buf[sizeof(path_home)+45];
char dict_line[128];
sprintf(buf,"%s%s",path,filename);
@@ -1300,15 +1300,16 @@ static int compile_dictrules(FILE *f_in, FILE *f_out, char *fname_temp)



int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, char *fname)
{//======================================================================================
int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, char *fname_err)
{//==========================================================================================
// fname: space to write the filename in case of error

FILE *f_in;
FILE *f_out;
int offset_rules=0;
int value;
char fname_buf[sizeof(path_home)+15];
char fname_in[sizeof(path_home)+45];
char fname_out[sizeof(path_home)+15];
char fname_temp[sizeof(path_home)+15];
char path[sizeof(path_home)+40]; // path_dsource+20

@@ -1316,8 +1317,6 @@ int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, cha

if(dsource == NULL)
dsource = "";
if(fname == NULL)
fname = fname_buf;

f_log = log;
//f_log = fopen("log2.txt","w");
@@ -1325,10 +1324,20 @@ int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, cha
f_log = stderr;

sprintf(path,"%s%s_",dsource,dict_name);
sprintf(fname_in,"%srules",path);
f_in = fopen_log(fname_in,"r");
if(f_in == NULL)
{
if(fname_err)
strcpy(fname_err,fname_in);
return(-1);
}

sprintf(fname,"%s%c%s_dict",path_home,PATHSEP,dict_name);
if((f_out = fopen_log(fname,"wb+")) == NULL)
sprintf(fname_out,"%s%c%s_dict",path_home,PATHSEP,dict_name);
if((f_out = fopen_log(fname_out,"wb+")) == NULL)
{
if(fname_err)
strcpy(fname_err,fname_in);
return(-1);
}
sprintf(fname_temp,"%s%ctemp",path_home,PATHSEP);
@@ -1359,13 +1368,7 @@ int CompileDictionary(const char *dsource, const char *dict_name, FILE *log, cha
compile_dictlist_end(f_out);
offset_rules = ftell(f_out);
sprintf(fname,"%srules",path);
fprintf(f_log,"Compiling: '%s'\n",fname);
f_in = fopen_log(fname,"r");
if(f_in == NULL)
{
return(-1);
}
fprintf(f_log,"Compiling: '%s'\n",fname_in);

compile_dictrules(f_in,f_out,fname_temp);
fclose(f_in);

+ 3
- 0
src/dictionary.cpp View File

@@ -131,6 +131,9 @@ int Translator::LoadDictionary(const char *name, int no_error)

strcpy(dictionary_name,name); // currently loaded dictionary name

if(no_error) // don't load dictionary, just set the dictionary_name
return(1);

// Load a pronunciation data file into memory
// bytes 0-3: offset to rules data
// bytes 4-7: number of hash table entries

+ 12
- 9
src/speak.cpp View File

@@ -548,18 +548,11 @@ int main (int argc, char **argv)

initialise();

if(voicename[0] == 0)
strcpy(voicename,"default");

if(SetVoiceByName(voicename) != EE_OK)
{
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
exit(2);
}


if(flag_compile)
{
LoadVoice(voicename,5);

#ifdef PLATFORM_DOS
char path_dsource[sizeof(path_home)+20];
strcpy(path_dsource,path_home);
@@ -580,6 +573,16 @@ int main (int argc, char **argv)
exit(0);
}


if(voicename[0] == 0)
strcpy(voicename,"default");

if(SetVoiceByName(voicename) != EE_OK)
{
fprintf(stderr,"%svoice '%s'\n",err_load,voicename);
exit(2);
}

SetParameter(espeakRATE,speed,0);
SetParameter(espeakVOLUME,amp,0);
SetParameter(espeakCAPITALS,option_capitals,0);

+ 6
- 2
src/synth_mbrola.cpp View File

@@ -487,7 +487,7 @@ int MbrolaSynth(char *p_mbrola)
void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola)
{//======================================================================
// Generate a mbrola pho file
int name;
unsigned int name;
int phix;
int len;
int len1;
@@ -534,6 +534,9 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola)
{
MbrolaEmbedded(embedded_ix, p->sourceix);
}
if(p->newword & 4)
MbrolaMarker(espeakEVENT_SENTENCE, (p->sourceix & 0x7ff) + clause_start_char, 0, count_sentences);

if(p->newword & 1)
MbrolaMarker(espeakEVENT_WORD, (p->sourceix & 0x7ff) + clause_start_char, p->sourceix >> 11, clause_start_word + word_count++);
#endif
@@ -545,8 +548,9 @@ void MbrolaTranslate(PHONEME_LIST *plist, int n_phonemes, FILE *f_mbrola)
if(name == 0)
continue; // ignore this phoneme

if(ph->type == phPAUSE)
if((ph->type == phPAUSE) && (name == ph->mnemonic))
{
// a pause phoneme, which has not been changed by the translation
name = '_';
len = (p->length * speed_factor1)/256;
// if(len == 0) continue;

+ 6
- 6
src/synthdata.cpp View File

@@ -35,7 +35,7 @@
#include "translate.h"
#include "wave.h"

const char *version_string = "1.29.04 11.Sep.07";
const char *version_string = "1.29.06 11.Sep.07";
const int version_phdata = 0x012901;

int option_device_number = -1;
@@ -223,16 +223,16 @@ static unsigned int LookupSound2(int index, unsigned int other_phcode, int contr
}
break;
case 1:
if(control==0)
if(control==0)
{
seq_len_adjust = value2 >> 8;
seq_len_adjust = value2 >> 8;
}
break;
case 2:
if(control==0)
if(control==0)
{
seq_len_adjust = value2 >> 8;
seq_len_adjust = -seq_len_adjust;
seq_len_adjust = value2 >> 8;
seq_len_adjust = -seq_len_adjust;
}
break;
case 3:

+ 1
- 1
src/translate.cpp View File

@@ -1909,7 +1909,7 @@ if((c == '/') && (langopts.testing & 2) && isdigit(next_in) && IsAlpha(prev_out)
else
if(IsAlpha(c))
{
if(!IsAlpha(prev_out) || (langopts.ideographs && (c >= 0x3000)))
if(!IsAlpha(prev_out) || (langopts.ideographs && ((c >= 0x3000) || (prev_out >= 0x3000))))
{
if(prev_out != '\'')
letter_count = 0; // don't reset count for an apostrophy within a word

+ 0
- 1
src/voices.cpp View File

@@ -498,7 +498,6 @@ voice_t *LoadVoice(const char *vname, int control)
static char voice_name[40]; // voice name for voice_selected
static char voice_languages[100]; // list of languages and priorities for voice_selected


strcpy(voicename,vname);
if(voicename[0]==0)
strcpy(voicename,"default");

Loading…
Cancel
Save