From ec9796cb99b67e34668b9dbb0664985460da4b3a Mon Sep 17 00:00:00 2001 From: jonsd Date: Sat, 19 May 2007 01:24:45 +0000 Subject: [PATCH] [1.25] Enable exclamation intonation for lang=pt Lang=fr, [o],[O] more open. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@15 d46cf337-b52f-0410-862d-fd96e6ae7743 --- dictsource/en_list | 2 ++ dictsource/pt_list | 20 +++++++++++++++++--- dictsource/pt_rules | 15 ++++++++------- phsource/compile_report | 8 ++++---- phsource/ph_french | 5 +++-- src/compiledata.cpp | 19 +++++++++++++++++++ src/intonation.cpp | 4 +--- src/synthdata.cpp | 4 ++-- src/tr_languages.cpp | 1 + src/translate.cpp | 3 +++ 10 files changed, 60 insertions(+), 21 deletions(-) diff --git a/dictsource/en_list b/dictsource/en_list index 52b01cac..04a172c5 100644 --- a/dictsource/en_list +++ b/dictsource/en_list @@ -2517,6 +2517,8 @@ she's %Si:z $pastf we've %wi:v $pastf they've %DeIv $pastf +we'd %wi:d $pastf + I aI $u+ $verbf $only (I am) %aIa2m he %hi: $verbsf diff --git a/dictsource/pt_list b/dictsource/pt_list index 3c01bd11..168f96e7 100755 --- a/dictsource/pt_list +++ b/dictsource/pt_list @@ -1,4 +1,4 @@ - + // This file in UTF8 encoded // Options @@ -104,7 +104,7 @@ _8 'oItu ?2_11 'oNzi ?1_12 d'ozy ?2_12 d'ozi -?1_13 t:r'ezy +?1_13 tr'ezy ?2_13 t@-*'ezi ?1_14 k&t'orzy ?2_14 kat'Orzi @@ -202,6 +202,14 @@ unts $abbrev usb $abbrev +dr $dot +mr $dot +mrs $dot +prof pr'Of $dot +sr $dot +sra ,Es;'Errj'a $dot + + // articles o $u+ a $u+ @@ -578,6 +586,7 @@ roxo x'oSu ?1 doc d'Ok ?1 delete d'il'it ?1 design d,iz'ain +?1 dj d,i:dZ'eI ?1 down d'a,wn ?1 download d'a,wnl'oud ?1 end 'end @@ -609,7 +618,8 @@ layout l'eI,aUt ?1 pause p'au:z ?1 page p'eIdZ ?1 readme r'i:dmi: -?1 scanner sk'En&@ +?1 sapi s,ap'i +?1 scanner sk'En&r ?1 shift S'ift ?1 scroll sk:r'ol site s'aIt @@ -617,6 +627,8 @@ layout l'eI,aUt ?1 space sp'eIsy ?1 sporting sp'Ort,ing ?1 tab t'ab +?1 telemóvel t,El,Em'OvEl +?1 telemóveis t,El,Em'OveIS ?1 up &p ?1 upload &pl'oud ?1 window w'iNd'ou @@ -715,6 +727,7 @@ von f'On ?1 elton 'Elt&N ?1 halison &l'is&N klein kl'aIn // Very common on southern Brazil. +?1 kleverson kl'Evers&N krueger k@-*'iZer krüger k@-*'iZer kühl k'il @@ -730,3 +743,4 @@ volkmann f'Olkman + diff --git a/dictsource/pt_rules b/dictsource/pt_rules index 76d9ead0..23501e54 100755 --- a/dictsource/pt_rules +++ b/dictsource/pt_rules @@ -29,7 +29,7 @@ ?1 p) a (d_ =E a (CC_ & ?1 al (_ 'al // eg: Portugal, capital, etc. -//?1 al (C ''al // Algarve, alto, etc... +?1 _) a (lC ,a // Algarve, alto, etc... ?2 al (K aU ?2 alh alj @@ -103,7 +103,7 @@ c (c //drop “c” in European Portuguese (eg: seleccionar) ?1 A) ct t //drop “c” in European Portuguese (eg: exacto) ?1 A) cç s //drop “c” in European Portuguese (eg: selecção) -?1 conta) ct ct +?1 conta) ct (A kt // eg: contacto, contactar, contactável, incontactável, etc... .group d @@ -441,24 +441,24 @@ _) r (_ 'Exe _) r (_\$ xe'aU // currency r r -?1 A) r (A :r +?1 A) r (A r ?2 A) r (A * -?1 A) r (_A :r +?1 A) r (_A r ?2 A) r (_A * rr x -?1 C) r (A :r +?1 C) r (A r ?2 C) r (A @-* _) r x l) r x n) r x s) r x -?1 A) r (_ =@- //now, tis sound isn’t perfect but is is acceptable. +?1 A) r (_ r // this letter is imperfect. .group s ?1 _) s (_W Es|; within an acronym [s]+[;] not [s;] phoneme ?1 _) s (_ Es -?2 _) s (_ Ese +?2 _) s (_ 'Ese s s ss s sc (Y s @@ -632,3 +632,4 @@ + diff --git a/phsource/compile_report b/phsource/compile_report index 5cd82796..87e8c529 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -462,17 +462,17 @@ 2 vowel/ii_4 en_rp 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 + 9 vowel/o en en_wm de fr hi it pt_pt sv 4 vowel/o_2 cy hi hu no 2 vowel/o-_2 en_n en_wm 2 vowel/o_3 en_sc 1 vowel/o-_3 en_rp - 2 vowel/o_4 en_n fr - 2 vowel/o_6 fr nl + 1 vowel/o_4 en_n + 1 vowel/o_6 nl 4 vowel/oe en af de fr 1 vowel/oe_2 no 1 vowel/oe_4 sv - 2 vowel/o_mid hu ro + 3 vowel/o_mid fr hu ro 8 vowel/oo en_sc de eo es el sv no zh_yue 11 vowel/oo_1 en_n en_rp en_wm af fi sk hr vi 3 vowel/oo_2 en_sc cy cs diff --git a/phsource/ph_french b/phsource/ph_french index 2cef5f57..f73c4145 100644 --- a/phsource/ph_french +++ b/phsource/ph_french @@ -50,14 +50,14 @@ endphoneme phoneme o vowel starttype (o) endtype (o) length 160 - formants vowel/o_4 + formants vowel/o endphoneme phoneme O vowel starttype (o) endtype (o) length 170 - formants vowel/o_6 + formants vowel/o_mid endphoneme @@ -288,3 +288,4 @@ endphoneme + diff --git a/src/compiledata.cpp b/src/compiledata.cpp index 5224086c..1577ad27 100755 --- a/src/compiledata.cpp +++ b/src/compiledata.cpp @@ -1825,6 +1825,25 @@ void Compile::Report(void) } +#ifdef PLATFORM_WINDOWS +int strcasecmp(const char *s1, const char *s2) +{ + int ix=0; + int diff; + + for(;;) + { + if((diff = (tolower(s1[ix]) - tolower(s2[ix]))) != 0) + return(diff); + + if((s1[ix] == 0) || (s2[ix] == 0)) + return(diff); + + ix++; + } +} +#endif + static int ph_sorter(char **a, char **b) {//====================================== diff --git a/src/intonation.cpp b/src/intonation.cpp index e9bbda73..e0526418 100755 --- a/src/intonation.cpp +++ b/src/intonation.cpp @@ -267,9 +267,7 @@ static TONE_TABLE tone_table[N_TONE_TABLE] = { {PITCHfrise, 38,10, PITCHfrise2, 36,10, // comma, or question 20, 25, 34, 20, drops_0, 3, 3, 15, 25, 0}, -// {PITCHdrop, 38, 1, PITCHdrop, 42,25, // exclamation -// 20, 25, 34, 22, drops_0, 3, 3, 12, 8, 0}, - {PITCHfall, 30, 5, PITCHfall, 30, 7, // statement + {PITCHdrop, 38, 1, PITCHdrop, 42,25, // exclamation 20, 25, 34, 22, drops_0, 3, 3, 12, 8, 0}, diff --git a/src/synthdata.cpp b/src/synthdata.cpp index 4e65d386..709b2d90 100755 --- a/src/synthdata.cpp +++ b/src/synthdata.cpp @@ -35,8 +35,8 @@ #include "translate.h" #include "wave.h" -const char *version_string = "1.24.12 18.May.07"; -const int version_phdata = 0x012201; +const char *version_string = "1.25 20.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 59250721..a0f0ddee 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -433,6 +433,7 @@ Translator *SelectTranslator(const char *name) tr->langopts.stress_rule = 3; // stress on final syllable tr->langopts.stress_flags = 0x6 | 0x10; tr->langopts.numbers = 0xa69 + 0x2000; + tr->punct_to_tone[0][3] = 2; // use exclamation intonation } break; diff --git a/src/translate.cpp b/src/translate.cpp index 319d653b..3965febb 100755 --- a/src/translate.cpp +++ b/src/translate.cpp @@ -426,6 +426,7 @@ Translator::Translator() langopts.decimal_sep = '.'; memcpy(punct_to_tone,punctuation_to_tone,sizeof(punct_to_tone)); + punct_to_tone[0][3] = 0; // exclamation, use period until we can improve the exclamation intonation } @@ -1507,8 +1508,10 @@ int Translator::TranslateChar(char *ptr, int prev_in, int c, int next_in, int *i *insert = (new_c >> 16); new_c &= 0xffff; } +#ifndef PLATFORM_RISCOS if(upper_case) new_c = towupper(new_c); +#endif return(new_c); } }