Browse Source

Changes to languages: en, en-r.


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

+ 3
- 2
espeak-data/voices/en/en-r View File

@@ -8,10 +8,11 @@ phonemes en_us
dictrules 3 6
option 12 1 // reduce [t]

stressLength 150 125 180 180 0 0 270 280
stressLength 145 120 175 175 0 0 260 270
stressAmp 17 16 20 20 20 22 23 20

//replace 03 I i
//replace 03 I2 i

formant 1 99 100 100
formant 2 101 100 100
formant 3 101 100 100

+ 3
- 4
phsource/compile_report View File

@@ -1282,9 +1282,9 @@ vowel/i_5 [i:] en_sc
vowel/i#_5 [y] pt_pt
[i/] pt_pt
[y] ro
vowel/i_6 [i] hr
vowel/i_6 [i:] en_us
[i] hr
vowel/i_en [i:] en
[i:] en_us
[i] vi
vowel/i_fnt [i] hi
[i:] hi
@@ -1576,8 +1576,8 @@ vwl_en_us/ii [I] en_us
vwl_en_us/ir [i@] en_us
[i@] en_sc
vwl_en_us/oo [O] en_us
vwl_en_us/oor [O@] en_us
vwl_en_us/or [O:] en_us
[O@] en_us
[o@] en_us
[O:] en_sc
vwl_en_us/ur [U@] en_us
@@ -1663,7 +1663,6 @@ w/wi [(i)] base
[i] zhy
w/wi2 [i:] en
[i:] en_n
[i:] en_us
[i:] en_sc
[i:] en_rp
[i2] de

BIN
phsource/j/ju View File


+ 8
- 10
phsource/ph_english_us View File

@@ -21,7 +21,7 @@ phoneme 3 // Schwa, used for rhotic schwa in American
unstressed
linkout r-
beforevowel @
length 200
length 210
endphoneme


@@ -156,19 +156,16 @@ endphoneme

phoneme 3:
vowel starttype (@) endtype (@)
length 190
// formants vwl_en_us/@r_us2
length 220
formants vwl_en_us/3_us
// reduceto @ 0
linkout r-
endphoneme


phoneme i:
vowel starttype (i) endtype (i)
length 150
formants vowel/i_en
after w w/wi2
length 160
formants vowel/i_6
linkout ;
endphoneme

@@ -185,7 +182,8 @@ endphoneme
phoneme O@
vowel starttype (o) endtype (@)
length 270
formants vwl_en_us/oor
// formants vwl_en_us/oor
formants vwl_en_us/or
appendph r
endphoneme

@@ -208,7 +206,7 @@ endphoneme

phoneme u:
vowel starttype (u) endtype (u)
length 160
length 170
formants vowel/u#_5
// before l/2 vwl_en/u_L-40+l/L2_uL
endphoneme
@@ -237,7 +235,7 @@ endphoneme

phoneme eI
vowel starttype (e) endtype (i)
length 235
length 220
// formants vdiph/eei_2
formants vwl_en_us/ei
endphoneme

+ 1
- 0
phsource/phonemes View File

@@ -481,6 +481,7 @@ phoneme j
beforenotvowel j/
formants NULL
after _ j/_j
after v NULL
lengthmod 7
endphoneme


BIN
phsource/r/_r View File


BIN
phsource/r/r View File


BIN
phsource/r/r@ View File


BIN
phsource/r/ra View File


BIN
phsource/r/ro View File


BIN
phsource/r/ru View File


BIN
phsource/vdiph/8u View File


BIN
phsource/vdiph/ai_en2 View File


BIN
phsource/vowel/i_6 View File


BIN
phsource/vowel/ii_4 View File


BIN
phsource/vowel/vowelchart.png View File


BIN
phsource/vwl_en_us/3_us View File


BIN
phsource/vwl_en_us/aai View File


BIN
phsource/vwl_en_us/ai@ View File


BIN
phsource/vwl_en_us/ee View File


BIN
phsource/vwl_en_us/ei View File


+ 1
- 1
src/tr_english.cpp View File

@@ -37,7 +37,7 @@
Translator_English::Translator_English() : Translator()
{//===================================
// static int stress_lengths2[8] = {182,140, 220,220, 220,240, 248,270};
static int stress_lengths2[8] = {182,140, 220,220, 0,0, 248,275};
static const short stress_lengths2[8] = {182,140, 220,220, 0,0, 248,275};

memcpy(stress_lengths,stress_lengths2,sizeof(stress_lengths));
langopts.vowel_pause = 0;

+ 51
- 51
src/tr_languages.cpp View File

@@ -84,8 +84,8 @@ static const unsigned int replace_cyrillic_latin[] =
0}; // ѓ ѕ ќ


void SetupTranslator(Translator *tr, int *lengths, int *amps)
{//==========================================================
void SetupTranslator(Translator *tr, const short *lengths, const unsigned char *amps)
{//==================================================================================
if(lengths != NULL)
memcpy(tr->stress_lengths,lengths,sizeof(tr->stress_lengths));
if(amps != NULL)
@@ -111,8 +111,8 @@ Translator *SelectTranslator(const char *name)

case L('c','y'): // Welsh
{
static int stress_lengths_cy[8] = {170,230, 190,190, 0, 0, 250,270};
static int stress_amps_cy[8] = {16,15, 18,18, 0,0, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_cy[8] = {170,230, 190,190, 0, 0, 250,270};
static const unsigned char stress_amps_cy[8] = {16,15, 18,18, 0,0, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable

tr = new Translator();
SetupTranslator(tr,stress_lengths_cy,stress_amps_cy);
@@ -138,7 +138,7 @@ Translator *SelectTranslator(const char *name)

case L('d','e'):
{
static const int stress_lengths_de[8] = {150,130, 190,190, 0, 0, 260,275};
static const short stress_lengths_de[8] = {150,130, 190,190, 0, 0, 260,275};
tr = new Translator();
tr->langopts.stress_rule = 0;
tr->langopts.word_gap = 0x2; // don't use linking phonemes
@@ -158,8 +158,8 @@ Translator *SelectTranslator(const char *name)
case L('e','l'): // Greek
case L_grc: // Ancient Greek
{
static int stress_lengths_el[8] = {155, 180, 210, 210, 0, 0, 270, 300};
static int stress_amps_el[8] = {15,12, 20,20, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_el[8] = {155, 180, 210, 210, 0, 0, 270, 300};
static const unsigned char stress_amps_el[8] = {15,12, 20,20, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable

// character codes offset by 0x380
static const char el_vowels[] = {0x10,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x35,0x37,0x39,0x3f,0x45,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0};
@@ -203,8 +203,8 @@ Translator *SelectTranslator(const char *name)

case L('e','o'):
{
static int stress_lengths_eo[8] = {145, 180, 200, 190, 0, 0, 300, 320};
static int stress_amps_eo[] = {16,14, 20,20, 20,24, 24,22 };
static const short stress_lengths_eo[8] = {145, 180, 200, 190, 0, 0, 300, 320};
static const unsigned char stress_amps_eo[] = {16,14, 20,20, 20,24, 24,22 };
static const wchar_t eo_char_apostrophe[2] = {'l',0};
tr = new Translator();
@@ -226,8 +226,8 @@ Translator *SelectTranslator(const char *name)

case L('e','s'): // Spanish
{
static int stress_lengths_es[8] = {170, 200, 180, 180, 0, 0, 220, 250};
static int stress_amps_es[8] = {16,12, 18,18, 20,22, 22,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_es[8] = {170, 200, 180, 180, 0, 0, 220, 250};
static const unsigned char stress_amps_es[8] = {16,12, 18,18, 20,22, 22,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable

tr = new Translator();
SetupTranslator(tr,stress_lengths_es,stress_amps_es);
@@ -251,8 +251,8 @@ Translator *SelectTranslator(const char *name)

case L('f','i'): // Finnish
{
static int stress_amps_fi[8] = {18,16, 22,22, 20,22, 22,22 };
static int stress_lengths_fi[8] = {150,170, 200,200, 0,0, 210,250};
static const unsigned char stress_amps_fi[8] = {18,16, 22,22, 20,22, 22,22 };
static const short stress_lengths_fi[8] = {150,170, 200,200, 0,0, 210,250};

tr = new Translator();
SetupTranslator(tr,stress_lengths_fi,stress_amps_fi);
@@ -273,8 +273,8 @@ Translator *SelectTranslator(const char *name)

case L('f','r'): // french
{
static int stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 235};
static int stress_amps_fr[8] = {16,14, 20,20, 20,24, 24,22 };
static const short stress_lengths_fr[8] = {190, 170, 190, 200, 0, 0, 235, 235};
static const unsigned char stress_amps_fr[8] = {16,14, 20,20, 20,24, 24,22 };

tr = new Translator();
SetupTranslator(tr,stress_lengths_fr,stress_amps_fr);
@@ -290,8 +290,8 @@ Translator *SelectTranslator(const char *name)
case L('h','i'):
{
static const char dev_consonants2[] = {0x02,0x03,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f};
static int stress_lengths_hi[8] = {190, 190, 210, 210, 0, 0, 230, 250};
static int stress_amps_hi[8] = {17,14, 20,19, 20,24, 24,22 };
static const short stress_lengths_hi[8] = {190, 190, 210, 210, 0, 0, 230, 250};
static const unsigned char stress_amps_hi[8] = {17,14, 20,19, 20,24, 24,22 };

tr = new Translator();
SetupTranslator(tr,stress_lengths_hi,stress_amps_hi);
@@ -318,8 +318,8 @@ Translator *SelectTranslator(const char *name)
case L('b','s'): // Bosnian
case L('s','r'): // Serbian
{
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};
static const unsigned char stress_amps_hr[8] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_hr[8] = {180,160, 200,200, 0,0, 220,230};

tr = new Translator();
SetupTranslator(tr,stress_lengths_hr,stress_amps_hr);
@@ -343,8 +343,8 @@ Translator *SelectTranslator(const char *name)

case L('h','u'): // Hungarian
{
static int stress_amps_hu[8] = {17,17, 19,19, 20,24, 24,22 };
static int stress_lengths_hu[8] = {185,195, 195,190, 0,0, 210,220};
static const unsigned char stress_amps_hu[8] = {17,17, 19,19, 20,24, 24,22 };
static const short stress_lengths_hu[8] = {185,195, 195,190, 0,0, 210,220};

tr = new Translator();
SetupTranslator(tr,stress_lengths_hu,stress_amps_hu);
@@ -367,8 +367,8 @@ SetLengthMods(tr,3); // all equal

case L('i','s'): // Icelandic
{
static int stress_amps_is[] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_is[8] = {180,160, 200,200, 0,0, 240,250};
static const unsigned char stress_amps_is[] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_is[8] = {180,160, 200,200, 0,0, 240,250};
static const wchar_t is_lettergroup_B[] = {'c','f','h','k','p','t','x',0xfe,0}; // voiceless conants, including 'þ' ?? 's'

tr = new Translator();
@@ -390,8 +390,8 @@ SetLengthMods(tr,3); // all equal

case L('i','t'): // Italian
{
static int stress_lengths_it[8] = {150, 140, 180, 180, 0, 0, 270, 320};
static int stress_amps_it[8] = {15,14, 19,19, 20,24, 24,22 };
static const short stress_lengths_it[8] = {150, 140, 180, 180, 0, 0, 270, 320};
static const unsigned char stress_amps_it[8] = {15,14, 19,19, 20,24, 24,22 };

tr = new Translator();
SetupTranslator(tr,stress_lengths_it,stress_amps_it);
@@ -428,8 +428,8 @@ SetLengthMods(tr,3); // all equal
{
static wchar_t vowels_cyrillic[] = {0x440, // also include 'р' [R]
0x430,0x435,0x438,0x439,0x43e,0x443,0x44b,0x44d,0x44e,0x44f,0x450,0x451,0x456,0x457,0x45d,0x45e,0};
static int stress_amps_mk[8] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_mk[8] = {180,160, 200,200, 0,0, 220,230};
static const unsigned char stress_amps_mk[8] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_mk[8] = {180,160, 200,200, 0,0, 220,230};

tr = new Translator();
SetupTranslator(tr,stress_lengths_mk,stress_amps_mk);
@@ -445,7 +445,7 @@ SetLengthMods(tr,3); // all equal

case L('n','l'): // Dutch
{
static const int stress_lengths_nl[8] = {160,135, 210,210, 0, 0, 260,280};
static const short stress_lengths_nl[8] = {160,135, 210,210, 0, 0, 260,280};
tr = new Translator();

tr->langopts.stress_rule = 0;
@@ -462,8 +462,8 @@ SetLengthMods(tr,3); // all equal

case L('n','o'): // Norwegian
{
static int stress_amps_no[] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_no[8] = {160,140, 200,190, 0,0, 220,240};
static const unsigned char stress_amps_no[] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_no[8] = {160,140, 200,190, 0,0, 220,240};
tr = new Translator();
SetupTranslator(tr,stress_lengths_no,stress_amps_no);

@@ -475,8 +475,8 @@ SetLengthMods(tr,3); // all equal

case L('p','l'): // Polish
{
static int stress_lengths_pl[8] = {160, 180, 175, 175, 0, 0, 260, 290};
static int stress_amps_pl[8] = {17,14, 19,19, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_pl[8] = {160, 180, 175, 175, 0, 0, 260, 290};
static const unsigned char stress_amps_pl[8] = {17,14, 19,19, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable

tr = new Translator();
SetupTranslator(tr,stress_lengths_pl,stress_amps_pl);
@@ -495,8 +495,8 @@ SetLengthMods(tr,3); // all equal

case L('p','t'): // Portuguese
{
static int stress_lengths_pt[8] = {180, 125, 210, 210, 0, 0, 270, 295};
static int stress_amps_pt[8] = {16,13, 19,19, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
static const short stress_lengths_pt[8] = {180, 125, 210, 210, 0, 0, 270, 295};
static const unsigned char stress_amps_pt[8] = {16,13, 19,19, 20,24, 24,22 }; // 'diminished' is used to mark a quieter, final unstressed syllable
tr = new Translator();
SetupTranslator(tr,stress_lengths_pt,stress_amps_pt);
tr->langopts.length_mods0 = tr->langopts.length_mods; // don't lengthen vowels in the last syllable
@@ -512,8 +512,8 @@ SetLengthMods(tr,3); // all equal

case L('r','o'): // Romanian
{
static int stress_lengths_ro[8] = {170, 170, 180, 180, 0, 0, 240, 260};
static int stress_amps_ro[8] = {15,13, 18,18, 20,22, 22,22 };
static const short stress_lengths_ro[8] = {170, 170, 180, 180, 0, 0, 240, 260};
static const unsigned char stress_amps_ro[8] = {15,13, 18,18, 20,22, 22,22 };

tr = new Translator();
SetupTranslator(tr,stress_lengths_ro,stress_amps_ro);
@@ -534,8 +534,8 @@ SetLengthMods(tr,3); // all equal
case L('s','k'): // Slovak
case L('c','s'): // Czech
{
static int stress_amps_sk[8] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210};
static const unsigned char stress_amps_sk[8] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210};
static const char *sk_voiced = "bdgjlmnrvwzaeiouy";

tr = new Translator();
@@ -568,8 +568,8 @@ SetLengthMods(tr,3); // all equal

case L('s','v'): // Swedish
{
static int stress_amps_sv[] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_sv[8] = {160,135, 220,220, 0,0, 250,280};
static const unsigned char stress_amps_sv[] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_sv[8] = {160,135, 220,220, 0,0, 250,280};
tr = new Translator();
SetupTranslator(tr,stress_lengths_sv,stress_amps_sv);

@@ -582,8 +582,8 @@ SetLengthMods(tr,3); // all equal

case L('s','w'): // Swahili
{
static int stress_lengths_sw[8] = {160, 170, 200, 200, 0, 0, 320, 340};
static int stress_amps_sw[] = {16,12, 19,19, 20,24, 24,22 };
static const short stress_lengths_sw[8] = {160, 170, 200, 200, 0, 0, 320, 340};
static const unsigned char stress_amps_sw[] = {16,12, 19,19, 20,24, 24,22 };
tr = new Translator();
SetupTranslator(tr,stress_lengths_sw,stress_amps_sw);
@@ -600,8 +600,8 @@ SetLengthMods(tr,3); // all equal

case L('t','r'): // Turkish
{
static int stress_amps_tr[8] = {16,16, 20,20, 20,24, 24,22 };
static int stress_lengths_tr[8] = {180,150, 200,180, 0,0, 230,270};
static const unsigned char stress_amps_tr[8] = {16,16, 20,20, 20,24, 24,22 };
static const short stress_lengths_tr[8] = {180,150, 200,180, 0,0, 230,270};

tr = new Translator();
SetupTranslator(tr,stress_lengths_tr,stress_amps_tr);
@@ -616,8 +616,8 @@ SetLengthMods(tr,3); // all equal

case L('v','i'): // Vietnamese
{
static int stress_lengths_vi[8] = {150, 150, 180, 180, 210, 220, 220, 280};
static int stress_amps_vi[] = {16,16, 16,16, 24,24, 24,22 };
static const short stress_lengths_vi[8] = {150, 150, 180, 180, 210, 220, 220, 280};
static const unsigned char stress_amps_vi[] = {16,16, 16,16, 24,24, 24,22 };
static wchar_t vowels_vi[] = {
0x61, 0xe0, 0xe1, 0x1ea3, 0xe3, 0x1ea1, // a
0x103, 0x1eb1, 0x1eaf, 0x1eb3, 0x1eb5, 0x1eb7, // ă
@@ -650,8 +650,8 @@ SetLengthMods(tr,3); // all equal
case L('z','h'):
case L_zhy:
{
static int stress_lengths_zh[8] = {220,150, 230,230, 230,0, 230,250};
static int stress_amps_zh[] = {22,16, 22,22, 22,22, 22,22 };
static const short stress_lengths_zh[8] = {220,150, 230,230, 230,0, 230,250};
static const unsigned char stress_amps_zh[] = {22,16, 22,22, 22,22, 22,22 };

tr = new Translator;
SetupTranslator(tr,stress_lengths_zh,stress_amps_zh);
@@ -699,8 +699,8 @@ SetLengthMods(tr,3); // all equal

Translator_Russian::Translator_Russian() : Translator()
{//===================================
static int stress_amps_ru[] = {16,16, 18,18, 20,24, 24,22 };
static int stress_lengths_ru[8] = {150,140, 220,220, 0,0, 260,280};
static const unsigned char stress_amps_ru[] = {16,16, 18,18, 20,24, 24,22 };
static const short stress_lengths_ru[8] = {150,140, 220,220, 0,0, 260,280};


// character codes offset by 0x420
@@ -953,7 +953,7 @@ Translator_Afrikaans::Translator_Afrikaans() : Translator()
{//=========================================
// Initialise options for this language

static const int stress_lengths2[8] = {170,140, 220,220, 0, 0, 250,270};
static const short stress_lengths2[8] = {170,140, 220,220, 0, 0, 250,270};
langopts.stress_rule = 0;
langopts.word_gap = 0;
langopts.vowel_pause = 0x30;

+ 2
- 2
src/translate.cpp View File

@@ -386,8 +386,8 @@ int IsDigit(unsigned int c)
Translator::Translator()
{//=====================
int ix;
static int stress_amps2[] = {16,16, 20,20, 20,24, 24,21 };
static int stress_lengths2[8] = {182,140, 220,220, 220,240, 260,280};
static const unsigned char stress_amps2[] = {16,16, 20,20, 20,24, 24,21 };
static const short stress_lengths2[8] = {182,140, 220,220, 220,240, 260,280};
static const wchar_t empty_wstring[1] = {0};

charset_a0 = charsets[1]; // ISO-8859-1, this is for when the input is not utf8

+ 3
- 3
src/translate.h View File

@@ -364,9 +364,9 @@ public:
char phon_out[300];
char word_phonemes[N_WORD_PHONEMES]; // a word translated into phoneme codes

int stress_amps[8];
int stress_amps_r[8];
int stress_lengths[8];
unsigned char stress_amps[8];
unsigned char stress_amps_r[8];
short stress_lengths[8];
int dict_condition; // conditional apply some pronunciation rules and dict.lookups
const unsigned short *charset_a0; // unicodes for characters 0xa0 to oxff
const wchar_t *char_plus_apostrophe; // single chars + apostrophe treated as words

Loading…
Cancel
Save