Browse Source

[1.41.13]

Fixes for ordinal numbers (lang=hu).
Change phoneme names in Indian languages , [t.h] and [d.h] to [th.] [dh.]


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@226 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 15 years ago
parent
commit
749c336768

+ 2
- 2
dictsource/de_rules View File

@@ -742,7 +742,6 @@
_) ne (g ne:
neglig ne:gli:Z
neglige ne:gli:Z
&in) nen (_S3 @n
&) ness _^_EN
news _^_EN
nieder ni:d3
@@ -1050,7 +1049,8 @@
_) voll (z f%Ol
_) vorder fO*d@*
-) vorha (nd fo:*h'a
_) vor (ne 'fO*
_) vor (ne 'fo:*
_) vor (n fO*

_) vor (@P3 'fo:*
_) voraus (@P6 fo:*'aUs

+ 28
- 27
dictsource/dict_phonemes View File

@@ -78,9 +78,10 @@ o o- ong ou u u@ ua uai
uei uo y y& y@ yE yi yu

; C f h j k kh l
L m n N p ph r R
s s. S; t th ts ts. ts.
tS; tS; tsh v w x X z.
L m n N p ph q r
R s s. S; t th ts ts.
ts. tS; tS; tsh v w x X
z.


Dictionary ca_dict
@@ -472,11 +473,11 @@ l- o O o: O: O~ o~ r-
U u: u~ V

- : b bh c ch d d.
d.h dh f g gh h H j
dh dh. f g gh h H j
J Jh k kh l l. m n
N n. n^ p ph Q q r
r. s S s. t T t. t.h
th v w x z
r. s S s. t T t. th
th. v w x z


Dictionary ta_dict
@@ -499,10 +500,10 @@ O~ o~ r- U u u: u:~ u~
V

* b B bh c C ch d
d. d.h dh g gh h j J
d. dh dh. g gh h j J
Jh k kh l m n N n.
n^ p ph Q r r. s S
s. t t. t.h th tS x z
s. t t. th th. tS x z


Dictionary eu_dict
@@ -523,11 +524,11 @@ a a: aI aU e E e: i
I i: o o: r- u u: V
y

: b bh c ch d d. d.h
dh dZ f g gh h j J
: b bh c ch d d. dh
dh. dZ f g gh h j J
Jh k kh l l. m n N
n. n^ p ph R R2 s S
s. S; t t. t.h th tS v
s. S; t t. th th. tS v
w z


@@ -537,11 +538,11 @@ a a: aI aU e E e: i
I i: o o: r- u u: V
y

: b bh c ch d d. d.h
dh dZ f g gh h j J
: b bh c ch d d. dh
dh. dZ f g gh h j J
Jh k kh l l. m n N
n. n^ p ph R R2 s s.
S; t t. t.h th tS v w
S; t t. th th. tS v w
z z.


@@ -563,11 +564,11 @@ o~ r- u uI u~ V VI VU
V~

- : b bh c ch d d.
d.h dh f g gh h H j
J Jh k kh l l. m n
N n. n^ p ph Q q r
r. s S s. t T t. t.h
th v w x z z.
dh f g gh h H j J
Jh k kh l l. m n N
n. n^ p ph Q q r r.
s S s. t T t. th v
w x z z.


Dictionary pap_dict
@@ -593,12 +594,12 @@ t tS v w x z

Dictionary pa_dict

a a~ e E e~ E~ i I
i: i~ I~ o O o: O~ o~
r- U u u~ U~ V V~
@ a a~ e E e~ E~ i
I i: i~ I~ o O o: O~
o~ r- U u u~ U~ V V~

: b bh c ch d d. d.h
dh f g gh H j J Jh
k kh l l. m n N n.
n^ p ph Q R s S t
t. t.h th v x z
: ; b bh c ch d d.
dh dh. f g gh H j J
Jh k kh l l. m n N
n. n^ p ph Q R s S
t t. th th. v x z

+ 13
- 13
dictsource/hi_list View File

@@ -10,7 +10,7 @@ _4 c'a:r:
_5 p'a:nc
_6 ch'@2
_7 s'a:t
_8 'a:t.h
_8 'a:th.
_9 n'O:
?3 _9 n'aU

@@ -22,7 +22,7 @@ _14 ch'O:d@2
_15 p'Vndr@2
_16 s'o:l@2
_17 s'Vt:r@2
_18 Vt.h:'a:r@2
_18 Vth.:'a:r@2
_19 Unn'Is

_20 b'i:s
@@ -69,15 +69,15 @@ _57 sVt:'a:w@n
_58 ath:'a:w@n
_59 Uns'Vth

_60 s'a:t.h
_61 'Iks@t.h
_62 b'a:s@t.h
_63 t'Irs@t.h
_64 c'O~s@t.h
_65 paIns@t.h
_66 ch'Ija:s@t.h
_67 s'Vrs@t.h
_68 ars@t.h
_60 s'a:th.
_61 'Iks@th.
_62 b'a:s@th.
_63 t'Irs@th.
_64 c'O~s@th.
_65 paIns@th.
_66 ch'Ija:s@th.
_67 s'Vrs@th.
_68 ars@th.
_69 Un@h,at:'Vr:

_70 sat:'Vr:
@@ -137,10 +137,10 @@ _dpt _d@s@ml'o:_ // ?? what is Hi for "." ?
झ Jh@
ञ n^@
ट t.@
ठ t.h@
ठ th.@
ड d.@
ड़ r.@
ढ d.h@
ढ dh.@
ण n.@ // retroflex n.@
त t@
थ th@

+ 6
- 6
dictsource/hi_rules View File

@@ -238,9 +238,9 @@
?1 ट (_ t.

.group ठ
ठ t.hV
ठ (B t.h
?1 ठ (_ t.h
ठ th.V
ठ (B th.
?1 ठ (_ th.

.group ड
ड d.V
@@ -252,9 +252,9 @@
?1 ड़ (_ r.

.group ढ
ढ d.hV
ढ (B d.h
?1 ढ (_ d.h
ढ dh.V
ढ (B dh.
?1 ढ (_ dh.
ढ़ r.hV // nukta (should retroflex flap)
ढ़ (B r.h // nukta
?1 ढ़ (_ r.h // nukta

+ 3
- 1
dictsource/hu_rules View File

@@ -55,7 +55,7 @@ hierar) ch (i C
nyol) c (sz ts
har) c (sz ts
lán) c (sz ts
pá) c ts
pá) c (só ts
per) c (sz ts
pol) c (so ts
por) c (sé ts
@@ -335,6 +335,8 @@ tsd tSd
tsé tSe:
t (cs t
ttsé tS:e:
tsu tSu
j) ts tS
C) tj c
A) tj (A c:
C) tyj c

+ 2
- 2
dictsource/ta_list View File

@@ -77,8 +77,8 @@ _! a:ctS:Vr,ijVkk,URi
U+bf9 ru:ba:j

// abbreviations
ரூ ru:ba:j $dot
Rs ru:pi:z $dot
ரூ ru:ba:j $dot $only
Rs ru:pi:z $dot $only

// numbers
_0 suz.ijVm // சுழியம்

+ 70
- 64
phsource/compile_report View File

@@ -1,66 +1,66 @@
61 phoneme tables
new total
base 103 103
base2 26 124
en 50 149
en_n 32 149
en_us 37 150
en_sc 39 151
en_rp 34 149
en_wm 31 149
en_wi 30 149
af 39 135
cy 29 129
de 33 130
eo 13 115
jbo 4 116
fi 40 134
fr 55 141
fr_ca 11 141
hi 62 151
ta 20 154
hu 23 119
lv 29 126
nl 28 126
pl 20 117
sk 28 135
cs 6 135
hr 26 140
mk 3 141
sr 14 140
ru 39 134
it 17 127
la 21 121
base 104 104
base2 26 125
en 50 150
en_n 32 150
en_us 37 151
en_sc 39 152
en_rp 34 150
en_wm 31 150
en_wi 30 150
af 39 136
cy 29 130
de 33 131
eo 13 116
jbo 4 117
fi 40 135
fr 55 142
fr_ca 11 142
hi 62 152
ta 20 155
hu 23 120
lv 29 127
nl 28 127
pl 20 118
sk 28 136
cs 6 136
hr 26 141
mk 3 142
sr 14 141
ru 39 135
it 17 128
la 21 122
es 9 125
es_la 1 125
ca 11 127
pt 28 140
pt_pt 20 140
ro 36 146
el 8 124
grc 12 128
sv 25 125
no 28 129
is 33 129
vi 41 140
zhy 41 137
zh 66 154
sw 14 112
tr 18 127
ku 18 128
id 15 126
sq 35 127
hy 24 119
da 21 118
rw 15 131
ml 13 153
kn 15 153
bn 59 157
ne 18 159
mr 12 151
eu 6 125
mn 15 114
pa 12 152
pt 28 141
pt_pt 20 141
ro 36 147
el 8 125
grc 12 129
sv 25 126
no 28 130
is 33 130
vi 41 141
zhy 41 138
zh 66 155
sw 14 113
tr 18 128
ku 18 129
id 15 127
sq 35 128
hy 24 120
da 21 119
rw 15 132
ml 13 154
kn 15 154
bn 59 159
ne 18 160
mr 12 152
eu 6 126
mn 15 115
pa 13 153

Data file Used by
b/b [b] base
@@ -175,7 +175,7 @@ d/xd [d] base
[d] hi
[d.] hi
[dh] hi
[d.h] hi
[dh.] hi
[d] hu
[d] pl
[dz] pl
@@ -938,8 +938,8 @@ ustop/q [q] base
ustop/q_u [q] base
ustop/t [t] base
[t2] en
[d.h] hi
[t.h] hi
[dh.] hi
[th.] hi
[t] zhy
[t.h] bn
ustop/t_ [t] base
@@ -1392,6 +1392,7 @@ voc/v [v] base
[v] is
[v] da
[v] bn
[v] pa
voc/v_ [B] base
[v] base
[v] fi
@@ -1403,11 +1404,15 @@ voc/v_ [B] base
[v] is
[v] da
[v] bn
voc/v# [v] hi
voc/v#_ [v] hi
[v] pa
voc/v# [v#] base
[v] hi
voc/v#_ [v#] base
[v] hi
voc/v2 [v#] es
voc/vj [v] base
[v] fr
[v] pa
vocw/dh [D] base
[D] es
vocw/Q [Q] base
@@ -1422,6 +1427,7 @@ vocw/v [B] base
[v] ta
[v#] es
[v;] ro
[v] pa
vocw/zh [Z] base
[Z;] ro
vocw/zh_rfx [z.] base
@@ -2429,7 +2435,7 @@ x/d [d] base
[t#] en_us
[d] fr
[d.] hi
[d.h] hi
[dh.] hi
[d] hr
[d] el
[d] is

+ 4
- 4
phsource/ph_hindi View File

@@ -437,14 +437,14 @@ phoneme t.
switchvoicing d.
endphoneme

phoneme t.h
phoneme th.
vls rfx stop
vowelin f1=0 f2=1800 -300 300 f3=-400 80
vowelout f1=0 f2=1800 -300 250 f3=-400 80 rms=20 colr=2
lengthmod 2
wave ustop/t
// wave ustop/th_rfx
switchvoicing d.h
switchvoicing dh.
endphoneme

phoneme d.
@@ -460,7 +460,7 @@ phoneme d.
switchvoicing t.
endphoneme

phoneme d.h
phoneme dh.
vcd rfx stop
vowelin f1=1 f2=1800 -300 300 f3=-400 80
vowelout f1=1 f2=1800 -300 300 f3=-400 80 colr=2
@@ -468,7 +468,7 @@ phoneme d.h
// formants d/xd+x/d+ustop/th_rfx
after @ d/xd
lengthmod 5
switchvoicing t.h
switchvoicing th.
endphoneme



+ 11
- 0
phsource/phonemes View File

@@ -807,6 +807,17 @@ phoneme v
endphoneme


phoneme v# // approximant, not fricative
vcd lbd frc
vowelin f1=1 f2=900 -300 -300 f3=-100 100
vowelout f1=1 f2=900 -500 -300 f3=-100 60 len=50
lengthmod 6
formants voc/v#
before _ voc/v#_
switchvoicing f
endphoneme


phoneme D
vcd dnt frc
vowelout f1=0 f2=1700 -300 300 f3=-100 60 len=50

+ 12
- 10
src/numbers.cpp View File

@@ -761,7 +761,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out)
int value;
int subtract;
int repeat = 0;
int wflags = 0;
WORD_TAB wtab[2];
unsigned int flags;
char ph_roman[30];
char number_chars[N_WORD_BYTES];
@@ -772,6 +772,7 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out)
acc = 0;
prev = 0;
subtract = 0x7fff;
memset(wtab, 0, sizeof(wtab));

while((c = *word++) != ' ')
{
@@ -826,8 +827,8 @@ int TranslateRoman(Translator *tr, char *word, char *ph_out)
sprintf(number_chars," %d ",acc);

if(tr->langopts.numbers & NUM_ROMAN_ORDINAL)
wflags |= FLAG_ORDINAL;
TranslateNumber(tr, &number_chars[1], p, &flags, wflags);
wtab[0].flags |= FLAG_ORDINAL;
TranslateNumber(tr, &number_chars[1], p, &flags, wtab);

if(tr->langopts.numbers & NUM_ROMAN_AFTER)
strcat(ph_out,ph_roman);
@@ -1282,8 +1283,8 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, int suppress_null
} // end of LookupNum3


static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned int *flags, int wflags)
{//====================================================================================================
static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned int *flags, WORD_TAB *wtab)
{//========================================================================================================
// Number translation with various options
// the "word" may be up to 4 digits
// "words" of 3 digits may be preceded by another number "word" for thousands or millions
@@ -1324,9 +1325,10 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
value = this_value = atoi(word);

ph_ordinal2[0] = 0;
if((tr->langopts.numbers & NUM_ORDINAL_DOT) && (word[ix] == '.') && !isdigit(word[ix+2]))
if((tr->langopts.numbers & NUM_ORDINAL_DOT) && (word[ix] == '.') && IsAlpha(word[ix+2]) && !(wtab[1].flags & FLAG_FIRST_UPPER))
{
// ordinal number is indicated by dot after the number
// but not if the next word starts with an upper-case letter
ordinal = 2;
word[ix] = ' ';

@@ -1371,7 +1373,7 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned
}
}

if(wflags & FLAG_ORDINAL)
if(wtab[0].flags & FLAG_ORDINAL)
ordinal = 2;

ph_append[0] = 0;
@@ -1586,13 +1588,13 @@ static int TranslateNumber_1(Translator *tr, char *word, char *ph_out, unsigned



int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, int wflags)
{//============================================================================================
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, WORD_TAB *wtab)
{//================================================================================================
if(option_sayas == SAYAS_DIGITS1)
return(0); // speak digits individually

if(tr->langopts.numbers != 0)
return(TranslateNumber_1(tr, word1, ph_out, flags, wflags));
return(TranslateNumber_1(tr, word1, ph_out, flags, wtab));

return(0);
} // end of TranslateNumber

+ 1
- 1
src/synthdata.cpp View File

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

const char *version_string = "1.41.11 09.Oct.09";
const char *version_string = "1.41.13 10.Oct.09";
const int version_phdata = 0x014100;

int option_device_number = -1;

+ 0
- 1
src/tr_languages.cpp View File

@@ -527,7 +527,6 @@ Translator *SelectTranslator(const char *name)

if(name2 == L('p','a'))
{
tr->langopts.numbers = 0; // no number rules yet
tr->letter_bits_offset = OFFSET_GURMUKHI;
}
SetIndicLetters(tr);

+ 14
- 8
src/translate.cpp View File

@@ -715,7 +715,7 @@ if((wmark > 0) && (wmark < 8))
if(word_phonemes[0] == phonSWITCH)
return(0);

found = TranslateNumber(tr,word1,phonemes,dictionary_flags,wflags);
found = TranslateNumber(tr,word1,phonemes,dictionary_flags,wtab);
}

if(!found & ((wflags & FLAG_UPPERS) != FLAG_FIRST_UPPER))
@@ -1962,6 +1962,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
int prev_out2;
int prev_in2=0;
int next_in;
int next_in_nbytes;
int char_inserted=0;
int clause_pause;
int pre_pause_add=0;
@@ -2130,7 +2131,7 @@ void *TranslateClause(Translator *tr, FILE *f_text, const void *vp_input, int *t
source_index += utf8_in(&cc,&source[source_index]); // cc = source[source_index++];
c = cc;
}
utf8_in(&next_in,&source[source_index]);
next_in_nbytes = utf8_in(&next_in,&source[source_index]);

if((c == CTRL_EMBEDDED) || (c == ctrl_embedded))
{
@@ -2333,13 +2334,18 @@ if((c == '/') && (tr->langopts.testing & 2) && IsDigit09(next_in) && IsAlpha(pre
prev_in2 = c;
}
else
if((c != ' ') && iswupper(prev_in) && iswlower(next_in) &&
(memcmp(&source[source_index],"s ",2) != 0)) // ENGLISH specific plural
if((c != ' ') && iswupper(prev_in) && iswlower(next_in))
{
c = ' '; // change from upper to lower case, start new word at the last uppercase
space_inserted = 1;
prev_in2 = c;
next_word_flags |= FLAG_NOSPACE;
int next2_in;
utf8_in(&next2_in,&source[source_index + next_in_nbytes]);
if(IsAlpha(next2_in))
{
// changing from upper to lower case, start new word at the last uppercase, if 3 or more letters
c = ' ';
space_inserted = 1;
prev_in2 = c;
next_word_flags |= FLAG_NOSPACE;
}
}
}
}

+ 1
- 1
src/translate.h View File

@@ -569,7 +569,7 @@ int SetTranslator2(const char *name);
void DeleteTranslator(Translator *tr);
int Lookup(Translator *tr, const char *word, char *ph_out);

int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, int wflags);
int TranslateNumber(Translator *tr, char *word1, char *ph_out, unsigned int *flags, WORD_TAB *wtab);
int TranslateRoman(Translator *tr, char *word, char *ph_out);

void ChangeWordStress(Translator *tr, char *word, int new_stress);

Loading…
Cancel
Save