From 6d5a152841c0a0fc60a505c3e377b3e5140e539f Mon Sep 17 00:00:00 2001 From: jonsd Date: Thu, 17 May 2007 00:58:01 +0000 Subject: [PATCH] Fix voice attribute suffix ignored in voice name. lang=cs fix number not spoken after preposition with $alt1 attribute lang=cs Don't allow any thousands separator. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@12 d46cf337-b52f-0410-862d-fd96e6ae7743 --- dictsource/cs_list | 2 +- dictsource/en_list | 1 + dictsource/hr_list | 6 ++-- dictsource/hr_rules | 5 ++++ dictsource/no_list | 11 ++++---- phsource/compile_report | 21 +++++++------- phsource/j/j_ | Bin 1012 -> 1012 bytes phsource/ph_croatian | 55 +++++++++++++++++++++++++++++++------ phsource/ustop/p_unasp.wav | Bin 1792 -> 1660 bytes phsource/vdiph/ooi_3 | Bin 30870 -> 30873 bytes phsource/vowel/i_6 | Bin 7275 -> 7275 bytes src/compiledata.cpp | 2 +- src/spectseq.cpp | 5 +++- src/tr_languages.cpp | 7 ++++- src/translate.cpp | 15 +++++++--- src/voices.cpp | 11 +++++++- 16 files changed, 105 insertions(+), 36 deletions(-) diff --git a/dictsource/cs_list b/dictsource/cs_list index 74d77980..53cbce29 100644 --- a/dictsource/cs_list +++ b/dictsource/cs_list @@ -350,7 +350,7 @@ uvf $abbrev vga $abbrev wgpo $abbrev wri $abbrev -www veveve: +www ve:ve:ve: // Exceptions diff --git a/dictsource/en_list b/dictsource/en_list index 333be10c..41c3c751 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -1957,6 +1957,7 @@ Antarctica $2 Antigua ant'i:g@ Antilles ant'Ili:z Apennine ap@naIn +Armageddon A@ma2g'Ed@n Arkansas A@k@nsO: Athens aTInz Bahrain $2 diff --git a/dictsource/hr_list b/dictsource/hr_list index 327473b6..c5f1b2d7 100644 --- a/dictsource/hr_list +++ b/dictsource/hr_list @@ -26,7 +26,7 @@ _s s@ š S@ t t@ v v@ -w dv'ost@-*UkovE +w dv'ost@-*Uko||v@ x iks y ipsilon z z@ @@ -76,7 +76,7 @@ _] z'atvo*,En&||'ugl&t& __ ts'r-t& _` g@-*'avIs _{ 'otvo*,En&||v'itItS,&st& -_| okom,It& +_| okom,Its& _} z'atvo*,En&||v'itItS,&st& @@ -148,7 +148,7 @@ s s_ $brk // Conjunctions a $u $pause // and i $u $pause // and -but $pause // but +ali $pause // but nego $pause // but ili $u $pause // or diff --git a/dictsource/hr_rules b/dictsource/hr_rules index 38b1db06..3b3f3d71 100644 --- a/dictsource/hr_rules +++ b/dictsource/hr_rules @@ -29,6 +29,7 @@ e E j) e e e (j e + ej (K eI .group f f f @@ -42,6 +43,7 @@ .group i i i + ij (K iI .group j j j @@ -67,6 +69,8 @@ .group o o o ou oU + oj (K oI + o (r 8 .group p p p @@ -96,6 +100,7 @@ .group u u u + uj (K wi .group v v v diff --git a/dictsource/no_list b/dictsource/no_list index 73aaad9a..a34d29e3 100755 --- a/dictsource/no_list +++ b/dictsource/no_list @@ -63,11 +63,11 @@ _7X s'yt:i: _8X 'Ot:i: _9X n'It:i: _0C h'u-:nd@-*e:d@2 +_1C 'Et||h'u-:nd@-*e:d@2 _0M1 t'u-:s@n -_1M2 m'Illi:;,u:n +_0M1 'Et||t'u-:s@n _0M2 m'Illi:;,u:n@r - - +_1M2 'e:n||m'Illi:;,u:n _0and u:g _dpt kOmmA @@ -79,7 +79,7 @@ _dpt kOmmA // articles en $u -et $u +et Et $u ei $u @@ -178,7 +178,7 @@ ikke $u // auxillary verbs (be, have, can, etc) være $u+ -er $u +er E:r $u var $u vært $u @@ -218,3 +218,4 @@ i i: $atend // MAIN WORD DICTIONARY //********************* + diff --git a/phsource/compile_report b/phsource/compile_report index 66747cdd..fd1d585f 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -20,7 +20,7 @@ pl 17 103 sk 25 120 cs 5 120 - hr 19 127 + hr 23 129 ru 36 120 it 28 112 es 6 112 @@ -45,16 +45,16 @@ 2 b/bo base hi 2 b/bu base hi 2 b/xb base hi - 14 d/d base fi fr hi hu pl ru it ro el sw - 15 d/d_ base fi fr hi hu pl ru it ro el sw + 15 d/d base fi fr hi hu pl hr ru it ro el sw + 16 d/d_ base fi fr hi hu pl hr ru it ro el sw 1 d/d_dnt hi - 16 d/dr base fi fr hi hu pl ru it ro el sw + 17 d/dr base fi fr hi hu pl hr ru it ro el sw 1 d/tap ro 2 d/tap1 base 2 d/tap2 base 2 d/tap3 base 1 d/tap_i ro - 12 d/xd base fi fr hi hu pl ru it ro el sw + 13 d/xd base fi fr hi hu pl hr ru it ro el sw 1 d/xd_dnt hi 2 d/xd_pzd pl ru 1 d/x_tap base @@ -245,7 +245,7 @@ 2 ustop/p_ base hi 1 ustop/percus10 base 8 ustop/pl base fi hi hu hr it ro - 9 ustop/pr base fi hi hu hr it ro + 8 ustop/pr base fi hi hu it ro 7 ustop/p_unasp base fi hi hu hr it ro 6 ustop/p_unasp_ fi hi hu hr it ro 2 ustop/t base hi @@ -319,6 +319,7 @@ 2 vdiph/eeu_3 en_n en_wm 1 vdiph/eey fi 6 vdiph/ei nl it pt is vi zh_yue + 1 vdiph/ei_2 hr 8 vdiph/eu en cy eo nl sk it pt vi 1 vdiph/eu_2 fi 2 vdiph/&i fi hi @@ -327,13 +328,13 @@ 3 vdiph/@i_3 en_wm ro zh_yue 1 vdiph/&i_3 vi 1 vdiph/@i_4 vi - 1 vdiph/ii ro + 2 vdiph/ii hr ro 1 vdiph/i#i ro 4 vdiph/oi en_wm de it vi 1 vdiph/oi_2 af 10 vdiph/ooi en en_n en_us en_rp cy eo fi no zh_yue 1 vdiph/ooi_2 af - 1 vdiph/ooi_3 en_wm + 2 vdiph/ooi_3 en_wm hr 2 vdiph/ou fi zh_yue 2 vdiph/ou_2 sk ro 1 vdiph/ou_3 is @@ -602,8 +603,8 @@ 5 w/xw base 20 x/b base hi ro is 2 x/b_ base is - 7 x/d base hi el is - 14 x/d_ base fi fr hi hu pl ru it ro el is sw + 9 x/d base hi hr el is + 15 x/d_ base fi fr hi hu pl hr ru it ro el is ++ 22 x/d_dnt base fi fr hi hu pl ru it ro sw 6 x/d_pzd pl ru 3 x/dzh base hi diff --git a/phsource/j/j_ b/phsource/j/j_ index 7dd6c1af51ebf5bddbbcc0119987d1153bbdd1a1..75804cd7011fdf681deee8dbbd3b7f48a7d850cd 100644 GIT binary patch delta 42 rcmeyu{)K&lHWN$FpSn{olvH!&JcZli>ryZ6;ObcE&2k3yi6Z zh71+|4>L?)Y+zXOPv`HqKYsth{{8)%{#Wm>|G%~W%m1JGFU{b{c!SZ5iJxUI^9rWT zO!t{qGoEC4%=nX0pWzw9MkYh1Q;hc*&i&u|@5sNyjBSjU{#yQLKn9!TnB$lyD=-TJ E0E~M)w*UYD diff --git a/phsource/vdiph/ooi_3 b/phsource/vdiph/ooi_3 index 4bbc558633bef9813b30bd1ddcb7f23d736df2cb..177854be1e89e9e44bbae666a96d38b85add2f6f 100644 GIT binary patch delta 392 zcmbRCk#XinM#10!SLcvm*FaVV28R6n%y{FCeCwnnuP`%+M=;4Ssc_F>Na4D{_ki&M zV+AiOW5njGQvbMEnBV{ZKl!?Y|(q3-3)0w&%x|HeD;jZ zd>QN@2QV-=`6)|3VA(8Sxm|Yh^;Gf6_rf?-7&zuJ&12fYn9V4`#K14Zw1lylt(9R3 z8-vgVptP%yPDFse?QuCCjC8dH)MN`xz+9& zpR};W;yEBCSb_!E9&`qeX3;Z_6!mMO~sTtVQ|EX}esN9_zQjUCczCPTLKy=o$>mNL*k958NT56&NFQE@&1 diff --git a/phsource/vowel/i_6 b/phsource/vowel/i_6 index 7bd29fa73f40877fbdef5a4755057764351df92d..ffc2973453e4869c2f54d286444415964ac2bb47 100644 GIT binary patch delta 100 zcmaED@!EnvIKb68B-k~OnSp^JGu~_?e-I0=24jNgO2&1Jteiy*2R7%i{AY#>{pZL6 c3RQ6+34P@#1q!wCAPL>(XafpO61d3?0N$D(j{pDw delta 100 zcmaED@!EnvIKb68B-k~OnSp^JGu~t)e-I0=1!IEfO2&1Jteiy*GdAb3{AY#>{pZL6 c3RQ6+34P@#1q!wCAPL>(XafpO61d3?0MrN{EdT%j diff --git a/src/compiledata.cpp b/src/compiledata.cpp index 9d7e84d5..d0c5d7aa 100755 --- a/src/compiledata.cpp +++ b/src/compiledata.cpp @@ -1954,7 +1954,7 @@ memset(markers_used,0,sizeof(markers_used)); if((f_errors = fopen_log(f_errors,fname,"w")) == NULL) f_errors = stderr; - sprintf(fname,"%s/%s",path_home,"phondata_manifest"); + sprintf(fname,"%s/%s",path_home,"phondata-manifest"); if((f_phcontents = fopen_log(f_phcontents,fname,"w")) == NULL) f_phcontents = stderr; diff --git a/src/spectseq.cpp b/src/spectseq.cpp index dc94bb52..5c67e626 100755 --- a/src/spectseq.cpp +++ b/src/spectseq.cpp @@ -967,7 +967,10 @@ void SpectSeq::MakeWave(int start, int end, PitchEnvelope &pitch) fname_speech = WavFileName(); OpenWaveFile2(fname_speech); - first=1; + first = 0; + if(start > 0) + first=1; // a selection, use fade-in + sp2 = NULL; for(ix=start; ix<=end; ix++) { diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index e546dcf2..a7d0eacc 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -479,10 +479,15 @@ Translator *SelectTranslator(const char *name) tr->langopts.spelling_stress = 1; tr->langopts.param[LOPT_COMBINE_WORDS] = 4; // combine some prepositions with the following word - tr->langopts.numbers = 0x1c0d + 0x84000; + // tr->langopts.numbers = 0x1c0d + 0x84000; + tr->langopts.numbers = 0x1c01 + 0x84000; + tr->langopts.thousands_sep = 0; //no thousands separator + tr->langopts.decimal_sep = ','; if(name2 == L('c','s')) + { tr->langopts.numbers2 = 0x8; // variant numbers before milliards + } SetLetterVowel(tr,'y'); SetLetterVowel(tr,'r'); diff --git a/src/translate.cpp b/src/translate.cpp index 2adbeb95..319d653b 100755 --- a/src/translate.cpp +++ b/src/translate.cpp @@ -1035,7 +1035,7 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne int first_phoneme = 1; int source_ix; int len; - int limit; + int sylimit; // max. number of syllables in a word to be combined with a preceding preposition char *new_language; unsigned char bad_phoneme[4]; @@ -1112,11 +1112,12 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne { flags = translator->TranslateWord(word, next_pause, wtab); - if((flags & FLAG_ALT2_TRANS) && ((limit = langopts.param[LOPT_COMBINE_WORDS]) > 0)) + if((flags & FLAG_ALT2_TRANS) && ((sylimit = langopts.param[LOPT_COMBINE_WORDS]) > 0)) { char *p2; int ok = 1; int flags2; + int c_word2; char ph_buf[N_WORD_PHONEMES]; // LANG=cs,sk @@ -1124,7 +1125,13 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne p2 = word; while(*p2 != ' ') p2++; - if(limit & 0x100) + utf8_in(&c_word2, p2+1, 0); // first character of the next word; + if(!iswalpha(c_word2)) + { + ok =0; + } + + if(sylimit & 0x100) { // only if the second word has $alt attribute strcpy(ph_buf,word_phonemes); @@ -1140,7 +1147,7 @@ int Translator::TranslateWord2(char *word, WORD_TAB *wtab, int pre_pause, int ne { *p2 = '-'; // replace next space by hyphen flags = translator->TranslateWord(word, next_pause, wtab); // translate the combined word - if(CountSyllables(p) > (limit & 0xf)) + if(CountSyllables(p) > (sylimit & 0xf)) { // revert to separate words *p2 = ' '; diff --git a/src/voices.cpp b/src/voices.cpp index 246ac9c5..235c89e0 100755 --- a/src/voices.cpp +++ b/src/voices.cpp @@ -1329,6 +1329,7 @@ espeak_ERROR SetVoiceByName(const char *name) espeak_VOICE *v; int variant=0; char *p; + char variant_name[20]; static char buf[60]; strncpy0(buf,name,sizeof(buf)); @@ -1339,10 +1340,18 @@ espeak_ERROR SetVoiceByName(const char *name) variant = atoi(p+1); } -// first check for a voice with this filename + // first check for a voice with this filename if(LoadVoice(buf,1) != NULL) { voice_selected = first_voice; + + if(variant > 0) + { + // apply a voice variant + sprintf(variant_name,"!variant%d",variant); + LoadVoice(variant_name,2); + } + WavegenSetVoice(voice); return(EE_OK); }