diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index 7cd5fe71..f45e460a 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -166,8 +166,8 @@ Wy y Y: yU * : ; b C d f g h j k l m n N n^ -p Q r s S S; t tS -v v2 w x z +p Q r s S t tS v +v2 w x z Dictionary no_dict @@ -214,11 +214,10 @@ Dictionary sk_dict l- l: o o: oU r- r: u u: -* ; b c d d; dZ f -g h j k l l^ m n -N n^ p r R R^ R^/ s -S t t; tS ts v x z -Z +* ; b d d; dZ f g +h j k l l^ m n N +n^ p r R R^ R^/ s S +t t; tS ts v x z Z Dictionary sv_dict @@ -254,7 +253,7 @@ s t t[ ts; v w z Dictionary zhy_dict -a aa aai aang aau ai au e +a aa aai aan aau ai au e ei eo eoi eu i iu o oe oi ong ou u ui yu @@ -346,7 +345,7 @@ u uai y : f j k kh l m n N p ph r R s s. S; -t th ts ts. ts.h tS; tS;h tsh +t th ts ts. ts. tS; tS; tsh v w x z z. diff --git a/dictsource/en_rules b/dictsource/en_rules index dee0a5e2..17d18a36 100644 --- a/dictsource/en_rules +++ b/dictsource/en_rules @@ -30,7 +30,7 @@ // ?8 Use full vowel, not schwa in some word endings .replace - ff f // ligature + ff ff // ligature fi fi fl fl diff --git a/dictsource/nl_list b/dictsource/nl_list index a6a7984a..047385b8 100644 --- a/dictsource/nl_list +++ b/dictsource/nl_list @@ -9,7 +9,7 @@ _s Es _t te: -_cap k'a:pita:l +_cap h'o:fdlEt@r _?A l'Et@r _?? s'imbo:l @@ -33,6 +33,27 @@ _tld t'Ild@ // punctuation _. p8nt +_, k'Oma: +_: d'8b@l@p,8nt +_; p'8ntkOm,a: +/ sl'As +_\ b'AkkslAs +_? v@-*'a:xte:k@n +_! 'Wyt@-*upt,e:k@n +_" 'a:nha:lInxste:k@n +@ 'a:p@nst,a:rt;@ +# h'Ekj@ +% p@-*o:s'Ent +_( h'a:kj@_|'o:pe:n@n +_) h'a:kj@sl'Wyt@n +_{ v'irkAnt@h,a:k +_} v'irkAnt@h,a:ksl'Wyt@n +_- k'OpElt,e:k@n ++ pl'8s +* st'E*rEt;@ +__ l'IgEntst@-*'e:pj@ +€ 'Y:*o:t,e:k@n + // numbers _0 n'8l @@ -47,8 +68,8 @@ _8 'Axt _9 n'e:x@n _10 t'in _11 'Elf -_12 tw'Alf -_13 d'e:rtin +_12 tw'a:lf +_13 d'Ertin _14 f'e:rtin _15 f'EIftin _16 z'Estin @@ -229,4 +250,5 @@ player _^_EN the _^_EN // pronunciation exceptions +eren I:*@n diff --git a/dictsource/nl_rules b/dictsource/nl_rules index 2cab58f6..10c08dbe 100644 --- a/dictsource/nl_rules +++ b/dictsource/nl_rules @@ -20,6 +20,7 @@ _) be (@P2 b@ _) b (ee+ b + _) be( ren bI: _) be (ter be: _) beu bY: @@ -56,8 +57,11 @@ ee e: eeuw eU eu Y: + @) el (_ @l + @) ele (_ @l@ @) en (_ @n @) er (_ @r + @) ere (_ @r@ @) eren (_ @r@n eau o: //words with French origin @@ -110,7 +114,7 @@ .group k - _) k (_ kA + _) k (_ ka: k k kk k @@ -177,7 +181,7 @@ _) s (_ Es s s ss s - sch S; + sch sx sj S @@ -231,9 +235,9 @@ .group éé e: + $ d'OlAr , (D k'Oma: - % pro:s'Ent - @ 'a:pEnst,a:rt;@ + __) - (_D m'In . p8nt . (. _: diff --git a/docs/commands.html b/docs/commands.html index c1e3abda..8e3ee35c 100644 --- a/docs/commands.html +++ b/docs/commands.html @@ -10,7 +10,7 @@

2.1 INSTALLATION


-(This section only applies to Linux and other Posix systems).
+

2.1.1 Linux and other Posix systems

There are two versions of the command line program. They both have the same command parameters (see below).
  1. espeak uses speech engine in the libespeak shared library. The libespeak library must first be installed. @@ -28,6 +28,24 @@ then that will be used instead. Some Linux distrubitions (eg. SuSe 10) have version 19 of PortAudio which has a slightly different API. The speak program can be compiled to use version 19 of PortAudio by copying the file portaudio19.h to portaudio.h before compiling.

    The speak program may be compiled without using PortAudio, by removing the line

       #define USE_PORTAUDIO
     
    in the file speech.h. +

     


    +

    2.1.2 Use with KDE Text-to-Speech (KTTS)

    +To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker +with "command for speaking texts" set to:
    + cat %f | espeak --stdin -w %w -v en -s190 +

    +In this example, "en" is the voice name, "190" is the speed. +

    +Note: +

    +

     


    +

    2.1.3 Windows

    +The installer: setup_espeak.exe installs the SAPI5 version of eSpeak. It also installs a command line program espeak in the espeak directory. +

     


    2.2 COMMAND OPTIONS


    @@ -42,19 +60,7 @@ Or just type
    followed by text on subsequent lines. Each line is spoken when RETURN is pressed.
    Use espeak -x to see the corresponding phoneme codes.

     


    -

    2.2.2 Use with KDE Text-to-Speech (KTTS)

    -To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker -with "command for speaking texts" set to:
    - cat %f | espeak --stdin -v en -w %w -

    -Note: -

    -

     


    -

    2.2.3 The Command Line Options

    +

    2.2.2 The Command Line Options

    espeak [options] ["text words"]
    @@ -170,11 +176,12 @@ Used with -w, it starts a new WAV file every <minutes& --voices [=<language code>]
    Lists the available voices.
    If =<language code> is present then only those voices which are suitable for that language are listed.
    ---voices=variant lists the voice variants (voice modifiers). +--voices=mbrola lists the voices which use mbrola diphone voices. These are not included in the --voices list
    +--voices=variant lists the voice variants (voice modifiers).

     


    -

    2.2.4 The Input Text

    +

    2.2.3 The Input Text

    HTML Input
    @@ -182,8 +189,9 @@ If the -m option is used to indicate marked-up text, then HTML can be spoken dir

    Phoneme Input
    -As well as plain text, phoneme mnemonics can be used in the text input to espeak. They are enclosed within double square brackets. Spaces are used to separate words and all stressed syllables must be marked explicitly.
    -   eg:   [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] +As well as plain text, phoneme mnemonics can be used in the text input to espeak. They are enclosed within double square brackets. Spaces are used to separate words and all stressed syllables must be marked explicitly.

    +   eg:   espeak -v en [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]]

    + ("This is some phonetic text input").

    diff --git a/phsource/compile_report b/phsource/compile_report index 1b9ed98d..3f0790ef 100644 --- a/phsource/compile_report +++ b/phsource/compile_report @@ -697,7 +697,7 @@ ustop/p_ [p] base [p2] fr [ph] hi [ph] zh -ustop/percus10 [(X1)] base +ustop/percus10 [(X1] base ustop/pl [p] base [p] base2 [p] fi @@ -790,7 +790,7 @@ ustop/tsh_ [tS] base ustop/t_short [t.] hi [t] sk [t] el -ustop/tsh_pzd [tS;h] zh +ustop/tsh_pzd [tS;] zh ustop/tsh_pzd_unasp [tS;] zh ustop/tsh_sr [tS] sr ustop/ts_pzd [tS;] base @@ -803,7 +803,7 @@ ustop/ts_pzd2 [c] hi [c] hu ustop/t_sr [d] sr [t] sr -ustop/ts_rfx [ts.h] zh +ustop/ts_rfx [ts.] zh ustop/ts_rfx_unasp [ts.] zh ustop/ts_sr [tS;] sr [dZ;] sr @@ -1779,7 +1779,7 @@ vwl_ru/u [u] ru vwl_ru/u# [u#] ru vwl_ru/u#u [u"] ru vwl_sv/r_sv3 [r] sv -vwl_zh/aang [aang] zhy +vwl_zh/aang [aan] zhy vwl_zh/aau [Au] zh vwl_zh/a_n [a] zh vwl_zh/ang [ang] zhy @@ -1790,7 +1790,7 @@ vwl_zh/ie [iE] zh vwl_zh/ing [ing] zhy vwl_zh/iou [iou] zh vwl_zh/ng [ng] zhy -vwl_zh/oeng [oeng] zhy +vwl_zh/oeng [oen] zhy vwl_zh/ong [ong] zhy vwl_zh/uaa [uA] zh vwl_zh/uai [uai] zh diff --git a/src/compiledict.cpp b/src/compiledict.cpp index c011195e..f2aace1e 100755 --- a/src/compiledict.cpp +++ b/src/compiledict.cpp @@ -396,7 +396,6 @@ static char nullstring[] = {0}; else { EncodePhonemes(phonetic,encoded_ph,bad_phoneme); -printf("Encode: [%s] = %.2x %.2x %.2x\n",phonetic,encoded_ph[0],encoded_ph[1],encoded_ph[2]); if(strchr(encoded_ph,phonSWITCH) != 0) { flag_codes[n_flag_codes++] = BITNUM_FLAG_ONLY_S; // don't match on suffixes (except 's') when switching languages diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 89597e2f..9e8fe475 100755 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -88,24 +88,23 @@ void strncpy0(char *to,const char *from, int size) } -// use the following macros for translation from little endian to host's endianness - +static int reverse_word_bytes(int word) +{//============================= + // reverse the order of bytes from little-endian to big-endian #ifdef ARCH_BIG -#define FIX_ENDIAN_USHORT(val) ((unsigned short) ( \ - (unsigned short) ((unsigned short) (val) >> 8) | \ - (unsigned short) ((unsigned short) (val) << 8))) - -#define FIX_ENDIAN_UINT(val) ((unsigned int) ( \ - (((unsigned int) (val) & (unsigned int) 0x000000ffU) << 24) | \ - (((unsigned int) (val) & (unsigned int) 0x0000ff00U) << 8) | \ - (((unsigned int) (val) & (unsigned int) 0x00ff0000U) >> 8) | \ - (((unsigned int) (val) & (unsigned int) 0xff000000U) >> 24))) + int ix; + int word2 = 0; + for(ix=0; ix<=24; ix+=8) + { + word2 = word2 << 8; + word2 |= (word >> ix) & 0xff; + } + return(word2); #else - -#define FIX_ENDIAN_USHORT(val) (val) -#define FIX_ENDIAN_UINT(val) (val) + return(word); #endif +} int LookupMnem(MNEM_TAB *table, char *string) @@ -179,7 +178,7 @@ int Translator::LoadDictionary(const char *name, int no_error) pw = (int *)data_dictlist; - length = FIX_ENDIAN_UINT(pw[1]); + length = reverse_word_bytes(pw[1]); if(size <= (N_HASH_DICT + sizeof(int)*2)) { @@ -187,10 +186,10 @@ int Translator::LoadDictionary(const char *name, int no_error) return(2); } - if((FIX_ENDIAN_UINT(pw[0]) != N_HASH_DICT) || + if((reverse_word_bytes(pw[0]) != N_HASH_DICT) || (length <= 0) || (length > 0x8000000)) { - fprintf(stderr,"Bad data: '%s' (%x %x)\n",fname,FIX_ENDIAN_UINT(pw[0]),length); + fprintf(stderr,"Bad data: '%s' (%x length=%x)\n",fname,reverse_word_bytes(pw[0]),length); return(2); } data_dictrules = &data_dictlist[length]; @@ -265,9 +264,9 @@ void Translator::InitGroups(void) pw = (unsigned int *)langopts.replace_chars; while(*pw != 0) { - *pw = FIX_ENDIAN_UINT(*pw); + *pw = reverse_word_bytes(*pw); pw++; - *pw = FIX_ENDIAN_UINT(*pw); + *pw = reverse_word_bytes(*pw); pw++; } #endif diff --git a/src/synthesize.cpp b/src/synthesize.cpp index bf00603a..f0b83457 100755 --- a/src/synthesize.cpp +++ b/src/synthesize.cpp @@ -82,7 +82,7 @@ const char *WordToString(unsigned int word) int ix; static char buf[5]; - for(ix=0; ix<4; ix++) + for(ix=0; ix<3; ix++) buf[ix] = word >> (ix*8); buf[4] = 0; return(buf); diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp index 12595c17..e55021b6 100644 --- a/src/tr_languages.cpp +++ b/src/tr_languages.cpp @@ -502,7 +502,6 @@ SetLengthMods(tr,3); // all equal SetLetterVowel(tr,'y'); tr->langopts.numbers = 0x11c19; - tr->langopts.accents = 1; memcpy(tr->stress_lengths,stress_lengths_nl,sizeof(tr->stress_lengths)); } break;