Browse Source

[1.24.10] lang=hr change [x] phoneme, adjust vowel lengths and stress_lengths


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

+ 2
- 0
dictsource/eo_list View File

@@ -37,6 +37,7 @@ t.e t'e,e

// Abbreviations
a.k ,antaUk@-*'isto
a.k. ,antaUk@-*'isto
akk alinome
anst anstataU
bea $abbrev
@@ -48,6 +49,7 @@ n.b n'otu||b'one
nro numeRo
pĝ paZo
p.k p,ostk@-*'isto
p.k. p,ostk@-*'isto
uea $abbrev
uk $abbrev


+ 2
- 2
dictsource/eo_rules View File

@@ -123,9 +123,9 @@
_) r(_ Ro
r R
A) r (A R
C) r (A @-*
K) r (A @-*

-) ro (_ R%o
-) ro (_ R%o d-ro, n-ro
.group s
_) s(_ so

+ 14
- 11
dictsource/es_list View File

@@ -1,16 +1,6 @@

// This file in UTF8 encoded

// Letters
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.
_a a
_o o
_y ,igr'iEQa

_. punto


// numbers
_0 TE*o
@@ -27,7 +17,7 @@ _1X dj'ET
_11 'onTe
_12 d'oTe
_13 t@-*'ETe
_14 kat'orTe
_14 kat'oRTe
_15 k'inTe
_20 v'eInte
_2X v'eInt
@@ -281,6 +271,19 @@ algunos $u
alguna $u


// Letters
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.
_a a
a a $atend
_o o
o o $atend
_y ,ig@-*'iEQa
y ,ig@-*'iEQa $atend

_. punto



// pronunciation exceptions

+ 1
- 1
dictsource/es_rules View File

@@ -124,7 +124,7 @@

.group r
_) r (_ E*e
r r
r R
_) r R
A) r (A *
C) r (A @-*

+ 3
- 2
dictsource/hr_rules View File

@@ -76,10 +76,11 @@
qu kv

.group r
r r
r R
A) r (A *
K) r (A @-*
rr *r
rr R
r (_ R

K) r (K r-


+ 36
- 32
dictsource/it_list View File

@@ -2,49 +2,42 @@

// Italian: any [E] or [O] phonemes in unstressed words must be listed explicitly

// Letters
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.
_e e:
_i i:
_o O:

// character names
_cap k'apital
_?? s'imbolo

_! p'Untoesklamat'ivo
_" virgolet:e
_" viRgolet:e
_# kantSellet:o
_$ dolla:ro
_% pertS'ento
_$ dolla:Ro
_% peRtS'ento
_& _!e:
_' ap'Ostrofo
_( ap'ertapar'entezi
_) kj,Uzapar'entezi
_* asterisko
_' ap'OstRofo
_( ap'eRtapaR'entezi
_) kj,UzapaR'entezi
_* asteRisko
_+ pjU
_, v'irgola
_- trat:ino
_, v'iRgola
_- t@-*at:ino
_. pUnto
_/ slaS
_: d,Uep'Unte
_; p'Untoev'irgola
_< ap'erta'angolo
_; p'Untoev'iRgola
_< ap'eRta'angolo
_= Ugwale
_> kj,Uza'angolo
_? p'UntointeRogat'ivo
_@ ki'otS:ola
_[ ap'ertakw'adra
_[ ap'eRtakw'ad@-*a
_\ bakslaS
_] kj,Uzakw'adra
_] kj,Uzakw'ad@-*a
_^ kap:UtS:o
__ 'Underskore
_` bakpraIm
_{ ap'ertagr'af:a
__ 'UndeRskoRe
_` bakp@-*aIm
_{ ap'eRtag@-*'af:a
_| b'aRa
_} kj,Uzagr'af:a
_} kj,Uzag@-*'af:a
_~ tilde


@@ -63,16 +56,16 @@ _9 n'Ove
_10 di'etSi
_11 'unditSi
_12 d'oditSi
_13 tr'editSi
_14 kwat:'OrditSi
_13 t@-*'editSi
_14 kwat:'ORditSi
_15 kw'imditSi
_16 s'editSi
_17 ditSas:'Et:e
_18 ditS'Ot:o
_19 ditSann'ove
_2X v'ente
_3X tr'enta
_4X kwar'anta
_3X t@-*'enta
_4X kwaR'anta
_5X tSinkw'anta
_6X sess'anta
_7X set:'anta
@@ -83,11 +76,11 @@ _0M1 m'ila
_1M1 m'ille
_0M2 mili'oni
_1M2 unmili'one
_0M3 mili'ardi
_1M3 unmili'ardo
_0M3 mili'aRdi
_1M3 unmili'aRdo
_0M4 bili'oni
_1M4 unbili'one
_dpt _v'irgola
_dpt _v'iRgola
_0Z2 tSent'ezimi // 100ths
_0Z3 mill'ezimi // 1000ths

@@ -351,6 +344,17 @@ facevamo $u+
facevate $u+
facevano $u+

// Letters
// If a letter has a "word" pronunciation which is different from its
// "letter" name, then include the letter name here, with the letter
// prefixed by a _ character.
_e e:
e e: $atend
_i i:
i i: $atend
_o O:
o O: $atend


// exceptions
aereo $2
@@ -365,5 +369,5 @@ celsius tsElsj'us
conoscerla $1
no nO
posta pOsta
tesser tess'Er
tesser tess'ER
uomini $1

+ 1
- 1
dictsource/it_rules View File

@@ -220,7 +220,7 @@
.group r
_) r(_ ER*e
C) r @-*
r r
r R
_) r R
rr R*
A) r (A R

+ 2
- 2
dictsource/no_list View File

@@ -35,11 +35,11 @@ z sEt
// numeric
//********
_0 n'Ul
_1 'E:n
_1 'e:n
_2 t'u:
_3 t@-*'e:
_4 f'i:*E
_5 f'E:m
_5 f'e:m
_6 s'Eks
_7 S'u-:
_8 'Ot:@2

+ 7
- 0
dictsource/no_rules View File

@@ -86,13 +86,16 @@

.group l
l l
ll (K l
lj j

.group m
m m
mm (K m

.group n
n n
nn (K n
ng N
n (k N

@@ -120,6 +123,7 @@

.group r
r r
rr R
K) r @-*
A) r (A *
r) r
@@ -128,6 +132,7 @@
.group s
s s
ss ss
ss (_ s
sch S
sj S
skj S
@@ -154,6 +159,7 @@

.group v
v v
vv (_ v

.group w
w v
@@ -169,6 +175,7 @@
.group z
z s
zz z
zz (_ z

.group å
å o:

+ 4
- 0
dictsource/pt_rules View File

@@ -595,6 +595,10 @@
€ 'eU*u
§ pa*'ag@-*,afu

D_) º %o // ordinal
D_) ª %a // ordinal


// don't speak multiple occurances of these symbols
, (D v'irgul&
. p'oNtu

+ 14
- 11
phsource/compile_report View File

@@ -10,7 +10,7 @@
af 37 123
cy 30 118
de 28 115
eo 15 104
eo 16 104
fi 40 123
fr 33 115
fr_ca 11 115
@@ -20,7 +20,7 @@
pl 17 103
sk 25 120
cs 5 120
hr 16 124
hr 19 127
ru 36 120
it 28 112
es 6 112
@@ -176,18 +176,18 @@
1 r2/r2i base
1 r2/r2o base
1 r2/r2u base
8 r3/r_ base af cy eo fr pl ru it
7 r3/r_ base af cy eo fr pl ru
1 r3/r_@ base
1 r3/r#_ is
1 r3/r_a base
1 r3/r_e base
1 r3/r_i base
7 r3/r_n base cy eo fr pl ru it
6 r3/r_n base cy eo fr pl ru
1 r3/r_o base
1 r3/r_trill base
1 r3/r_trill.wav base
3 r3/r_trill base eo it
3 r3/r_trill.wav base eo it
1 r3/r_u base
30 r3/rx base af cy eo fr fr_ca pl ru it pt_pt ro is
28 r3/rx base af cy eo fr fr_ca pl ru pt_pt ro is
2 r3/rz_cs sk
2 r3/@tap base
2 r3/@tap_i base
@@ -199,10 +199,10 @@
1 r/re base
1 r/ri base
1 r/ro base
30 r/rr base af cy de eo fi nl pl ru it ro no ++
29 r/rr base af cy de eo fi nl pl ru it ro no ++
1 r/ru base
15 r/tr base en_sc fr hu it
60 r/trr base af cy de eo fi nl pl ru it ro sv ++
57 r/trr base af cy de eo fi nl pl ru it ro sv ++
11 r/xr base
1 ufric/ch base
3 ufric/f base de ro
@@ -232,6 +232,7 @@
1 ufric/th_ base
2 ufric/x base vi
4 ufric/x2 af nl pt
1 ufric/x_hr hr
1 ufric/xx hr
1 ustop/c base
5 ustop/k base en fr hi sw
@@ -408,7 +409,7 @@
1 vowel/3_2 en_n
1 vowel/3_3 en_rp
3 vowel/3_en en en_wm af
1 vowel/@_4 nl
2 vowel/@_4 nl hr
2 vowel/8_2 en_us sv
1 vowel/8_3 zh_yue
10 vowel/a en_n cy de hu nl pl sk hr
@@ -447,10 +448,11 @@
17 vowel/i en_n en_rp en_wm cy eo fr hu pl it pt pt_pt ro ++
1 vowel/i# cy
3 vowel/i_2 de nl sv
3 vowel/i_3 af sk hr
2 vowel/i_3 af sk
4 vowel/i_4 fi hu it is
5 vowel/i_5 en_sc
3 vowel/i#_5 pt_pt ro
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 zh_yue
@@ -460,6 +462,7 @@
6 vowel/ii_en en en_n
5 vowel/@_low hi ro no
8 vowel/o en en_wm de hi it pt_pt sv
1 vowel/o- hr
4 vowel/o_2 cy hi hu no
2 vowel/o-_2 en_n en_wm
2 vowel/o_3 en_sc

+ 28
- 5
phsource/ph_croatian View File

@@ -10,10 +10,16 @@ phoneme @2 // Schwa (raised)
length 140
endphoneme

phoneme @3 // Schwa (raised)
vowel starttype (@) endtype (@)
formants vowel/@_4
length 140
endphoneme


phoneme a
vowel starttype (a) endtype (a)
length 150
length 160
formants vowel/a
reduceto & 4
endphoneme
@@ -50,7 +56,7 @@ endphoneme
phoneme i
vowel starttype (i) endtype (i)
length 120
formants vowel/i_3
formants vowel/i_6
linkout ;
reduceto I 4
endphoneme
@@ -70,17 +76,23 @@ phoneme o
formants vowel/oo_1
endphoneme

phoneme 8
vowel starttype (o) endtype (o)
length 140
formants vowel/o-
endphoneme


phoneme u
vowel starttype (u) endtype (u)
length 130
length 140
formants vowel/u_bck
reduceto U 4
endphoneme

phoneme U
vowel starttype (u) endtype (u)
length 130
length 140
formants vowel/uu_bck
endphoneme

@@ -117,7 +129,18 @@ phoneme x
vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
length 100
lengthmod 3
wave ufric/xx
wave ufric/x_hr%45
switchvoicing Q
endphoneme

phoneme x2 // TEST
vls vel frc
vowelin f1=0 f2=2300 200 400 f3=-100 80
vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20
length 100
lengthmod 3
wave ufric/xx%120
switchvoicing Q
endphoneme



+ 11
- 0
phsource/ph_esperanto View File

@@ -108,6 +108,17 @@ phoneme r/ // used for [r] when not preceding a vowel
after t r/trr p r/trr k r/trr
endphoneme

phoneme R
liquid
vowelin f1=0 f2=1700 -300 300 f3=-300 80
vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
beforenotvowel r/
formants r3/r_trill+r3/r_trill.wav%50
trill
lengthmod 6
endphoneme



phoneme ts
vls alv afr sibilant

+ 8
- 9
phsource/ph_italian View File

@@ -151,8 +151,6 @@ phoneme r
endphoneme




phoneme R2
liquid starttype r endtype r
length 100
@@ -166,17 +164,18 @@ phoneme R2
endphoneme


phoneme r/ // used for [r] when not preceding a vowel
phoneme R
liquid
length 100
lengthmod 2 //
formants r3/r_+r3/rx
before n r3/r_n+r3/rx
after _ r/rr
after t r/trr p r/trr k r/trr
vowelin f1=0 f2=1700 -300 300 f3=-300 80
vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk
beforenotvowel r/
formants r3/r_trill+r3/r_trill.wav%50
trill
lengthmod 6
endphoneme



phoneme w2
starttype w endtype w
liquid

+ 9
- 9
phsource/ph_norwegian View File

@@ -31,7 +31,7 @@ endphoneme

phoneme i:
vowel starttype (i) endtype (i)
length 210
length 220
formants vowel/i
after w w/wi2
linkout ;
@@ -45,7 +45,7 @@ endphoneme

phoneme y:
vowel starttype (u) endtype (u)
length 240
length 250
formants vowel/y_4
endphoneme

@@ -57,7 +57,7 @@ endphoneme

phoneme Y:
vowel starttype (@) endtype (@)
length 240
length 250
formants vwl_no/y#
endphoneme

@@ -71,7 +71,7 @@ endphoneme

phoneme E:
vowel starttype (e) endtype (e)
length 240
length 250
formants vowel/ee_1
endphoneme

@@ -90,7 +90,7 @@ endphoneme

phoneme a:
vowel starttype (a) endtype (a)
length 250
length 270
formants vwl_no/&
endphoneme

@@ -102,7 +102,7 @@ endphoneme

phoneme A:
vowel starttype (a) endtype (a)
length 250
length 280
formants vowel/aa
endphoneme

@@ -114,7 +114,7 @@ endphoneme

phoneme o:
vowel starttype (o) endtype (o)
length 240
length 250
formants vowel/o_2
endphoneme

@@ -126,7 +126,7 @@ endphoneme

phoneme u:
vowel starttype (u) endtype (u)
length 220
length 230
formants vowel/u_bck
endphoneme

@@ -139,7 +139,7 @@ endphoneme

phoneme u-:
vowel starttype (u) endtype (u)
length 240
length 250
formants vwl_no/u#2
endphoneme


+ 1
- 1
phsource/ph_swedish View File

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

phoneme A:
vowel starttype (a) endtype (a)
length 240
length 250
formants vowel/aa_4
endphoneme


BIN
phsource/vowel/i_6 View File


BIN
phsource/vowel/vowelchart.png View File


+ 1
- 1
src/compiledict.cpp View File

@@ -655,7 +655,7 @@ void copy_rule_string(char *string, int &state)
c = RULE_ALT1;
break;
case 'W':
c = 0x31;
c = RULE_SPELLING;
break;
case 'L':
// expect two digits

+ 1
- 1
src/numbers.cpp View File

@@ -71,7 +71,7 @@ int Translator::TranslateLetter(char *word, char *phonemes, int control)
len = utf8_out(letter,&single_letter[2]);
single_letter[2+len] = ' ';

next = 0x31;
next = RULE_SPELLING;
if(word[n_bytes] == ' ')
next = ' ';
single_letter[3+len] = next; // follow by space-space if the end of the word, or space-0x31

+ 1
- 1
src/synthdata.cpp View File

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

const char *version_string = "1.24.09 13.May.07";
const char *version_string = "1.24.10 14.May.07";
const int version_phdata = 0x012201;

int option_device_number = -1;

+ 41
- 23
src/tr_languages.cpp View File

@@ -265,6 +265,47 @@ Translator *SelectTranslator(const char *name)
}
break;


case L('h','r'): // Croatian
{
static const wchar_t replace_chars_hr[] =
{0x430,0x431,0x446,0x45b,0x447,0x434,0x452,0x45f,
0x435,0x444,0x433,0x445,0x438,0x458,0x43a,0x43b,
0x459,0x43c,0x43d,0x45a,0x43e,0x43f,0x440,0x441,
0x448,0x442,0x443,0x432,0x437,0x436,
0x453,0x455,0x45c,0}; // ѓ ѕ ќ

static const unsigned int replacement_chars_hr[] =
{'a','b','c',0x107,0x10d,'d',0x111,'d'+(0x17e<<16),
'e','f','g','h','i','j','k','l',
'l'+('j'<<16),'m','n','n'+('j'<<16),'o','p','r','s',
0x161,'t','u','v','z',0x17e,
0x111,'d'+('z'<<16),0x107,0};

static int stress_amps_hr[8] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_hr[8] = {180,160, 200,200, 0,0, 220,230};

tr = new Translator();
SetupTranslator(tr,stress_lengths_hr,stress_amps_hr);
tr->charset_a0 = charsets[2]; // ISO-8859-2

tr->langopts.stress_rule = 0;
tr->langopts.stress_flags = 0x10;
tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3;
tr->langopts.max_initial_consonants = 5;
tr->langopts.spelling_stress = 1;

tr->langopts.numbers = 0x1c0d + 0x84000;
tr->langopts.numbers2 = 0xa; // variant numbers before thousands,milliards
tr->langopts.replace_chars = replace_chars_hr;
tr->langopts.replacement_chars = replacement_chars_hr;

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


case L('h','u'): // Hungarian
{
static int stress_amps_hu[8] = {16,16, 20,20, 20,24, 24,22 };
@@ -422,24 +463,8 @@ Translator *SelectTranslator(const char *name)

case L('s','k'): // Slovak
case L('c','s'): // Czech
case L('h','r'): // Croatian
{
static const wchar_t replace_chars_hr[] =
{0x430,0x431,0x446,0x45b,0x447,0x434,0x452,0x45f,
0x435,0x444,0x433,0x445,0x438,0x458,0x43a,0x43b,
0x459,0x43c,0x43d,0x45a,0x43e,0x43f,0x440,0x441,
0x448,0x442,0x443,0x432,0x437,0x436,
0x453,0x455,0x45c,0}; // ѓ ѕ ќ

static const unsigned int replacement_chars_hr[] =
{'a','b','c',0x107,0x10d,'d',0x111,'d'+(0x17e<<16),
'e','f','g','h','i','j','k','l',
'l'+('j'<<16),'m','n','n'+('j'<<16),'o','p','r','s',
0x161,'t','u','v','z',0x17e,
0x111,'d'+('z'<<16),0x107,0};

static int stress_amps_sk[8] = {16,16, 20,20, 20,24, 24,22 };
// static int stress_lengths_sk[8] = {180,180, 200,200, 0,0, 210,220};
static int stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210};
static char *sk_voiced = "bdgjlmnrvwzaeiouy";

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

tr->langopts.numbers = 0x1c0d + 0x84000;
if(name2 == L('h','r'))
{
tr->langopts.numbers2 = 0xa; // variant numbers before thousands,milliards
tr->langopts.replace_chars = replace_chars_hr;
tr->langopts.replacement_chars = replacement_chars_hr;
}

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


SetLetterVowel(tr,'y');
SetLetterVowel(tr,'r');
SetLetterBits(tr,5,sk_voiced);

+ 1
- 1
src/translate.cpp View File

@@ -1515,7 +1515,7 @@ void *Translator::TranslateClause(FILE *f_text, const void *vp_input, int *tone_
int c;
int cc;
unsigned int source_index=0;
unsigned int prev_source_index;
unsigned int prev_source_index=0;
int prev_in;
int prev_out=' ';
int prev_out2;

+ 1
- 0
src/translate.h View File

@@ -123,6 +123,7 @@
#define RULE_IFVERB 26 // V
#define RULE_LETTERGP 27 // L + letter group number
#define RULE_ALT1 28 // word has $alt attribute
#define RULE_SPELLING 31 // while spelling letter-by-letter
#define RULE_LAST_RULE 28

#define LETTERGP_A 0

Loading…
Cancel
Save