@@ -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. | |||
@@ -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 | |||
@@ -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 | |||
@@ -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 | |||
. (. _: |
@@ -10,7 +10,7 @@ | |||
<hr> | |||
<h2>2.1 INSTALLATION</h2> | |||
<hr> | |||
(This section only applies to Linux and other Posix systems).<br> | |||
<h3>2.1.1 Linux and other Posix systems</h3> | |||
There are two versions of the command line program. They both have the same command parameters (see below). | |||
<ol> | |||
<li><strong>espeak</strong> uses speech engine in the <strong>libespeak</strong> 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.<p> | |||
The speak program may be compiled without using PortAudio, by removing the line<pre> #define USE_PORTAUDIO | |||
</pre>in the file speech.h. | |||
<p> <hr> | |||
<h3>2.1.2 Use with KDE Text-to-Speech (KTTS)</h3> | |||
To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker | |||
with "command for speaking texts" set to:<br> | |||
<strong>cat %f | espeak --stdin -w %w -v en -s190</strong> | |||
<p> | |||
In this example, "en" is the voice name, "190" is the speed. | |||
<p> | |||
Note: | |||
<ul> | |||
<li>When used by the KTTS system, I noticed a slight background hiss with the speech, which is not present when I use <strong>espeak</strong> directly from the command line. This was because KDE sound default was set to "8 bits" rather than 16 bits.<p> | |||
<li>KTTSMgr breaks the text into sentences to pass to the speech engine, but it mistakenly assumes sentence breaks when dots follow abbreviations and therefore pauses after the dots in "eg. Mr. John B. Smith etc." Speaking a text file directly with <strong>espeak</strong> gives better results in this respect. | |||
</ul> | |||
<p> <hr> | |||
<h3>2.1.3 Windows</h3> | |||
The installer: <strong>setup_espeak.exe</strong> installs the SAPI5 version of eSpeak. It also installs a command line program <strong>espeak</strong> in the espeak directory. | |||
<p> <hr> | |||
<h2>2.2 COMMAND OPTIONS</h2> | |||
<hr> | |||
@@ -42,19 +60,7 @@ Or just type<br> | |||
followed by text on subsequent lines. Each line is spoken when | |||
RETURN is pressed.<br>Use <strong>espeak -x</strong> to see the corresponding phoneme codes. | |||
<p> <hr> | |||
<h3>2.2.2 Use with KDE Text-to-Speech (KTTS)</h3> | |||
To add to KDE-Text-to-Speech Manager (KTTSMgr), use it as a "Command" talker | |||
with "command for speaking texts" set to:<br> | |||
<strong>cat %f | espeak --stdin -v en -w %w</strong> | |||
<p> | |||
Note: | |||
<ul> | |||
<li>When used by the KTTS system, I noticed a slight background hiss with the speech, which is not present when I use <strong>espeak</strong> directly from the command line. This was because KDE sound default was set to "8 bits" rather than 16 bits. | |||
<li>KTTSMgr breaks the text into sentences to pass to the speech engine, but it mistakenly assumes sentence breaks when dots follow abbreviations and therefore pauses after the dots in "eg. Mr. John B. Smith etc." Speaking a text file directly with <strong>espeak</strong> gives better results in this respect. | |||
<li>Speaking text from a web page using KTTS often causes headings and image captions to be run together with the following text as a single sentence. Speaking the HTML directly with the <strong>-m</strong> option set (i.e. using <strong>espeak -m -f text.html</strong>), may help if this is a problem. | |||
</ul> | |||
<p> <hr> | |||
<h3>2.2.3 The Command Line Options</h3> | |||
<h3>2.2.2 The Command Line Options</h3> | |||
<dl> | |||
<dt> | |||
<strong>espeak [options] ["text words"]</strong><br> | |||
@@ -170,11 +176,12 @@ Used with <strong>-w</strong>, it starts a new WAV file every <code><minutes& | |||
<strong>--voices [=<language code>]</strong><br> | |||
<dd>Lists the available voices.<br> | |||
If =<language code> is present then only those voices which are suitable for that language are listed.<br> | |||
<code>--voices=variant</code> lists the voice variants (voice modifiers). | |||
<code>--voices=mbrola</code> lists the voices which use mbrola diphone voices. These are not included in the <code>--voices</code> list<br> | |||
<code>--voices=variant</code> lists the voice variants (voice modifiers).<br> | |||
</dl> | |||
<p> <hr> | |||
<h3>2.2.4 The Input Text</h3> | |||
<h3>2.2.3 The Input Text</h3> | |||
<dl> | |||
<dt><b>HTML Input</b> | |||
<dd> | |||
@@ -182,8 +189,9 @@ If the -m option is used to indicate marked-up text, then HTML can be spoken dir | |||
<p> | |||
<dt><b>Phoneme Input</b> | |||
<dd> | |||
As well as plain text, phoneme mnemonics can be used in the text input to <strong>espeak</strong>. They are enclosed within double square brackets. Spaces are used to separate words and all stressed syllables must be marked explicitly.<br> | |||
eg: <code> [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] </code> | |||
As well as plain text, phoneme mnemonics can be used in the text input to <strong>espeak</strong>. They are enclosed within double square brackets. Spaces are used to separate words and all stressed syllables must be marked explicitly.<p> | |||
eg: <code> espeak -v en [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] </code><p> | |||
("This is some phonetic text input"). | |||
</dl> | |||
</body> | |||
</b> |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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); |
@@ -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; |