diff --git a/dictsource/eo_list b/dictsource/eo_list index 2255f862..299e36c2 100644 --- a/dictsource/eo_list +++ b/dictsource/eo_list @@ -37,6 +37,7 @@ t.e t'e,e // Abbreviations a.k ,antaUk@-*'isto +a.k. ,antaUk@-*'isto akk alinome anst anstataU bea $abbrev @@ -48,6 +49,7 @@ n.b n'otu||b'one nro numeRo pĝ paZo p.k p,ostk@-*'isto +p.k. p,ostk@-*'isto uea $abbrev uk $abbrev diff --git a/dictsource/eo_rules b/dictsource/eo_rules index 1714040b..d997f885 100644 --- a/dictsource/eo_rules +++ b/dictsource/eo_rules @@ -123,9 +123,9 @@ _) r(_ Ro r R A) r (A R - C) r (A @-* + K) r (A @-* - -) ro (_ R%o + -) ro (_ R%o d-ro, n-ro .group s _) s(_ so diff --git a/dictsource/es_list b/dictsource/es_list index 2e41dcb5..3ed2dadd 100644 --- a/dictsource/es_list +++ b/dictsource/es_list @@ -1,16 +1,6 @@ // This file in UTF8 encoded -// Letters -// If a letter has a "word" pronunciation which is different from its -// "letter" name, then include the letter name here, with the letter -// prefixed by a _ character. -_a a -_o o -_y ,igr'iEQa - -_. punto - // numbers _0 TE*o @@ -27,7 +17,7 @@ _1X dj'ET _11 'onTe _12 d'oTe _13 t@-*'ETe -_14 kat'orTe +_14 kat'oRTe _15 k'inTe _20 v'eInte _2X v'eInt @@ -281,6 +271,19 @@ algunos $u alguna $u +// Letters +// If a letter has a "word" pronunciation which is different from its +// "letter" name, then include the letter name here, with the letter +// prefixed by a _ character. +_a a +a a $atend +_o o +o o $atend +_y ,ig@-*'iEQa +y ,ig@-*'iEQa $atend + +_. punto + // pronunciation exceptions diff --git a/dictsource/es_rules b/dictsource/es_rules index 54748ae2..454c2854 100644 --- a/dictsource/es_rules +++ b/dictsource/es_rules @@ -124,7 +124,7 @@ .group r _) r (_ E*e - r r + r R _) r R A) r (A * C) r (A @-* diff --git a/dictsource/hr_rules b/dictsource/hr_rules index 269b5355..38b1db06 100644 --- a/dictsource/hr_rules +++ b/dictsource/hr_rules @@ -76,10 +76,11 @@ qu kv .group r - r r + r R A) r (A * K) r (A @-* - rr *r + rr R + r (_ R K) r (K r- diff --git a/dictsource/it_list b/dictsource/it_list index 24e4c3f8..d90b47e6 100644 --- a/dictsource/it_list +++ b/dictsource/it_list @@ -2,49 +2,42 @@ // Italian: any [E] or [O] phonemes in unstressed words must be listed explicitly -// Letters -// If a letter has a "word" pronunciation which is different from its -// "letter" name, then include the letter name here, with the letter -// prefixed by a _ character. -_e e: -_i i: -_o O: // character names _cap k'apital _?? s'imbolo _! p'Untoesklamat'ivo -_" virgolet:e +_" viRgolet:e _# kantSellet:o -_$ dolla:ro -_% pertS'ento +_$ dolla:Ro +_% peRtS'ento _& _!e: -_' ap'Ostrofo -_( ap'ertapar'entezi -_) kj,Uzapar'entezi -_* asterisko +_' ap'OstRofo +_( ap'eRtapaR'entezi +_) kj,UzapaR'entezi +_* asteRisko _+ pjU -_, v'irgola -_- trat:ino +_, v'iRgola +_- t@-*at:ino _. pUnto _/ slaS _: d,Uep'Unte -_; p'Untoev'irgola -_< ap'erta'angolo +_; p'Untoev'iRgola +_< ap'eRta'angolo _= Ugwale _> kj,Uza'angolo _? p'UntointeRogat'ivo _@ ki'otS:ola -_[ ap'ertakw'adra +_[ ap'eRtakw'ad@-*a _\ bakslaS -_] kj,Uzakw'adra +_] kj,Uzakw'ad@-*a _^ kap:UtS:o -__ 'Underskore -_` bakpraIm -_{ ap'ertagr'af:a +__ 'UndeRskoRe +_` bakp@-*aIm +_{ ap'eRtag@-*'af:a _| b'aRa -_} kj,Uzagr'af:a +_} kj,Uzag@-*'af:a _~ tilde @@ -63,16 +56,16 @@ _9 n'Ove _10 di'etSi _11 'unditSi _12 d'oditSi -_13 tr'editSi -_14 kwat:'OrditSi +_13 t@-*'editSi +_14 kwat:'ORditSi _15 kw'imditSi _16 s'editSi _17 ditSas:'Et:e _18 ditS'Ot:o _19 ditSann'ove _2X v'ente -_3X tr'enta -_4X kwar'anta +_3X t@-*'enta +_4X kwaR'anta _5X tSinkw'anta _6X sess'anta _7X set:'anta @@ -83,11 +76,11 @@ _0M1 m'ila _1M1 m'ille _0M2 mili'oni _1M2 unmili'one -_0M3 mili'ardi -_1M3 unmili'ardo +_0M3 mili'aRdi +_1M3 unmili'aRdo _0M4 bili'oni _1M4 unbili'one -_dpt _v'irgola +_dpt _v'iRgola _0Z2 tSent'ezimi // 100ths _0Z3 mill'ezimi // 1000ths @@ -351,6 +344,17 @@ facevamo $u+ facevate $u+ facevano $u+ +// Letters +// If a letter has a "word" pronunciation which is different from its +// "letter" name, then include the letter name here, with the letter +// prefixed by a _ character. +_e e: +e e: $atend +_i i: +i i: $atend +_o O: +o O: $atend + // exceptions aereo $2 @@ -365,5 +369,5 @@ celsius tsElsj'us conoscerla $1 no nO posta pOsta -tesser tess'Er +tesser tess'ER uomini $1 diff --git a/dictsource/it_rules b/dictsource/it_rules index d06a2c31..c8df768f 100644 --- a/dictsource/it_rules +++ b/dictsource/it_rules @@ -220,7 +220,7 @@ .group r _) r(_ ER*e C) r @-* - r r + r R _) r R rr R* A) r (A R diff --git a/dictsource/no_list b/dictsource/no_list index ed4ddcc9..73aaad9a 100755 --- a/dictsource/no_list +++ b/dictsource/no_list @@ -35,11 +35,11 @@ z sEt // numeric //******** _0 n'Ul -_1 'E:n +_1 'e:n _2 t'u: _3 t@-*'e: _4 f'i:*E -_5 f'E:m +_5 f'e:m _6 s'Eks _7 S'u-: _8 'Ot:@2 diff --git a/dictsource/no_rules b/dictsource/no_rules index 0359a1dc..7bdef36f 100644 --- a/dictsource/no_rules +++ b/dictsource/no_rules @@ -86,13 +86,16 @@ .group l l l + ll (K l lj j .group m m m + mm (K m .group n n n + nn (K n ng N n (k N @@ -120,6 +123,7 @@ .group r r r + rr R K) r @-* A) r (A * r) r @@ -128,6 +132,7 @@ .group s s s ss ss + ss (_ s sch S sj S skj S @@ -154,6 +159,7 @@ .group v v v + vv (_ v .group w w v @@ -169,6 +175,7 @@ .group z z s zz z + zz (_ z .group å å o: diff --git a/dictsource/pt_rules b/dictsource/pt_rules index b4b8fcc5..76d9ead0 100755 --- a/dictsource/pt_rules +++ b/dictsource/pt_rules @@ -595,6 +595,10 @@ € 'eU*u § pa*'ag@-*,afu + D_) º %o // ordinal + D_) ª %a // ordinal + + // don't speak multiple occurances of these symbols , (D v'irgul& . p'oNtu diff --git a/phsource/compile_report b/phsource/compile_report index 71e23070..66747cdd 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -10,7 +10,7 @@ af 37 123 cy 30 118 de 28 115 - eo 15 104 + eo 16 104 fi 40 123 fr 33 115 fr_ca 11 115 @@ -20,7 +20,7 @@ pl 17 103 sk 25 120 cs 5 120 - hr 16 124 + hr 19 127 ru 36 120 it 28 112 es 6 112 @@ -176,18 +176,18 @@ 1 r2/r2i base 1 r2/r2o base 1 r2/r2u base - 8 r3/r_ base af cy eo fr pl ru it + 7 r3/r_ base af cy eo fr pl ru 1 r3/r_@ base 1 r3/r#_ is 1 r3/r_a base 1 r3/r_e base 1 r3/r_i base - 7 r3/r_n base cy eo fr pl ru it + 6 r3/r_n base cy eo fr pl ru 1 r3/r_o base - 1 r3/r_trill base - 1 r3/r_trill.wav base + 3 r3/r_trill base eo it + 3 r3/r_trill.wav base eo it 1 r3/r_u base - 30 r3/rx base af cy eo fr fr_ca pl ru it pt_pt ro is + 28 r3/rx base af cy eo fr fr_ca pl ru pt_pt ro is 2 r3/rz_cs sk 2 r3/@tap base 2 r3/@tap_i base @@ -199,10 +199,10 @@ 1 r/re base 1 r/ri base 1 r/ro base - 30 r/rr base af cy de eo fi nl pl ru it ro no ++ + 29 r/rr base af cy de eo fi nl pl ru it ro no ++ 1 r/ru base 15 r/tr base en_sc fr hu it - 60 r/trr base af cy de eo fi nl pl ru it ro sv ++ + 57 r/trr base af cy de eo fi nl pl ru it ro sv ++ 11 r/xr base 1 ufric/ch base 3 ufric/f base de ro @@ -232,6 +232,7 @@ 1 ufric/th_ base 2 ufric/x base vi 4 ufric/x2 af nl pt + 1 ufric/x_hr hr 1 ufric/xx hr 1 ustop/c base 5 ustop/k base en fr hi sw @@ -408,7 +409,7 @@ 1 vowel/3_2 en_n 1 vowel/3_3 en_rp 3 vowel/3_en en en_wm af - 1 vowel/@_4 nl + 2 vowel/@_4 nl hr 2 vowel/8_2 en_us sv 1 vowel/8_3 zh_yue 10 vowel/a en_n cy de hu nl pl sk hr @@ -447,10 +448,11 @@ 17 vowel/i en_n en_rp en_wm cy eo fr hu pl it pt pt_pt ro ++ 1 vowel/i# cy 3 vowel/i_2 de nl sv - 3 vowel/i_3 af sk hr + 2 vowel/i_3 af sk 4 vowel/i_4 fi hu it is 5 vowel/i_5 en_sc 3 vowel/i#_5 pt_pt ro + 1 vowel/i_6 hr 3 vowel/i_en en en_us vi 2 vowel/i_fnt hi 10 vowel/ii en_wm cy de fr_ca nl is zh_yue @@ -460,6 +462,7 @@ 6 vowel/ii_en en en_n 5 vowel/@_low hi ro no 8 vowel/o en en_wm de hi it pt_pt sv + 1 vowel/o- hr 4 vowel/o_2 cy hi hu no 2 vowel/o-_2 en_n en_wm 2 vowel/o_3 en_sc diff --git a/phsource/ph_croatian b/phsource/ph_croatian index c61048ec..48ade0f7 100644 --- a/phsource/ph_croatian +++ b/phsource/ph_croatian @@ -10,10 +10,16 @@ phoneme @2 // Schwa (raised) length 140 endphoneme +phoneme @3 // Schwa (raised) + vowel starttype (@) endtype (@) + formants vowel/@_4 + length 140 +endphoneme + phoneme a vowel starttype (a) endtype (a) - length 150 + length 160 formants vowel/a reduceto & 4 endphoneme @@ -50,7 +56,7 @@ endphoneme phoneme i vowel starttype (i) endtype (i) length 120 - formants vowel/i_3 + formants vowel/i_6 linkout ; reduceto I 4 endphoneme @@ -70,17 +76,23 @@ phoneme o formants vowel/oo_1 endphoneme +phoneme 8 + vowel starttype (o) endtype (o) + length 140 + formants vowel/o- +endphoneme + phoneme u vowel starttype (u) endtype (u) - length 130 + length 140 formants vowel/u_bck reduceto U 4 endphoneme phoneme U vowel starttype (u) endtype (u) - length 130 + length 140 formants vowel/uu_bck endphoneme @@ -117,7 +129,18 @@ phoneme x vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 length 100 lengthmod 3 - wave ufric/xx + wave ufric/x_hr%45 switchvoicing Q endphoneme +phoneme x2 // TEST + vls vel frc + vowelin f1=0 f2=2300 200 400 f3=-100 80 + vowelout f1=0 f2=2300 300 400 f3=-100 80 rms=20 + length 100 + lengthmod 3 + wave ufric/xx%120 + switchvoicing Q +endphoneme + + diff --git a/phsource/ph_esperanto b/phsource/ph_esperanto index b876911d..9bdd8125 100644 --- a/phsource/ph_esperanto +++ b/phsource/ph_esperanto @@ -108,6 +108,17 @@ phoneme r/ // used for [r] when not preceding a vowel after t r/trr p r/trr k r/trr endphoneme +phoneme R + liquid + vowelin f1=0 f2=1700 -300 300 f3=-300 80 + vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk + beforenotvowel r/ + formants r3/r_trill+r3/r_trill.wav%50 + trill + lengthmod 6 +endphoneme + + phoneme ts vls alv afr sibilant diff --git a/phsource/ph_italian b/phsource/ph_italian index f4de9edc..65077da1 100644 --- a/phsource/ph_italian +++ b/phsource/ph_italian @@ -151,8 +151,6 @@ phoneme r endphoneme - - phoneme R2 liquid starttype r endtype r length 100 @@ -166,17 +164,18 @@ phoneme R2 endphoneme -phoneme r/ // used for [r] when not preceding a vowel +phoneme R liquid - length 100 - lengthmod 2 // - formants r3/r_+r3/rx - before n r3/r_n+r3/rx - after _ r/rr - after t r/trr p r/trr k r/trr + vowelin f1=0 f2=1700 -300 300 f3=-300 80 + vowelout f1=2 f2=1700 -300 300 f3=-300 80 brk + beforenotvowel r/ + formants r3/r_trill+r3/r_trill.wav%50 + trill + lengthmod 6 endphoneme + phoneme w2 starttype w endtype w liquid diff --git a/phsource/ph_norwegian b/phsource/ph_norwegian index 1d9da9be..6024bc45 100644 --- a/phsource/ph_norwegian +++ b/phsource/ph_norwegian @@ -31,7 +31,7 @@ endphoneme phoneme i: vowel starttype (i) endtype (i) - length 210 + length 220 formants vowel/i after w w/wi2 linkout ; @@ -45,7 +45,7 @@ endphoneme phoneme y: vowel starttype (u) endtype (u) - length 240 + length 250 formants vowel/y_4 endphoneme @@ -57,7 +57,7 @@ endphoneme phoneme Y: vowel starttype (@) endtype (@) - length 240 + length 250 formants vwl_no/y# endphoneme @@ -71,7 +71,7 @@ endphoneme phoneme E: vowel starttype (e) endtype (e) - length 240 + length 250 formants vowel/ee_1 endphoneme @@ -90,7 +90,7 @@ endphoneme phoneme a: vowel starttype (a) endtype (a) - length 250 + length 270 formants vwl_no/& endphoneme @@ -102,7 +102,7 @@ endphoneme phoneme A: vowel starttype (a) endtype (a) - length 250 + length 280 formants vowel/aa endphoneme @@ -114,7 +114,7 @@ endphoneme phoneme o: vowel starttype (o) endtype (o) - length 240 + length 250 formants vowel/o_2 endphoneme @@ -126,7 +126,7 @@ endphoneme phoneme u: vowel starttype (u) endtype (u) - length 220 + length 230 formants vowel/u_bck endphoneme @@ -139,7 +139,7 @@ endphoneme phoneme u-: vowel starttype (u) endtype (u) - length 240 + length 250 formants vwl_no/u#2 endphoneme diff --git a/phsource/ph_swedish b/phsource/ph_swedish index cf6b9b77..9c9a0875 100644 --- a/phsource/ph_swedish +++ b/phsource/ph_swedish @@ -116,7 +116,7 @@ endphoneme phoneme A: vowel starttype (a) endtype (a) - length 240 + length 250 formants vowel/aa_4 endphoneme diff --git a/phsource/vowel/i_6 b/phsource/vowel/i_6 new file mode 100644 index 00000000..7bd29fa7 Binary files /dev/null and b/phsource/vowel/i_6 differ diff --git a/phsource/vowel/vowelchart.png b/phsource/vowel/vowelchart.png index fff04e87..de2e6417 100644 Binary files a/phsource/vowel/vowelchart.png and b/phsource/vowel/vowelchart.png differ diff --git a/src/compiledict.cpp b/src/compiledict.cpp index ee27e2a7..f3c1e072 100755 --- a/src/compiledict.cpp +++ b/src/compiledict.cpp @@ -655,7 +655,7 @@ void copy_rule_string(char *string, int &state) c = RULE_ALT1; break; case 'W': - c = 0x31; + c = RULE_SPELLING; break; case 'L': // expect two digits diff --git a/src/numbers.cpp b/src/numbers.cpp index 9cba8417..df752f33 100644 --- a/src/numbers.cpp +++ b/src/numbers.cpp @@ -71,7 +71,7 @@ int Translator::TranslateLetter(char *word, char *phonemes, int control) len = utf8_out(letter,&single_letter[2]); single_letter[2+len] = ' '; - next = 0x31; + next = RULE_SPELLING; if(word[n_bytes] == ' ') next = ' '; single_letter[3+len] = next; // follow by space-space if the end of the word, or space-0x31 diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 60e6f586..a6df6101 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,7 +35,7 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.24.09 13.May.07"; +const char *version_string = "1.24.10 14.May.07"; const int version_phdata = 0x012201; int option_device_number = -1; diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index 1bdeac79..e546dcf2 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -265,6 +265,47 @@ Translator *SelectTranslator(const char *name) } break; + + case L('h','r'): // Croatian + { + static const wchar_t replace_chars_hr[] = + {0x430,0x431,0x446,0x45b,0x447,0x434,0x452,0x45f, + 0x435,0x444,0x433,0x445,0x438,0x458,0x43a,0x43b, + 0x459,0x43c,0x43d,0x45a,0x43e,0x43f,0x440,0x441, + 0x448,0x442,0x443,0x432,0x437,0x436, + 0x453,0x455,0x45c,0}; // ѓ ѕ ќ + + static const unsigned int replacement_chars_hr[] = + {'a','b','c',0x107,0x10d,'d',0x111,'d'+(0x17e<<16), + 'e','f','g','h','i','j','k','l', + 'l'+('j'<<16),'m','n','n'+('j'<<16),'o','p','r','s', + 0x161,'t','u','v','z',0x17e, + 0x111,'d'+('z'<<16),0x107,0}; + + 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}; + + tr = new Translator(); + SetupTranslator(tr,stress_lengths_hr,stress_amps_hr); + tr->charset_a0 = charsets[2]; // ISO-8859-2 + + tr->langopts.stress_rule = 0; + tr->langopts.stress_flags = 0x10; + tr->langopts.param[LOPT_REGRESSIVE_VOICING] = 0x3; + tr->langopts.max_initial_consonants = 5; + tr->langopts.spelling_stress = 1; + + tr->langopts.numbers = 0x1c0d + 0x84000; + tr->langopts.numbers2 = 0xa; // variant numbers before thousands,milliards + tr->langopts.replace_chars = replace_chars_hr; + tr->langopts.replacement_chars = replacement_chars_hr; + + SetLetterVowel(tr,'y'); + SetLetterVowel(tr,'r'); + } + break; + + case L('h','u'): // Hungarian { static int stress_amps_hu[8] = {16,16, 20,20, 20,24, 24,22 }; @@ -422,24 +463,8 @@ Translator *SelectTranslator(const char *name) case L('s','k'): // Slovak case L('c','s'): // Czech - case L('h','r'): // Croatian { - static const wchar_t replace_chars_hr[] = - {0x430,0x431,0x446,0x45b,0x447,0x434,0x452,0x45f, - 0x435,0x444,0x433,0x445,0x438,0x458,0x43a,0x43b, - 0x459,0x43c,0x43d,0x45a,0x43e,0x43f,0x440,0x441, - 0x448,0x442,0x443,0x432,0x437,0x436, - 0x453,0x455,0x45c,0}; // ѓ ѕ ќ - - static const unsigned int replacement_chars_hr[] = - {'a','b','c',0x107,0x10d,'d',0x111,'d'+(0x17e<<16), - 'e','f','g','h','i','j','k','l', - 'l'+('j'<<16),'m','n','n'+('j'<<16),'o','p','r','s', - 0x161,'t','u','v','z',0x17e, - 0x111,'d'+('z'<<16),0x107,0}; - static int stress_amps_sk[8] = {16,16, 20,20, 20,24, 24,22 }; -// static int stress_lengths_sk[8] = {180,180, 200,200, 0,0, 210,220}; static int stress_lengths_sk[8] = {190,190, 210,210, 0,0, 210,210}; static char *sk_voiced = "bdgjlmnrvwzaeiouy"; @@ -455,17 +480,10 @@ Translator *SelectTranslator(const char *name) tr->langopts.param[LOPT_COMBINE_WORDS] = 4; // combine some prepositions with the following word tr->langopts.numbers = 0x1c0d + 0x84000; - if(name2 == L('h','r')) - { - tr->langopts.numbers2 = 0xa; // variant numbers before thousands,milliards - tr->langopts.replace_chars = replace_chars_hr; - tr->langopts.replacement_chars = replacement_chars_hr; - } if(name2 == L('c','s')) tr->langopts.numbers2 = 0x8; // variant numbers before milliards - SetLetterVowel(tr,'y'); SetLetterVowel(tr,'r'); SetLetterBits(tr,5,sk_voiced); diff --git a/src/translate.cpp b/src/translate.cpp index c4895cee..2adbeb95 100755 --- a/src/translate.cpp +++ b/src/translate.cpp @@ -1515,7 +1515,7 @@ void *Translator::TranslateClause(FILE *f_text, const void *vp_input, int *tone_ int c; int cc; unsigned int source_index=0; - unsigned int prev_source_index; + unsigned int prev_source_index=0; int prev_in; int prev_out=' '; int prev_out2; diff --git a/src/translate.h b/src/translate.h index 4ffe281a..31ec6d4d 100755 --- a/src/translate.h +++ b/src/translate.h @@ -123,6 +123,7 @@ #define RULE_IFVERB 26 // V #define RULE_LETTERGP 27 // L + letter group number #define RULE_ALT1 28 // word has $alt attribute +#define RULE_SPELLING 31 // while spelling letter-by-letter #define RULE_LAST_RULE 28 #define LETTERGP_A 0