Browse Source

Phonetables: Use "length" field in Tone phonemes to adjust the lengths of the vowel.


git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@206 d46cf337-b52f-0410-862d-fd96e6ae7743
master
jonsd 16 years ago
parent
commit
897237bcf1

+ 3
- 2
dictsource/es_list View File

_?? s'imbOlo _?? s'imbOlo
_#32 Esp'aTjo _#32 Esp'aTjo


// NOTE: Some of these pronunciations may still be in
// Spanish, and need to be changed.

// accent names // accent names
_lig liQaD'u**a _lig liQaD'u**a
_acu aQ'uDo _acu aQ'uDo
_tld t'ilde _tld t'ilde






// names of symbols // names of symbols
_. punto _. punto
_, koma _, koma

+ 2
- 2
dictsource/vi_list View File

_85 t['a:3m||m'y@2j||l'a7m _85 t['a:3m||m'y@2j||l'a7m
_95 c'i3n||m'y@2j||l'a7m _95 c'i3n||m'y@2j||l'a7m



_0C cr'am // trăm _0C cr'am // trăm
_0M1 N'a:2n // ngàn _0M1 N'a:2n // ngàn
_0M2 cr'i@6w // triệu _0M2 cr'i@6w // triệu
_0M3 t['i4 // tỷ _0M3 t['i4 // tỷ
_0and l,in^ // linh _0and l,in^ // linh
_dpt _f,@I4_


// symbols // symbols
_, f@I4


// ?? found in festival wow_vi_ptn_phrasing.scm // ?? found in festival wow_vi_ptn_phrasing.scm
bị $u bị $u

+ 4
- 3
phsource/compile_report View File

61 phoneme tables
62 phoneme tables
new total new total
base 103 103 base 103 103
base2 24 122 base2 24 122
om 25 125 om 25 125
en_klatt 77 149 en_klatt 77 149
ga 18 117 ga 18 117
mr 1 148


Data file Used by Data file Used by
b/b [b] base b/b [b] base
[u:] ga [u:] ga
vowel/u_bck2 [u:] la vowel/u_bck2 [u:] la
[u] sq [u] sq
vowel/u_fnt [u:] en_rp
vowel/u_fnt [u:] en
[u:] en_rp
vowel/uu [U] en vowel/uu [U] en
[U] en_n [U] en_n
[U] en_wm [U] en_wm
[aa] en_rp [aa] en_rp
vwl_en_rp/aU@ [aU@] en_rp vwl_en_rp/aU@ [aU@] en_rp
vwl_en_rp/i@ [i@] en_rp vwl_en_rp/i@ [i@] en_rp
vwl_en/u_L [u:] en
vwl_en_us/3_us [3] en_us vwl_en_us/3_us [3] en_us
vwl_en_us/3_us2 [3:] en_us vwl_en_us/3_us2 [3:] en_us
vwl_en_us/a [a] en_us vwl_en_us/a [a] en_us

+ 5
- 5
phsource/envelope/vi_5amp View File

ENVELOPE ENVELOPE
0 95
33 95
49 55
65 95
100 95
0 60 1
35 60
42 36
60 60 1
100 55

+ 8
- 11
phsource/envelope/vi_6amp View File

ENVELOPE ENVELOPE
0 100
34 100
47 66
64 100
73 100
74 0
85 95
86 95
92 95
94 0
100 0
0 50 1
40 50
50 33
68 50 1
77 50
78 0
88 50 1
100 50







BIN
phsource/l/L2_uL View File


+ 1
- 1
phsource/ph_english View File

vowel starttype (u) endtype (u) vowel starttype (u) endtype (u)
length 210 length 210
formants vdiph2/uw_2 formants vdiph2/uw_2
before l/2 vwl_en/u_L-40+l/L2_uL
before l/2 vowel/u_fnt-40+l/L2_uL
endphoneme endphoneme





+ 0
- 1
phsource/ph_english_rp View File

vowel starttype (u) endtype (u) vowel starttype (u) endtype (u)
length 190 length 190
formants vowel/u_fnt formants vowel/u_fnt
// before l/2 vwl_en/u_L-40+l/L2_uL
endphoneme endphoneme





+ 2
- 8
phsource/ph_vi View File



phoneme 1 // ngang tone: level phoneme 1 // ngang tone: level
stress stress
length 11
tone 28 32 envelope/p_level NULL tone 28 32 envelope/p_level NULL
endphoneme endphoneme




phoneme 2 // huyền tone: low falling phoneme 2 // huyền tone: low falling
stress stress
length 12
tone 20 8 envelope/p_fall NULL tone 20 8 envelope/p_fall NULL
endphoneme endphoneme




phoneme 3 // sắc tone rising phoneme 3 // sắc tone rising
stress stress
length 13
tone 25 50 envelope/p_rise NULL tone 25 50 envelope/p_rise NULL
endphoneme endphoneme




phoneme 4 // hỏi tone curve (dipping rising) phoneme 4 // hỏi tone curve (dipping rising)
stress stress
length 14
tone 30 5 envelope/p_fallrise NULL tone 30 5 envelope/p_fallrise NULL
endphoneme endphoneme




phoneme 5 // ngã tone: broken (creaking rising) phoneme 5 // ngã tone: broken (creaking rising)
stress stress
length 15
tone 30 55 envelope/p_214 envelope/vi_5amp
tone 28 58 envelope/p_214 envelope/vi_5amp
endphoneme endphoneme




phoneme 6 // nặng tone drop (constricted) phoneme 6 // nặng tone drop (constricted)
stress stress
length 16
length 75 // reduce the length of the vowel
tone 40 20 envelope/p_512 envelope/vi_6amp tone 40 20 envelope/p_512 envelope/vi_6amp
endphoneme endphoneme




phoneme 7 // tone 1 (ngang) at end of clause phoneme 7 // tone 1 (ngang) at end of clause
stress stress
length 17
tone 40 20 envelope/p_fall NULL tone 40 20 envelope/p_fall NULL
endphoneme endphoneme



+ 13
- 9
phsource/phonemes View File

// UTILITY PHONEMES // UTILITY PHONEMES
//******************************************************************* //*******************************************************************


phoneme < // Start of control string
phoneme < // Start of control string NOT USED
pause pause
length 0 length 0
lengthmod 1 lengthmod 1


phoneme %% // Unstressed phoneme %% // Unstressed
stress stress
length 0
stress_type 0
endphoneme endphoneme


phoneme % // Diminished stress phoneme % // Diminished stress
stress stress
length 1
stress_type 1
endphoneme endphoneme


phoneme , // Secondary stress phoneme , // Secondary stress
stress stress
length 2
stress_type 2
endphoneme endphoneme


phoneme ,, // Secondary stress phoneme ,, // Secondary stress
stress stress
length 3
stress_type 3
endphoneme endphoneme


phoneme ' // Primary stress phoneme ' // Primary stress
stress stress
length 4
stress_type 4
endphoneme endphoneme


phoneme '' // Primary stress (priority) phoneme '' // Primary stress (priority)
stress stress
length 5
stress_type 5
endphoneme endphoneme


phoneme '! // Primary stress (emphasized) phoneme '! // Primary stress (emphasized)
stress stress
length 6
stress_type 6
endphoneme endphoneme


phoneme = // Place stress on previous vowel phoneme = // Place stress on previous vowel
stress stress
length 2
stress_type 2
endphoneme endphoneme


phoneme || // End Word phoneme || // End Word


phonemetable ga base phonemetable ga base
include ph_irish include ph_irish

phonemetable mr hi
include ph_mathari


BIN
phsource/vwl_cy/I%% View File


BIN
phsource/vwl_de/3 View File


BIN
phsource/vwl_de/r_I View File


BIN
phsource/vwl_de/r_O View File


BIN
phsource/vwl_de/r_U View File


BIN
phsource/vwl_de/r_a View File


BIN
phsource/vwl_de/r_aa View File


BIN
phsource/vwl_de/r_e View File


BIN
phsource/vwl_de/r_ee View File


BIN
phsource/vwl_de/r_y View File


BIN
phsource/vwl_en/i View File


BIN
phsource/vwl_en/u_L View File


BIN
phsource/vwl_fi/y View File


BIN
phsource/vwl_fi/y_3 View File


+ 19
- 2
src/compiledata.cpp View File

#define tPHONEMENUMBER 29 #define tPHONEMENUMBER 29
#define tPHONEMETABLE 30 #define tPHONEMETABLE 30
#define tINCLUDE 31 #define tINCLUDE 31
#define tSTRESSTYPE 32



static const int flags_alternative[] = {phBEFOREVOWEL,phBEFOREVOWELPAUSE,phBEFORENOTVOWEL,phBEFORENOTVOWEL2,phSWITCHVOICING}; static const int flags_alternative[] = {phBEFOREVOWEL,phBEFOREVOWELPAUSE,phBEFORENOTVOWEL,phBEFORENOTVOWEL2,phSWITCHVOICING};


{"appendph",tAPPENDPH}, {"appendph",tAPPENDPH},
{"import_phoneme",tIMPORTPH}, {"import_phoneme",tIMPORTPH},
{"beforepause",tBEFOREPAUSE}, {"beforepause",tBEFOREPAUSE},
{"stress_type",tSTRESSTYPE},


// flags // flags
{"wavef", 0x2000000+phWAVE}, {"wavef", 0x2000000+phWAVE},


//fprintf(f_errors," sample len=%d max=%4x shift=%d\n",length,max,scale_factor); //fprintf(f_errors," sample len=%d max=%4x shift=%d\n",length,max,scale_factor);


#define MIN_FACTOR 6
#define MIN_FACTOR -1 // was 6, disable use of 16 bit samples
if(scale_factor > MIN_FACTOR) if(scale_factor > MIN_FACTOR)
{ {
length = length/2 + (scale_factor << 16); length = length/2 + (scale_factor << 16);
ph->std_length = NextItem(tNUMBER); ph->std_length = NextItem(tNUMBER);
break; break;


case tSTRESSTYPE:
ph->std_length = NextItem(tNUMBER);
break;

case tWAVE: case tWAVE:
ph->phflags |= phWAVE; // drop through to tSPECT ph->phflags |= phWAVE; // drop through to tSPECT
case tSPECT: case tSPECT:


int LoadEnvelope2(FILE *f, const char *fname) int LoadEnvelope2(FILE *f, const char *fname)
{//=================================================== {//===================================================
int ix;
int ix, ix2;
int n; int n;
int x, y; int x, y;
int displ; int displ;
int n_points; int n_points;
double yy;
char line_buf[128]; char line_buf[128];
float env_x[20]; float env_x[20];
float env_y[20]; float env_y[20];
env_y[n_points] = env_y[n_points-1]; env_y[n_points] = env_y[n_points-1];


ix = -1; ix = -1;
ix2 = 0;
for(x=0; x<ENV_LEN; x++) for(x=0; x<ENV_LEN; x++)
{ {
if(x > env_x[ix+4]) if(x > env_x[ix+4])
ix++; ix++;
if(x >= env_x[ix2+1])
ix2++;


if(env_lin[ix2] > 0)
{
yy = env_y[ix2] + (env_y[ix2+1] - env_y[ix2]) * (float(x) - env_x[ix2]) / (env_x[ix2+1] - env_x[ix2]);
y = int(yy * 2.55);
}
else
if(n_points > 3) if(n_points > 3)
y = (int)(polint(&env_x[ix],&env_y[ix],4,x) * 2.55); // convert to range 0-255 y = (int)(polint(&env_x[ix],&env_y[ix],4,x) * 2.55); // convert to range 0-255
else else

+ 1
- 1
src/intonation.cpp View File

// LANG=vi // LANG=vi
p = &phoneme_list[final_stressed]; p = &phoneme_list[final_stressed];
if(p->tone_ph == 0) if(p->tone_ph == 0)
p->tone_ph = LookupPh("7"); // change tone 1 to falling tone at end of clause
p->tone_ph = LookupPh("7"); // change default tone (tone 1) to falling tone at end of clause
} }





+ 10
- 0
src/setlengths.cpp View File

int embedded_ix = 0; int embedded_ix = 0;
int min_drop; int min_drop;
int emphasized; int emphasized;
int tone_mod;
unsigned char *pitch_env=NULL; unsigned char *pitch_env=NULL;


for(ix=1; ix<n_phoneme_list; ix++) for(ix=1; ix<n_phoneme_list; ix++)


length_mod = (length_mod * len)/128; length_mod = (length_mod * len)/128;


if(p->tone_ph != 0)
{
if((tone_mod = phoneme_tab[p->tone_ph]->std_length) > 0)
{
// a tone phoneme specifies a percentage change to the length
length_mod = (length_mod * tone_mod) / 100;
}
}

if(end_of_clause == 2) if(end_of_clause == 2)
{ {
// this is the last syllable in the clause, lengthen it - more for short vowels // this is the last syllable in the clause, lengthen it - more for short vowels

+ 7
- 1
src/tr_languages.cpp View File

case L('t','a'): // Tamil case L('t','a'): // Tamil
case L('m','l'): // Malayalam case L('m','l'): // Malayalam
case L('k','n'): // Kannada case L('k','n'): // Kannada
case L('m','r'): // Marathi
{ {
static const short stress_lengths_ta[8] = {200, 200, 210, 210, 0, 0, 230, 230}; static const short stress_lengths_ta[8] = {200, 200, 210, 210, 0, 0, 230, 230};
static const unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 }; static const unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 };
tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable
tr->letter_bits_offset = OFFSET_TAMIL; tr->letter_bits_offset = OFFSET_TAMIL;


if(name2 == L('m','r'))
{
tr->letter_bits_offset = OFFSET_DEVANAGARI;
}
else
if(name2 == L('m','l')) if(name2 == L('m','l'))
{ {
tr->letter_bits_offset = OFFSET_MALAYALAM; tr->letter_bits_offset = OFFSET_MALAYALAM;
tr->letter_groups[0] = vowels_vi; tr->letter_groups[0] = vowels_vi;
tr->langopts.tone_language = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() tr->langopts.tone_language = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches()
tr->langopts.unstressed_wd1 = 2; tr->langopts.unstressed_wd1 = 2;
tr->langopts.numbers = 0x0049;
tr->langopts.numbers = 0x0049 + 0x8000;


} }
break; break;

+ 1
- 1
src/wavegen.cpp View File

// amplitude envelope is only used for creaky voice effect on certain vowels/tones // amplitude envelope is only used for creaky voice effect on certain vowels/tones
if((ix = amp_ix>>8) > 127) ix = 127; if((ix = amp_ix>>8) > 127) ix = 127;
amp = amplitude_env[ix]; amp = amplitude_env[ix];
amplitude2 = (amplitude2 * amp)/255;
amplitude2 = (amplitude2 * amp)/128;
// if(amp < 255) // if(amp < 255)
// modulation_type = 7; // modulation_type = 7;
} }

Loading…
Cancel
Save