diff --git a/dictsource/fr_list b/dictsource/fr_list index c7e26130..e9e21d3a 100755 --- a/dictsource/fr_list +++ b/dictsource/fr_list @@ -109,7 +109,7 @@ _16 s'Ez _17 d'is:'Et _18 d'is:'w^it _19 d'is:n'@f -_20 v'E~ +_20 v'E~ _21 v'E~te:E~ _22 v'E~td'Y _23 v'E~t:tRw'a @@ -214,38 +214,38 @@ une $u $nounf // conjonctions -et e $u $pause -ou $u $pause -car $u $pause -soit $u $pause -mais $u $pause -ou u $u $pause -donc $u $pause -or $u $pause -ni $u $pause -car $u $pause -cependant $u $pause -néanmoins $u $pause -toutefois $u $pause +et e $u $brk +ou $u $brk +car $u $brk +soit $u $brk +mais $u $brk +ou u $u $brk +donc $u $brk +or $u $brk +ni $u $brk +car $u $brk +cependant $u $brk +néanmoins $u $brk +toutefois $u $brk -comme $u $pause -lorsque $u $pause -puisque $u $pause -quand $u $pause -que $u $pause -qui $u $pause -quoique $u $pause -si $u $pause +comme $u $brk +lorsque $u $brk +puisque $u $brk +quand $u $brk +que $u $brk +qui $u $brk +quoique $u $brk +si $u $brk -// (à cause que) $u $pause -// (ainsi que) $u $pause -// (à mesure que) $u $pause -// (après que) $u $pause -// (à moins que) $u $pause -// (au lieu que) $u $pause -// (aussitôt que) $u $pause -// (pendant que) $u $pause +// (à cause que) $u $brk +// (ainsi que) $u $brk +// (à mesure que) $u $brk +// (après que) $u $brk +// (à moins que) $u $brk +// (au lieu que) $u $brk +// (aussitôt que) $u $brk +// (pendant que) $u $brk // (pourvu que) $u $pause // pronouns @@ -284,7 +284,7 @@ vos $u+ leurs $u+ // prepositions -de $u $nounf +de $u $nounf du $u+ $nounf des dEz2 $u $nounf ?2 des dez2 $u+ $nounf @@ -294,21 +294,21 @@ des dEz2 $u $nounf au $u $brk aux $u $brk -dans $u+ $pause -sur $u+ $pause -par $u+ $pause -pour $u+ $pause +dans $u+ $brk +sur $u+ $brk +par $u+ $brk +pour $u+ $brk en $u+ $brk -(en effet) A~nEf'E $pause +(en effet) A~nEf'E $brk -vers $u+ $pause -avec $u+ $pause -sans $u+ $pause -sous $u+ $pause -entre $u+ $pause -contre $u+ $pause +vers $u+ $brk +avec $u+ $brk +sans $u+ $brk +sous $u+ $brk +entre $u+ $brk +contre $u+ $brk -durant $pause +durant $brk // negative ne $u @@ -386,6 +386,7 @@ echo Eko fils fis mars maRs pays pEi +pourcent purs'A~ sens sA~s c'est sEt2 $u qu'à ka diff --git a/dictsource/hr_rules b/dictsource/hr_rules index 92a92c20..f01f7760 100644 --- a/dictsource/hr_rules +++ b/dictsource/hr_rules @@ -83,7 +83,7 @@ .group r r R A) r (A R - K) r (A R + K) r (A @-* rr R r (_ R diff --git a/dictsource/hu_list b/dictsource/hu_list index 41852a89..f66e5740 100644 --- a/dictsource/hu_list +++ b/dictsource/hu_list @@ -88,9 +88,9 @@ ez $u // this // Conjunctions -és $u $pause // and -de $u $pause // but -vagy $u $pause // or +és $u $pause $strend2 // and +de $u+ $pause // but +vagy $u+ $pause // or mert $pause // because miatt $pause // because @@ -100,6 +100,9 @@ habár $pause // although ha $u $pause // if +// Prepositions etc. + + // Negative nem $u+ ne $u+ @@ -107,6 +110,7 @@ ne $u+ // Unstressed adverbs etc. néhány $u+ +is $u // ?? // Verbs diff --git a/dictsource/hu_rules b/dictsource/hu_rules index cf24986a..c44e953e 100644 --- a/dictsource/hu_rules +++ b/dictsource/hu_rules @@ -134,7 +134,7 @@ .group r r R - A) r (A R + A) r (A * C) r (A R r (C r rr R diff --git a/dictsource/no_rules b/dictsource/no_rules index a691a25e..3b3b114b 100644 --- a/dictsource/no_rules +++ b/dictsource/no_rules @@ -8,16 +8,17 @@ a A: a (C% A a (_ A - X) a (CCX A // single syllable with >= 2 final consonants + X) a (CCK A // single syllable with >= 2 final consonants + // or initial syllable with 3 consonants ai AI au aU aa o: // å aa (C% O - X) aa (CCX O + X) aa (CCK O ae a: // æ ae (C% a - X) ae (CCX a + X) ae (CCK a .group b @@ -45,7 +46,7 @@ .group e e e: e (C% E - X) e (CCX E + X) e (CCK E ei aI e (rC a // ?? &) e (_ @2 @@ -76,7 +77,7 @@ .group i i i: i (C% I - X) i (CCX I + X) i (CCK I &) ig (_ I .group j @@ -109,12 +110,12 @@ .group o o u: o (C% O - X) o (CCX O + X) o (CCK O oi OI oe Y: // ø oe (C% W - X) oe (CCX W + X) oe (CCK W oey Yy o (nd U @@ -164,7 +165,7 @@ .group u u u-: u (C% u- - X) u (CCX u- + X) u (CCK u- ui u-I .group v @@ -191,29 +192,29 @@ .group å å o: å (C% O - X) å (CCX O + X) å (CCK O .group æ æ E: æ (r a: æ (C% a - X) æ (CCX a + X) æ (CCK a .group ø ø Y: ø (C% W - X) ø (CCX W + X) ø (CCK W øy Yy .group ä ä E: ä (C% E - X) ä (CCX E + X) ä (CCK E .group ö ö Y: ö (C% W - X) ö (CCX W + X) ö (CCK W .group é 'e: diff --git a/phsource/compile_report b/phsource/compile_report index 3c296584..b836c7e7 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -438,16 +438,17 @@ 1 vowel/@_bck hi 13 vowel/e en en_n af cy eo fr hu hr it pt pt_pt vi 2 vowel/e# en_sc - 7 vowel/e_2 en_sc de hi hu sv no + 6 vowel/e_2 en_sc de hi sv no + 1 vowel/e_3 hu 1 vowel/e_5 en_sc 3 vowel/ee fr pl sv 2 vowel/e_e en_sc is 7 vowel/ee_1 en en_n pl it sv no zh_yue - 4 vowel/ee_2 en cy hu nl + 3 vowel/ee_2 en cy nl 1 vowel/ee#_2 sv 3 vowel/ee_3 af pt vi 3 vowel/ee_6 en_n sk sv - 11 vowel/e_mid en_rp en_wm fr_ca hi sk cs hr es pt_pt no is + 12 vowel/e_mid en_rp en_wm fr_ca hi hu sk cs hr es pt_pt no is 10 vowel/e_mid2 af de fi nl sk ro el sw 1 vowel/@_fnt hr 1 vowel/@_hgh no diff --git a/phsource/ph_hungarian b/phsource/ph_hungarian index 9f060f72..473a8a13 100644 --- a/phsource/ph_hungarian +++ b/phsource/ph_hungarian @@ -16,7 +16,7 @@ endphoneme phoneme E vowel starttype (e) endtype (e) length 130 - formants vowel/ee_2 + formants vowel/e_mid endphoneme phoneme e @@ -28,7 +28,7 @@ endphoneme phoneme e: vowel starttype (e) endtype (e) length 240 - formants vowel/e_2 + formants vowel/e_3 endphoneme phoneme A diff --git a/phsource/vowel/e_3 b/phsource/vowel/e_3 index 455d1314..c3c80bd0 100644 Binary files a/phsource/vowel/e_3 and b/phsource/vowel/e_3 differ diff --git a/phsource/vowelr/r-voc b/phsource/vowelr/r-voc index 4c441f58..ed441daf 100644 Binary files a/phsource/vowelr/r-voc and b/phsource/vowelr/r-voc differ diff --git a/src/espeakedit.cpp b/src/espeakedit.cpp index 05e240b5..570f5078 100755 --- a/src/espeakedit.cpp +++ b/src/espeakedit.cpp @@ -156,7 +156,10 @@ extern void VoiceReset(int control); // to something other than the default "C". Then, not only Latin1 but also the // other characters give the correct results with iswalpha() etc. if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL) - setlocale(LC_CTYPE,""); + { + if(setlocale(LC_CTYPE,"UTF-8") == NULL) + setlocale(LC_CTYPE,""); + } // Create the main frame window diff --git a/src/extras.cpp b/src/extras.cpp index 33c1d9e2..ec61d31e 100644 --- a/src/extras.cpp +++ b/src/extras.cpp @@ -858,12 +858,6 @@ void CharsetToUnicode(const char *charset) -char* text[]= -{ - "eSpeak.", - " normally would, " -}; - #ifdef deleted void Test2() @@ -908,6 +902,11 @@ int x; } #endif +char* text1[]= +{ + "eSpeak.", + " normally would, " +}; void TestTest(int control) {//======================= @@ -924,7 +923,7 @@ void TestTest(int control) //CharsetToUnicode("ISCII"); -return; +//return; if(control==2) { @@ -951,25 +950,18 @@ if(control==2) espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,100,NULL); espeak_SetSynthCallback(TestSynthCallback); -// espeak_SetUriCallback(TestUriCallback); - voice.languages = "fr"; - voice.gender = 0; - voice.age = 0; - voice.variant = 0; - ix = espeak_SetVoiceByName("pt-xx"); + unsigned int unique_identifier=0; + int index=0; + espeak_Synth(text1[index], strlen(text1[index])+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, NULL); - voice2 = espeak_GetCurrentVoice(); + espeak_SetParameter(espeakPUNCTUATION, 1, 0); + espeak_Synchronize(); + // espeak_Cancel(); + espeak_SetParameter(espeakPUNCTUATION, 1, 0); -// espeak_SetVoiceByProperties(&voice); - espeak_SetParameter(espeakRANGE,0,0); - espeak_Synth(textbuf,ix+1,0,POS_CHARACTER,0,espeakCHARS_8BIT+espeakSSML,NULL,NULL); - -// for(voice.variant = 1; voice.variant < 9; voice.variant++) -// { -// espeak_SetVoiceByProperties(&voice); -// espeak_Synth(textbuf,ix+1,0,POS_CHARACTER,0,espeakCHARS_8BIT+espeakSSML,NULL,NULL); -// } + index++; + espeak_Synth(text1[index], strlen(text1[index])+1, 0, POS_CHARACTER, 0, espeakSSML|espeakCHARS_UTF8, &unique_identifier, NULL); } diff --git a/src/readclause.cpp b/src/readclause.cpp index 32010b97..195baf17 100644 --- a/src/readclause.cpp +++ b/src/readclause.cpp @@ -286,7 +286,7 @@ static int GetC(void) break; } - if(((c2 & 0xc0) != 0x80) && ((c2 & m) != 0)) + if((c2 & 0xc0) != 0x80) { GetC_unget(c2); break; @@ -963,7 +963,7 @@ static int GetVoiceAttributes(wchar_t *pw, int tag_type) return(0); // or

without language spec, nothing to do ssml_sp = &ssml_stack[n_ssml_stack++]; - + attrcopy_utf8(ssml_sp->language,lang,sizeof(ssml_sp->language)); attrcopy_utf8(ssml_sp->voice_name,name,sizeof(ssml_sp->voice_name)); ssml_sp->voice_variant = attrnumber(variant,1,0)-1; diff --git a/src/speak.cpp b/src/speak.cpp index ee4b7964..844bf5c5 100755 --- a/src/speak.cpp +++ b/src/speak.cpp @@ -259,7 +259,10 @@ static int initialise(void) setlocale(LC_CTYPE,"ISO8859-1"); #else if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL) - setlocale(LC_CTYPE,""); + { + if(setlocale(LC_CTYPE,"UTF-8") == NULL) + setlocale(LC_CTYPE,""); + } #endif diff --git a/src/speak_lib.cpp b/src/speak_lib.cpp index 9b86cb13..de56a535 100644 --- a/src/speak_lib.cpp +++ b/src/speak_lib.cpp @@ -641,10 +641,13 @@ ESPEAK_API int espeak_Initialize(espeak_AUDIO_OUTPUT output_type, int buf_length // to something other than the default "C". Then, not only Latin1 but also the // other characters give the correct results with iswalpha() etc. #ifdef PLATFORM_RISCOS - setlocale(LC_CTYPE,"ISO8859-1"); + setlocale(LC_CTYPE,"ISO8859-1"); #else - if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL) - setlocale(LC_CTYPE,""); + if(setlocale(LC_CTYPE,"en_US.UTF-8") == NULL) + { + if(setlocale(LC_CTYPE,"UTF-8") == NULL) + setlocale(LC_CTYPE,""); + } #endif init_path(path); diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 166c8298..e8bed451 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.25.06 23.May.07"; +const char *version_string = "1.25.08 25.May.07"; const int version_phdata = 0x012501; int option_device_number = -1; diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index 75538dc1..4deeee54 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -325,7 +325,8 @@ Translator *SelectTranslator(const char *name) tr->langopts.vowel_pause = 0x10; tr->langopts.stress_rule = 0; - tr->langopts.stress_flags = 0x16; + tr->langopts.stress_flags = 0x36; + tr->langopts.unstressed_wd1 = 2; tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x4; // don't propagate over word boundaries tr->langopts.param[LOPT_IT_DOUBLING] = 1; tr->langopts.long_stop = 130; diff --git a/src/voices.cpp b/src/voices.cpp index c389fe59..adab327d 100755 --- a/src/voices.cpp +++ b/src/voices.cpp @@ -874,7 +874,7 @@ voice_t *LoadVoiceVariant(const char *vname, int variant) if((v != NULL) && (variant > 0)) { sprintf(buf,"!variant%d",variant); - LoadVoice(buf,2); + v = LoadVoice(buf,2); } return(v); } @@ -1038,8 +1038,9 @@ static int ScoreVoice(espeak_VOICE *voice_spec, int spec_n_parts, int spec_lang_ } // end of ScoreVoice -static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices) -{//========================================================================= +static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int control) +{//====================================================================================== +// control: bit0=1 include mbrola voices int ix; int score; int nv; // number of candidates @@ -1063,9 +1064,13 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices) nv = 0; for(ix=0; ixidentifier,"mb/",3) == 0)) + continue; + if((score = ScoreVoice(voice_select, n_parts, lang_len, voices_list[ix])) > 0) { - voices[nv++] = vp = voices_list[ix]; + voices[nv++] = vp; vp->score = score; } } @@ -1154,7 +1159,7 @@ espeak_VOICE *SelectVoice(espeak_VOICE *voice_select, int *variant) espeak_ListVoices(NULL); // create the voices list // select and sort voices for the required language - nv = SetVoiceScores(voice_select,voices); + nv = SetVoiceScores(voice_select,voices,0); if(nv == 0) { @@ -1441,7 +1446,7 @@ ESPEAK_API const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec) if(voice_spec) { // select the voices which match the voice_spec, and sort them by preference - SetVoiceScores(voice_spec,voices); + SetVoiceScores(voice_spec,voices,1); return((const espeak_VOICE **)voices); }