diff --git a/dictsource/es_list b/dictsource/es_list index 48ec0b87..369ff273 100644 --- a/dictsource/es_list +++ b/dictsource/es_list @@ -7,6 +7,9 @@ _cap m'aJ^us // should be "mayúscula" after the letter? _?? s'imbOlo _#32 Esp'aTjo +// NOTE: Some of these pronunciations may still be in +// Spanish, and need to be changed. + // accent names _lig liQaD'u**a _acu aQ'uDo @@ -26,8 +29,6 @@ _stk b'a*Ra // ?? _tld t'ilde - - // names of symbols _. punto _, koma diff --git a/dictsource/vi_list b/dictsource/vi_list index 787634a4..cf95e593 100644 --- a/dictsource/vi_list +++ b/dictsource/vi_list @@ -60,15 +60,15 @@ _75 _b'aI4||m'y@2j||l'a7m _85 t['a:3m||m'y@2j||l'a7m _95 c'i3n||m'y@2j||l'a7m - _0C cr'am // trăm _0M1 N'a:2n // ngàn _0M2 cr'i@6w // triệu _0M3 t['i4 // tỷ _0and l,in^ // linh +_dpt _f,@I4_ // symbols - +_, f@I4 // ?? found in festival wow_vi_ptn_phrasing.scm bị $u diff --git a/phsource/compile_report b/phsource/compile_report index 1768ed6f..c9c962f8 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -1,4 +1,4 @@ -61 phoneme tables +62 phoneme tables new total base 103 103 base2 24 122 @@ -61,6 +61,7 @@ om 25 125 en_klatt 77 149 ga 18 117 + mr 1 148 Data file Used by b/b [b] base @@ -2321,7 +2322,8 @@ vowel/u_bck [u] base2 [u:] ga vowel/u_bck2 [u:] la [u] sq -vowel/u_fnt [u:] en_rp +vowel/u_fnt [u:] en + [u:] en_rp vowel/uu [U] en [U] en_n [U] en_wm @@ -2431,7 +2433,6 @@ vwl_en_rp/aa [A:] en_rp [aa] en_rp vwl_en_rp/aU@ [aU@] 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_us2 [3:] en_us vwl_en_us/a [a] en_us diff --git a/phsource/envelope/vi_5amp b/phsource/envelope/vi_5amp index 5bdb193e..61814aab 100644 --- a/phsource/envelope/vi_5amp +++ b/phsource/envelope/vi_5amp @@ -1,6 +1,6 @@ ENVELOPE -0 95 -33 95 -49 55 -65 95 -100 95 +0 60 1 +35 60 +42 36 +60 60 1 +100 55 diff --git a/phsource/envelope/vi_6amp b/phsource/envelope/vi_6amp index 4a80950e..9d0f3a24 100644 --- a/phsource/envelope/vi_6amp +++ b/phsource/envelope/vi_6amp @@ -1,15 +1,12 @@ 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 diff --git a/phsource/l/L2_uL b/phsource/l/L2_uL index 0a347b13..a535f6f2 100644 Binary files a/phsource/l/L2_uL and b/phsource/l/L2_uL differ diff --git a/phsource/ph_english b/phsource/ph_english index d5701a73..38495853 100644 --- a/phsource/ph_english +++ b/phsource/ph_english @@ -253,7 +253,7 @@ phoneme u: vowel starttype (u) endtype (u) length 210 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 diff --git a/phsource/ph_english_rp b/phsource/ph_english_rp index 2dfa4c99..59385498 100644 --- a/phsource/ph_english_rp +++ b/phsource/ph_english_rp @@ -195,7 +195,6 @@ phoneme u: vowel starttype (u) endtype (u) length 190 formants vowel/u_fnt -// before l/2 vwl_en/u_L-40+l/L2_uL endphoneme diff --git a/phsource/ph_vi b/phsource/ph_vi index 7a83d9ce..6d13b526 100644 --- a/phsource/ph_vi +++ b/phsource/ph_vi @@ -6,49 +6,43 @@ phoneme 1 // ngang tone: level stress - length 11 tone 28 32 envelope/p_level NULL endphoneme phoneme 2 // huyền tone: low falling stress - length 12 tone 20 8 envelope/p_fall NULL endphoneme phoneme 3 // sắc tone rising stress - length 13 tone 25 50 envelope/p_rise NULL endphoneme phoneme 4 // hỏi tone curve (dipping rising) stress - length 14 tone 30 5 envelope/p_fallrise NULL endphoneme phoneme 5 // ngã tone: broken (creaking rising) stress - length 15 - tone 30 55 envelope/p_214 envelope/vi_5amp + tone 28 58 envelope/p_214 envelope/vi_5amp endphoneme phoneme 6 // nặng tone drop (constricted) stress - length 16 + length 75 // reduce the length of the vowel tone 40 20 envelope/p_512 envelope/vi_6amp endphoneme phoneme 7 // tone 1 (ngang) at end of clause stress - length 17 tone 40 20 envelope/p_fall NULL endphoneme diff --git a/phsource/phonemes b/phsource/phonemes index f15d8e28..e333d114 100644 --- a/phsource/phonemes +++ b/phsource/phonemes @@ -41,7 +41,7 @@ phonemenumber 27 _;_ // clause pause // UTILITY PHONEMES //******************************************************************* -phoneme < // Start of control string +phoneme < // Start of control string NOT USED pause length 0 lengthmod 1 @@ -49,42 +49,42 @@ endphoneme phoneme %% // Unstressed stress - length 0 + stress_type 0 endphoneme phoneme % // Diminished stress stress - length 1 + stress_type 1 endphoneme phoneme , // Secondary stress stress - length 2 + stress_type 2 endphoneme phoneme ,, // Secondary stress stress - length 3 + stress_type 3 endphoneme phoneme ' // Primary stress stress - length 4 + stress_type 4 endphoneme phoneme '' // Primary stress (priority) stress - length 5 + stress_type 5 endphoneme phoneme '! // Primary stress (emphasized) stress - length 6 + stress_type 6 endphoneme phoneme = // Place stress on previous vowel stress - length 2 + stress_type 2 endphoneme phoneme || // End Word @@ -1366,3 +1366,7 @@ include ph_english_klatt phonemetable ga base include ph_irish + +phonemetable mr hi +include ph_mathari + diff --git a/phsource/vwl_cy/I%% b/phsource/vwl_cy/I%% deleted file mode 100644 index 1e88bf63..00000000 Binary files a/phsource/vwl_cy/I%% and /dev/null differ diff --git a/phsource/vwl_de/3 b/phsource/vwl_de/3 deleted file mode 100644 index e208873f..00000000 Binary files a/phsource/vwl_de/3 and /dev/null differ diff --git a/phsource/vwl_de/r_I b/phsource/vwl_de/r_I deleted file mode 100644 index c8e26723..00000000 Binary files a/phsource/vwl_de/r_I and /dev/null differ diff --git a/phsource/vwl_de/r_O b/phsource/vwl_de/r_O deleted file mode 100644 index fa71c619..00000000 Binary files a/phsource/vwl_de/r_O and /dev/null differ diff --git a/phsource/vwl_de/r_U b/phsource/vwl_de/r_U deleted file mode 100644 index 1415c8b5..00000000 Binary files a/phsource/vwl_de/r_U and /dev/null differ diff --git a/phsource/vwl_de/r_a b/phsource/vwl_de/r_a deleted file mode 100644 index 76969d2e..00000000 Binary files a/phsource/vwl_de/r_a and /dev/null differ diff --git a/phsource/vwl_de/r_aa b/phsource/vwl_de/r_aa deleted file mode 100644 index 9c7bce1d..00000000 Binary files a/phsource/vwl_de/r_aa and /dev/null differ diff --git a/phsource/vwl_de/r_e b/phsource/vwl_de/r_e deleted file mode 100644 index 2ae085fc..00000000 Binary files a/phsource/vwl_de/r_e and /dev/null differ diff --git a/phsource/vwl_de/r_ee b/phsource/vwl_de/r_ee deleted file mode 100644 index 6fe30845..00000000 Binary files a/phsource/vwl_de/r_ee and /dev/null differ diff --git a/phsource/vwl_de/r_y b/phsource/vwl_de/r_y deleted file mode 100644 index 7e1b3e04..00000000 Binary files a/phsource/vwl_de/r_y and /dev/null differ diff --git a/phsource/vwl_en/i b/phsource/vwl_en/i deleted file mode 100644 index dc62ceb1..00000000 Binary files a/phsource/vwl_en/i and /dev/null differ diff --git a/phsource/vwl_en/u_L b/phsource/vwl_en/u_L deleted file mode 100644 index f94f3c52..00000000 Binary files a/phsource/vwl_en/u_L and /dev/null differ diff --git a/phsource/vwl_fi/y b/phsource/vwl_fi/y deleted file mode 100644 index 3b9c2fdf..00000000 Binary files a/phsource/vwl_fi/y and /dev/null differ diff --git a/phsource/vwl_fi/y_3 b/phsource/vwl_fi/y_3 deleted file mode 100644 index c0c075cb..00000000 Binary files a/phsource/vwl_fi/y_3 and /dev/null differ diff --git a/src/compiledata.cpp b/src/compiledata.cpp index b56e5243..00e151fc 100755 --- a/src/compiledata.cpp +++ b/src/compiledata.cpp @@ -80,6 +80,8 @@ #define tPHONEMENUMBER 29 #define tPHONEMETABLE 30 #define tINCLUDE 31 +#define tSTRESSTYPE 32 + static const int flags_alternative[] = {phBEFOREVOWEL,phBEFOREVOWELPAUSE,phBEFORENOTVOWEL,phBEFORENOTVOWEL2,phSWITCHVOICING}; @@ -251,6 +253,7 @@ static keywtab_t keywords[] = { {"appendph",tAPPENDPH}, {"import_phoneme",tIMPORTPH}, {"beforepause",tBEFOREPAUSE}, + {"stress_type",tSTRESSTYPE}, // flags {"wavef", 0x2000000+phWAVE}, @@ -880,7 +883,7 @@ int Compile::LoadWavefile(FILE *f, const char *fname) //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) { length = length/2 + (scale_factor << 16); @@ -1397,6 +1400,10 @@ int Compile::CPhoneme() ph->std_length = NextItem(tNUMBER); break; + case tSTRESSTYPE: + ph->std_length = NextItem(tNUMBER); + break; + case tWAVE: ph->phflags |= phWAVE; // drop through to tSPECT case tSPECT: @@ -1778,11 +1785,12 @@ void Compile::CPhonemeFiles() int LoadEnvelope2(FILE *f, const char *fname) {//=================================================== - int ix; + int ix, ix2; int n; int x, y; int displ; int n_points; + double yy; char line_buf[128]; float env_x[20]; float env_y[20]; @@ -1808,11 +1816,20 @@ int LoadEnvelope2(FILE *f, const char *fname) env_y[n_points] = env_y[n_points-1]; ix = -1; + ix2 = 0; for(x=0; x env_x[ix+4]) 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) y = (int)(polint(&env_x[ix],&env_y[ix],4,x) * 2.55); // convert to range 0-255 else diff --git a/src/intonation.cpp b/src/intonation.cpp index a86c9191..e97f8d1f 100755 --- a/src/intonation.cpp +++ b/src/intonation.cpp @@ -755,7 +755,7 @@ void Translator::CalcPitches_Tone(int clause_tone) // LANG=vi p = &phoneme_list[final_stressed]; 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 } diff --git a/src/setlengths.cpp b/src/setlengths.cpp index eb5ca107..b94cbcc1 100755 --- a/src/setlengths.cpp +++ b/src/setlengths.cpp @@ -278,6 +278,7 @@ void Translator::CalcLengths() int embedded_ix = 0; int min_drop; int emphasized; + int tone_mod; unsigned char *pitch_env=NULL; for(ix=1; ixtone_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) { // this is the last syllable in the clause, lengthen it - more for short vowels diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index 4c0f50d2..15011ed1 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -823,6 +823,7 @@ SetLengthMods(tr,3); // all equal case L('t','a'): // Tamil case L('m','l'): // Malayalam 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 unsigned char stress_amps_ta[8] = {18,18, 18,18, 20,20, 22,22 }; @@ -835,6 +836,11 @@ SetLengthMods(tr,3); // all equal tr->langopts.stress_flags = 0x10004; // use 'diminished' for unstressed final syllable tr->letter_bits_offset = OFFSET_TAMIL; + if(name2 == L('m','r')) + { + tr->letter_bits_offset = OFFSET_DEVANAGARI; + } + else if(name2 == L('m','l')) { tr->letter_bits_offset = OFFSET_MALAYALAM; @@ -915,7 +921,7 @@ SetLengthMods(tr,3); // all equal tr->letter_groups[0] = vowels_vi; tr->langopts.tone_language = 1; // Tone language, use CalcPitches_Tone() rather than CalcPitches() tr->langopts.unstressed_wd1 = 2; - tr->langopts.numbers = 0x0049; + tr->langopts.numbers = 0x0049 + 0x8000; } break; diff --git a/src/wavegen.cpp b/src/wavegen.cpp index 7fa22d96..9a24bf91 100755 --- a/src/wavegen.cpp +++ b/src/wavegen.cpp @@ -1244,7 +1244,7 @@ int Wavegen() // amplitude envelope is only used for creaky voice effect on certain vowels/tones if((ix = amp_ix>>8) > 127) ix = 127; amp = amplitude_env[ix]; - amplitude2 = (amplitude2 * amp)/255; + amplitude2 = (amplitude2 * amp)/128; // if(amp < 255) // modulation_type = 7; }