Browse Source

Fix voice attribute suffix ignored in voice name.

lang=cs   fix number not spoken after preposition with $alt1 attribute
lang=cs   Don't allow any thousands separator.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@12 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 18 years ago
parent
commit
6d5a152841

+ 1
- 1
dictsource/cs_list View File

@@ -350,7 +350,7 @@ uvf $abbrev
vga $abbrev
wgpo $abbrev
wri $abbrev
www veveve:
www ve:ve:ve:


// Exceptions

+ 1
- 0
dictsource/en_list View File

@@ -1957,6 +1957,7 @@ Antarctica $2
Antigua ant'i:g@
Antilles ant'Ili:z
Apennine ap@naIn
Armageddon A@ma2g'Ed@n
Arkansas A@k@nsO:
Athens aTInz
Bahrain $2

+ 3
- 3
dictsource/hr_list View File

@@ -26,7 +26,7 @@ _s s@
š S@
t t@
v v@
w dv'ost@-*UkovE
w dv'ost@-*Uko||v@
x iks
y ipsilon
z z@
@@ -76,7 +76,7 @@ _] z'atvo*,En&||'ugl&t&
__ ts'r-t&
_` g@-*'avIs
_{ 'otvo*,En&||v'itItS,&st&
_| okom,It&
_| okom,Its&
_} z'atvo*,En&||v'itItS,&st&


@@ -148,7 +148,7 @@ s s_ $brk
// Conjunctions
a $u $pause // and
i $u $pause // and
but $pause // but
ali $pause // but
nego $pause // but
ili $u $pause // or


+ 5
- 0
dictsource/hr_rules View File

@@ -29,6 +29,7 @@
e E
j) e e
e (j e
ej (K eI

.group f
f f
@@ -42,6 +43,7 @@

.group i
i i
ij (K iI

.group j
j j
@@ -67,6 +69,8 @@
.group o
o o
ou oU
oj (K oI
o (r 8

.group p
p p
@@ -96,6 +100,7 @@

.group u
u u
uj (K wi

.group v
v v

+ 6
- 5
dictsource/no_list View File

@@ -63,11 +63,11 @@ _7X s'yt:i:
_8X 'Ot:i:
_9X n'It:i:
_0C h'u-:nd@-*e:d@2
_1C 'Et||h'u-:nd@-*e:d@2
_0M1 t'u-:s@n
_1M2 m'Illi:;,u:n
_0M1 'Et||t'u-:s@n
_0M2 m'Illi:;,u:n@r


_1M2 'e:n||m'Illi:;,u:n

_0and u:g
_dpt kOmmA
@@ -79,7 +79,7 @@ _dpt kOmmA

// articles
en $u
et $u
et Et $u
ei $u


@@ -178,7 +178,7 @@ ikke $u
// auxillary verbs (be, have, can, etc)

være $u+
er $u
er E:r $u
var $u
vært $u

@@ -218,3 +218,4 @@ i i: $atend

// MAIN WORD DICTIONARY
//*********************


+ 11
- 10
phsource/compile_report View File

@@ -20,7 +20,7 @@
pl 17 103
sk 25 120
cs 5 120
hr 19 127
hr 23 129
ru 36 120
it 28 112
es 6 112
@@ -45,16 +45,16 @@
2 b/bo base hi
2 b/bu base hi
2 b/xb base hi
14 d/d base fi fr hi hu pl ru it ro el sw
15 d/d_ base fi fr hi hu pl ru it ro el sw
15 d/d base fi fr hi hu pl hr ru it ro el sw
16 d/d_ base fi fr hi hu pl hr ru it ro el sw
1 d/d_dnt hi
16 d/dr base fi fr hi hu pl ru it ro el sw
17 d/dr base fi fr hi hu pl hr ru it ro el sw
1 d/tap ro
2 d/tap1 base
2 d/tap2 base
2 d/tap3 base
1 d/tap_i ro
12 d/xd base fi fr hi hu pl ru it ro el sw
13 d/xd base fi fr hi hu pl hr ru it ro el sw
1 d/xd_dnt hi
2 d/xd_pzd pl ru
1 d/x_tap base
@@ -245,7 +245,7 @@
2 ustop/p_ base hi
1 ustop/percus10 base
8 ustop/pl base fi hi hu hr it ro
9 ustop/pr base fi hi hu hr it ro
8 ustop/pr base fi hi hu it ro
7 ustop/p_unasp base fi hi hu hr it ro
6 ustop/p_unasp_ fi hi hu hr it ro
2 ustop/t base hi
@@ -319,6 +319,7 @@
2 vdiph/eeu_3 en_n en_wm
1 vdiph/eey fi
6 vdiph/ei nl it pt is vi zh_yue
1 vdiph/ei_2 hr
8 vdiph/eu en cy eo nl sk it pt vi
1 vdiph/eu_2 fi
2 vdiph/&i fi hi
@@ -327,13 +328,13 @@
3 vdiph/@i_3 en_wm ro zh_yue
1 vdiph/&i_3 vi
1 vdiph/@i_4 vi
1 vdiph/ii ro
2 vdiph/ii hr ro
1 vdiph/i#i ro
4 vdiph/oi en_wm de it vi
1 vdiph/oi_2 af
10 vdiph/ooi en en_n en_us en_rp cy eo fi no zh_yue
1 vdiph/ooi_2 af
1 vdiph/ooi_3 en_wm
2 vdiph/ooi_3 en_wm hr
2 vdiph/ou fi zh_yue
2 vdiph/ou_2 sk ro
1 vdiph/ou_3 is
@@ -602,8 +603,8 @@
5 w/xw base
20 x/b base hi ro is
2 x/b_ base is
7 x/d base hi el is
14 x/d_ base fi fr hi hu pl ru it ro el is sw
9 x/d base hi hr el is
15 x/d_ base fi fr hi hu pl hr ru it ro el is ++
22 x/d_dnt base fi fr hi hu pl ru it ro sw
6 x/d_pzd pl ru
3 x/dzh base hi

BIN
phsource/j/j_ View File


+ 46
- 9
phsource/ph_croatian View File

@@ -32,13 +32,6 @@ phoneme &
endphoneme


phoneme aI
vowel starttype (a) endtype (i)
length 250
formants vdiph/ai
endphoneme


phoneme E
vowel starttype (e) endtype (e)
length 140
@@ -97,6 +90,36 @@ phoneme U
endphoneme


phoneme aI
vowel starttype (a) endtype (i)
length 230
formants vdiph/ai
endphoneme


phoneme eI
vowel starttype (e) endtype (i)
length 220
formants vdiph/ei_2
linkout ;
endphoneme


phoneme iI
vowel starttype (i) endtype (i)
length 250
formants vdiph/ii
linkout ;
endphoneme


phoneme oI
vowel starttype (o) endtype (i)
length 220
formants vdiph/ooi_3
linkout ;
endphoneme



phoneme p
@@ -104,9 +127,8 @@ phoneme p
vowelin f1=0 f2=1000 -50 -100 f3=-200 80
vowelout f1=0 f2=1000 -500 -350 f3=-300 80 rms=30
lengthmod 2
wave ustop/p_unasp
wave ustop/p_unasp%120
before _ ustop/p_unasp_%80
before r ustop/pr
before l ustop/pl
switchvoicing b
endphoneme
@@ -123,6 +145,21 @@ phoneme t // dental variant of /t/
endphoneme


phoneme d
vcd alv stop
vowelin f1=2 f2=1700 -300 300 f3=-100 80 rms=45
vowelout f1=2 f2=1700 -300 300 f3=-100 80
formants d/d+x/d%50
before _ d/d_+x/d_
before r d/dr+x/d
after _ NULL
after @ d/xd
lengthmod 5
switchvoicing t
endphoneme



phoneme x
vls vel frc
vowelin f1=0 f2=2300 200 400 f3=-100 80

BIN
phsource/ustop/p_unasp.wav View File


BIN
phsource/vdiph/ooi_3 View File


BIN
phsource/vowel/i_6 View File


+ 1
- 1
src/compiledata.cpp View File

@@ -1954,7 +1954,7 @@ memset(markers_used,0,sizeof(markers_used));
if((f_errors = fopen_log(f_errors,fname,"w")) == NULL)
f_errors = stderr;

sprintf(fname,"%s/%s",path_home,"phondata_manifest");
sprintf(fname,"%s/%s",path_home,"phondata-manifest");
if((f_phcontents = fopen_log(f_phcontents,fname,"w")) == NULL)
f_phcontents = stderr;


+ 4
- 1
src/spectseq.cpp View File

@@ -967,7 +967,10 @@ void SpectSeq::MakeWave(int start, int end, PitchEnvelope &pitch)
fname_speech = WavFileName();
OpenWaveFile2(fname_speech);

first=1;
first = 0;
if(start > 0)
first=1; // a selection, use fade-in

sp2 = NULL;
for(ix=start; ix<=end; ix++)
{

+ 6
- 1
src/tr_languages.cpp View File

@@ -479,10 +479,15 @@ Translator *SelectTranslator(const char *name)
tr->langopts.spelling_stress = 1;
tr->langopts.param[LOPT_COMBINE_WORDS] = 4; // combine some prepositions with the following word

tr->langopts.numbers = 0x1c0d + 0x84000;
// tr->langopts.numbers = 0x1c0d + 0x84000;
tr->langopts.numbers = 0x1c01 + 0x84000;
tr->langopts.thousands_sep = 0; //no thousands separator
tr->langopts.decimal_sep = ',';

if(name2 == L('c','s'))
{
tr->langopts.numbers2 = 0x8; // variant numbers before milliards
}

SetLetterVowel(tr,'y');
SetLetterVowel(tr,'r');

+ 11
- 4
src/translate.cpp View File

@@ -1035,7 +1035,7 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
int first_phoneme = 1;
int source_ix;
int len;
int limit;
int sylimit; // max. number of syllables in a word to be combined with a preceding preposition
char *new_language;
unsigned char bad_phoneme[4];

@@ -1112,11 +1112,12 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
{
flags = translator->TranslateWord(word, next_pause, wtab);

if((flags & FLAG_ALT2_TRANS) && ((limit = langopts.param[LOPT_COMBINE_WORDS]) > 0))
if((flags & FLAG_ALT2_TRANS) && ((sylimit = langopts.param[LOPT_COMBINE_WORDS]) > 0))
{
char *p2;
int ok = 1;
int flags2;
int c_word2;
char ph_buf[N_WORD_PHONEMES];

// LANG=cs,sk
@@ -1124,7 +1125,13 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
p2 = word;
while(*p2 != ' ') p2++;

if(limit & 0x100)
utf8_in(&c_word2, p2+1, 0); // first character of the next word;
if(!iswalpha(c_word2))
{
ok =0;
}

if(sylimit & 0x100)
{
// only if the second word has $alt attribute
strcpy(ph_buf,word_phonemes);
@@ -1140,7 +1147,7 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne
{
*p2 = '-'; // replace next space by hyphen
flags = translator->TranslateWord(word, next_pause, wtab); // translate the combined word
if(CountSyllables(p) > (limit & 0xf))
if(CountSyllables(p) > (sylimit & 0xf))
{
// revert to separate words
*p2 = ' ';

+ 10
- 1
src/voices.cpp View File

@@ -1329,6 +1329,7 @@ espeak_ERROR SetVoiceByName(const char *name)
espeak_VOICE *v;
int variant=0;
char *p;
char variant_name[20];
static char buf[60];

strncpy0(buf,name,sizeof(buf));
@@ -1339,10 +1340,18 @@ espeak_ERROR SetVoiceByName(const char *name)
variant = atoi(p+1);
}

// first check for a voice with this filename
// first check for a voice with this filename
if(LoadVoice(buf,1) != NULL)
{
voice_selected = first_voice;

if(variant > 0)
{
// apply a voice variant
sprintf(variant_name,"!variant%d",variant);
LoadVoice(variant_name,2);
}

WavegenSetVoice(voice);
return(EE_OK);
}

Loading…
Cancel
Save