git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@329 d46cf337-b52f-0410-862d-fd96e6ae7743master
ts v x z | ts v x z | ||||
Dictionary en_dict 2013-03-19 | |||||
Dictionary en_dict 2013-03-20 | |||||
0 0# 3 3: @ @- @2 @5 | 0 0# 3 3: @ @- @2 @5 | ||||
@L a a# A: A@ aa aI aI3 | @L a a# A: A@ aa aI aI3 | ||||
x z Z | x z Z | ||||
Dictionary es_dict 2012-09-11 | |||||
Dictionary es_dict 2013-03-19 | |||||
@ a aI aU e E eI eU | @ a aI aU e E eI eU | ||||
i o O oI u | i o O oI u | ||||
tS v z Z z2 z3 | tS v z Z z2 z3 | ||||
Dictionary ga_dict 2013-03-11 | |||||
Dictionary ga_dict 2013-03-20 | |||||
0 0# @ a a# A: aI aI# | 0 0# @ a a# A: aI aI# | ||||
aU aU# e E E# e: i I | |||||
i: i@ o O O# o: u U | |||||
U# u1 u: u@ | |||||
aU aU# e E E# e: eI i | |||||
I i: i@ o O O# o: u | |||||
U U# u1 u: u@ | |||||
: ; b c C d d[ dZ | : ; b c C d d[ dZ | ||||
f g h j k l m n | f g h j k l m n | ||||
tS v z Z | tS v z Z | ||||
Dictionary hu_dict 2013-03-18 | |||||
Dictionary hu_dict 2013-03-21 | |||||
a A a: e E e: i i: | a A a: e E e: i i: | ||||
o o: u u: Y y y: Y: | o o: u u: Y y y: Y: | ||||
t.# v w x z | t.# v w x z | ||||
Dictionary nl_dict 2013-03-17 | |||||
Dictionary nl_dict 2013-03-21 | |||||
8 @ @- a A a: A~ e | 8 @ @- a A a: A~ e | ||||
E e# E2 e: EI eU i I | E e# E2 e: EI eU i I |
// use the $accent attribute here to force the use of the | // use the $accent attribute here to force the use of the | ||||
// accent table when speaking the name of the character. | // accent table when speaking the name of the character. | ||||
à $accent $atend // this can be a word | à $accent $atend // this can be a word | ||||
á $accent $atend | |||||
ç $accent | ç $accent | ||||
é $accent | é $accent | ||||
ê $accent | ê $accent | ||||
Kosovo k0s@voU | Kosovo k0s@voU | ||||
Kuala kwA:la# | Kuala kwA:la# | ||||
Lagos leIg0s | Lagos leIg0s | ||||
Lebanon lEba#n@n | |||||
Lebanon lEb@n0n | |||||
Leipzig laIpsIg | Leipzig laIpsIg | ||||
Leone li:'oUn | Leone li:'oUn | ||||
Lesotho l@s'u:tu: | Lesotho l@s'u:tu: | ||||
(would have) w%Udh%a#v $pastf | (would have) w%Udh%a#v $pastf | ||||
(would have) wUdhav $pastf $atend | (would have) wUdhav $pastf $atend | ||||
(would have to) wUdhavt@5 $u2 $verbf $strend2 | (would have to) wUdhavt@5 $u2 $verbf $strend2 | ||||
(wouldn't have) wUdnt@v $u1 $pastf $strend2 | |||||
(wouldn't have to) ,wUdntavt@5 $verbf $strend2 | |||||
(wouldn't have) wUd@-nt@v $u1 $pastf $strend2 | |||||
(wouldn't have to) ,wUd@-ntavt@5 $verbf $strend2 | |||||
won't woUnt $u+ $verbf $strend2 $only | won't woUnt $u+ $verbf $strend2 $only | ||||
wouldst $u+ | wouldst $u+ | ||||
(won't have) woUnta#v $pastf $u1 | (won't have) woUnta#v $pastf $u1 | ||||
(must have) mVsta#v $pastf $1 | (must have) mVsta#v $pastf $1 | ||||
(must have) mVsthav $pastf $atend | (must have) mVsthav $pastf $atend | ||||
(must have to) m,Vstavt@5 $pastf | (must have to) m,Vstavt@5 $pastf | ||||
mustn't mVsnt $verbf | |||||
(mustn't have) mVsntha#v $pastf $u1+ | |||||
(mustn't have to) m'Vsnthavt@5 $pastf | |||||
mustn't mVs@-nt $verbf | |||||
(mustn't have) mVs@-ntha#v $pastf $u1+ | |||||
(mustn't have to) m'Vs@-nthavt@5 $pastf | |||||
shall ,Sal $verbf $only $strend2 | shall ,Sal $verbf $only $strend2 | ||||
shalt ,Salt $verbf $only | shalt ,Salt $verbf $only | ||||
should ,SUd $verbf $only $strend2 | should ,SUd $verbf $only $strend2 | ||||
(should have) SUd@v $pastf $u1+ | (should have) SUd@v $pastf $u1+ | ||||
(should have to) SUdhavt@5 $u2 $verbf $strend2 | (should have to) SUdhavt@5 $u2 $verbf $strend2 | ||||
shouldn't ,SUdnt $verbf $strend2 $only | |||||
(shouldn't have) SUdnth@v $pastf $u1+ | |||||
(shouldn't have to) 'SUdntavt@5 $verbf $strend2 | |||||
shouldn't ,SUd@-nt $verbf $strend2 $only | |||||
(shouldn't have) SUd@-nth@v $pastf $u1+ | |||||
(shouldn't have to) 'SUd@-ntavt@5 $verbf $strend2 | |||||
shalln't ,SA:nt $verbf $strend2 | shalln't ,SA:nt $verbf $strend2 | ||||
shan't ,SA:nt $verbf $strend2 | shan't ,SA:nt $verbf $strend2 | ||||
(could have) ,kUda#v $pastf | (could have) ,kUda#v $pastf | ||||
(could have) kUdhav $pastf $atend | (could have) kUdhav $pastf $atend | ||||
(could have to) kUdhavt@5 $u2 $verbf $strend2 | (could have to) kUdhavt@5 $u2 $verbf $strend2 | ||||
couldn't ,kUd@nt $verbf $strend2 | |||||
(couldn't have) kUd@nt@v $pastf $u1+ | |||||
(couldn't have to) 'kUd@ntavt@5 $verbf $strend2 | |||||
couldn't ,kUd@-nt $verbf $strend2 | |||||
(couldn't have) kUd@-nt@v $pastf $u1+ | |||||
(couldn't have to) 'kUd@-ntavt@5 $verbf $strend2 | |||||
may meI $verbf $strend2 | may meI $verbf $strend2 | ||||
(may have) meIha#v $pastf $u1+ | (may have) meIha#v $pastf $u1+ | ||||
(had it) h,adI2t | (had it) h,adI2t | ||||
(had them) h,adDEm | (had them) h,adDEm | ||||
having ,havIN $strend2 $pastf $only | having ,havIN $strend2 $pastf $only | ||||
haven't hav@nt $pastf | |||||
hadn't had@nt $pastf | |||||
hasn't haz@nt $pastf | |||||
haven't hav@-nt $pastf | |||||
hadn't had@-nt $pastf | |||||
hasn't haz@-nt $pastf | |||||
get %gEt $strend2 $pastf $only | get %gEt $strend2 $pastf $only | ||||
getting ,gEtIN $strend2 $pastf $only | getting ,gEtIN $strend2 $pastf $only | ||||
her h3: $u $nounf $only | her h3: $u $nounf $only | ||||
hers h3:z $u $strend2 | hers h3:z $u $strend2 | ||||
its Its $u $nounf | its Its $u $nounf | ||||
our aU@ $u $nounf $onlys | |||||
?3 our aU3 $u $nounf $onlys | |||||
our aU@ $u $nounf $only | |||||
?3 our aU3 $u $nounf $only | |||||
your jO@ $u $nounf $only | your jO@ $u $nounf $only | ||||
?6 your jU@ $u $nounf $only | ?6 your jU@ $u $nounf $only | ||||
their De@ $u $nounf $only | their De@ $u $nounf $only |
nk Nk | nk Nk | ||||
?7 nk nk // ?? Scottish | ?7 nk nk // ?? Scottish | ||||
n (kn n | n (kn n | ||||
n't nt | |||||
n't @-nt | |||||
A) n't nt | |||||
E) n (_ @n | E) n (_ @n | ||||
B) n (_ @n | B) n (_ @n | ||||
g) n (ing+ n | g) n (ing+ n | ||||
pro (vid pr@ | pro (vid pr@ | ||||
pro (viden pr0 | pro (viden pr0 | ||||
pro (vis pr@ | pro (vis pr@ | ||||
pro (voc pr@ | |||||
pro (voc pr%0# | |||||
pro (vok pr@ | pro (vok pr@ | ||||
pro (sec pr0 | pro (sec pr0 | ||||
pro (fil proU | pro (fil proU | ||||
χ tS'aI_ | χ tS'aI_ | ||||
ψ ps'aI_ | ψ ps'aI_ | ||||
ω 'oUmIg@_ | ω 'oUmIg@_ | ||||
?3 ω oUm'eIg@_ | |||||
ώ 'oUmIg@_ | ώ 'oUmIg@_ | ||||
ό 'oUmIkr0n_ | ό 'oUmIkr0n_ | ||||
é 'e||aTEntw'aDa | é 'e||aTEntw'aDa | ||||
í 'i||aTEntw'aDa | í 'i||aTEntw'aDa | ||||
_ó 'o||aTEntw'aDa | _ó 'o||aTEntw'aDa | ||||
ó 'o||aTEntw'aDa $atend | |||||
ú 'u||aTEntw'aDa | ú 'u||aTEntw'aDa | ||||
ü ,uDj'ErEsis | ü ,uDj'ErEsis | ||||
z zEd | z zEd | ||||
_á eI||f0d[@ | _á eI||f0d[@ | ||||
_é i:||f0d[@ | _é i:||f0d[@ | ||||
_í aI||f0d[@ | |||||
_ó o:||f0d[@ | _ó o:||f0d[@ | ||||
_ú ju:||f0d[@ | _ú ju:||f0d[@ | ||||
_#32 spA:s | _#32 spA:s | ||||
_cap m'o:r | |||||
// accent names | // accent names | ||||
vé) d (jeggy d | vé) d (jeggy d | ||||
své) d (zseb d | své) d (zseb d | ||||
csalá) d (szer d | csalá) d (szer d | ||||
szaba) d (sajt d | |||||
.group dz | .group dz | ||||
fogó) dz (kod ts | fogó) dz (kod ts | ||||
szabad) ítsz its: | szabad) ítsz its: | ||||
sz) í (vemészt i: | sz) í (vemészt i: | ||||
vesz) ítsz i:ts: | vesz) ítsz i:ts: | ||||
progressz) í (ve i: | |||||
sz) í (vemel i: | |||||
sz) í (vere i: | |||||
sz) í (veré i: | |||||
sz) í (verő i: | |||||
sz) í (vevő i: | |||||
progressz) í (ve i: | |||||
sz) í (vemel i: | |||||
sz) í (vere i: | |||||
sz) í (veré i: | |||||
sz) í (verő i: | |||||
sz) í (vevő i: | |||||
.group j | .group j | ||||
j j | j j | ||||
kolbászo) s S | kolbászo) s S | ||||
feldolgozá) s S | feldolgozá) s S | ||||
_ki) s (szín S | _ki) s (szín S | ||||
kérdé) s S | |||||
kérdé) s S | |||||
végzé) s S | |||||
.group ss | .group ss | ||||
ssz ss2 | ssz ss2 | ||||
visszaélé) ssz Ss | visszaélé) ssz Ss | ||||
esé) ssz (erű Ss | esé) ssz (erű Ss | ||||
webe) ssz Ss | webe) ssz Ss | ||||
beleve) ssz (en s: | |||||
beleve) ssz (en s: | |||||
.group sz | .group sz |
tegennatuur $4 | tegennatuur $4 | ||||
travestie $3 | travestie $3 | ||||
verderop $3 | verderop $3 | ||||
verre vEr@ | |||||
verrekijker vEr@kEIk@r | |||||
verste vErst@ | |||||
verte vErt@ | |||||
volledig $2 | volledig $2 | ||||
vrouwengek $alt3 | vrouwengek $alt3 | ||||
waarschijnlijk $2 | waarschijnlijk $2 |
nd) es (_S1 s | nd) es (_S1 s | ||||
rd) es (_S1 s | rd) es (_S1 s | ||||
gt) es (_S1 s | gt) es (_S1 s | ||||
wt) es (_S1 s | |||||
es (ie_ e:z | es (ie_ e:z | ||||
@) essen (_S5qd 'Es@n | @) essen (_S5qd 'Es@n | ||||
@) eres (_S4qd @r'Es | @) eres (_S4qd @r'Es | ||||
u (x 8 | u (x 8 | ||||
uu y | uu y | ||||
ui Wy | ui Wy | ||||
uw yU | |||||
uw (_ yU | |||||
uw (A yw | |||||
uw (K yU | |||||
_) uit (@P3 'Wyt | _) uit (@P3 'Wyt | ||||
uul (_ 'yl // from -ule | uul (_ 'yl // from -ule | ||||
_) ver (@P3 v@r | _) ver (@P3 v@r | ||||
_) ver (sie_ vEr | _) ver (sie_ vEr | ||||
_) verder vErd@r | _) verder vErd@r | ||||
_) verge (@P5 vErg@ | |||||
_) verge (le v@rQ'e: | _) verge (le v@rQ'e: | ||||
_) voort (@P5 v'O:rt | _) voort (@P5 v'O:rt | ||||
The speak program may be compiled without using PortAudio, by removing the line<pre> #define USE_PORTAUDIO | The speak program may be compiled without using PortAudio, by removing the line<pre> #define USE_PORTAUDIO | ||||
</pre>in the file speech.h. | </pre>in the file speech.h. | ||||
<p> <hr> | <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. | |||||
<h3>2.1.2 Windows</h3> | |||||
The installer: <strong>setup_espeak.exe</strong> installs the SAPI5 version of eSpeak. | |||||
During installation you need to specify which voices you want to appear in SAPI5 voice menus. | |||||
<p> | |||||
It also installs a command line program <strong>espeak</strong> in the espeak program directory. | |||||
<p> <hr> | <p> <hr> | ||||
<h2>2.2 COMMAND OPTIONS</h2> | <h2>2.2 COMMAND OPTIONS</h2> | ||||
<p> | <p> | ||||
<dt><strong>--ipa</strong><br> | <dt><strong>--ipa</strong><br> | ||||
<dd> | <dd> | ||||
Writes phonemes to stdout, using the International Phonetic Alphabet (IPA). | |||||
Writes phonemes to stdout, using the International Phonetic Alphabet (IPA).<br> | |||||
If a phoneme name contains more than one letter (eg. [tS]) an optional parameter can be used to distinguish | |||||
this from separate phonemes. | |||||
<br> | |||||
<code>--pho=1 </code> Use a tie character (U+0361) before subsequence letters. | |||||
<br> | |||||
<code>--pho=2 </code> Use a zero-width-joiner (U+200D) before subsequent letters. | |||||
<p> | <p> | ||||
<dt><strong>--path [="<directory path>"]</strong><br> | <dt><strong>--path [="<directory path>"]</strong><br> | ||||
<dd> | <dd> |
<td><strong>f</strong></td> | <td><strong>f</strong></td> | ||||
<td>the suffix means the next word is likely to be a verb.</td> | <td>the suffix means the next word is likely to be a verb.</td> | ||||
</tr> | </tr> | ||||
<tr> | |||||
<td><strong>m</strong></td> | |||||
<td>after this suffix has been removed, additional suffixes may be removed.</td> | |||||
</tr> | |||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</ul> | </ul> |
The tables of the phonemes used by each language, with their properties and sound production. | The tables of the phonemes used by each language, with their properties and sound production. | ||||
<h3><A href="intonation.html">Intonation</A></h3> | <h3><A href="intonation.html">Intonation</A></h3> | ||||
Different intonation "tunes" may be defined for different languages for clauses which end in full-stop, comma, question-mark, and exclamation-mark. | Different intonation "tunes" may be defined for different languages for clauses which end in full-stop, comma, question-mark, and exclamation-mark. | ||||
<h3><A href="speak_lib.h">eSpeak Libary API</A></h3> | |||||
<h3><A href="speak_lib.h">eSpeak Library API</A></h3> | |||||
API definition and header file for a shared library version of eSpeak. | API definition and header file for a shared library version of eSpeak. | ||||
<h3><A href="ssml.html">Markup tags</A></h3> | <h3><A href="ssml.html">Markup tags</A></h3> | ||||
SSML (Speech Synthesis Markup Language) and HTML tags recognized by eSpeak. | SSML (Speech Synthesis Markup Language) and HTML tags recognized by eSpeak. |
espeak --voices | espeak --voices | ||||
or | or | ||||
espeak --voices=<language></pre> | espeak --voices=<language></pre> | ||||
also | |||||
<pre> espeak --voices=<variant></pre> | |||||
Lists voice variants which can be applied to eSpeak voices. | |||||
<pre> espeak --voices=<mbrola></pre> | |||||
Lists the Mbrola voices. | |||||
<hr> | <hr> | ||||
<h3>5.2 Contents of Voice Files</h3> | <h3>5.2 Contents of Voice Files</h3> | ||||
The <strong>language</strong> attribute is mandatory. All the other attributes are optional. | The <strong>language</strong> attribute is mandatory. All the other attributes are optional. | ||||
<dd> | <dd> | ||||
These values give bandwidths of the noise peaks of the <strong>breath</strong> attribute. If <strong>breathw</strong> values are not given, then suitable default values will be used. | These values give bandwidths of the noise peaks of the <strong>breath</strong> attribute. If <strong>breathw</strong> values are not given, then suitable default values will be used. | ||||
<p> | <p> | ||||
<dt> | |||||
<strong>speed <value></strong><br> | |||||
<dd> Default value 100.<br> | |||||
Adjusts the speaking speed by a percentage of the default rate. This can be used if a language voice seems faster or slower compared to other voices. | |||||
<p> | |||||
</dl> | </dl> | ||||
</ul> | </ul> | ||||
<h4>Language Attributes</h4> | <h4>Language Attributes</h4> | ||||
The ISO 8859 character set number. (not all are implemented). | The ISO 8859 character set number. (not all are implemented). | ||||
</dd> | </dd> | ||||
<p> | <p> | ||||
<dt> | |||||
<strong>dictmin <value></strong><br> | |||||
<dd> | |||||
Used for some languages to detect if additional language data is installed. | |||||
If the size of the compiled dictionary data for the language (the file <code>espeak-data/*_dict</code>) is less than | |||||
this size then a warning is given. | |||||
<p> | |||||
<dt> | |||||
<strong>alphabet2 <alphabet> <language></strong><br> | |||||
<dd> | |||||
Used to specify a language to be used to speak words which are written in a non-native alphabet. eg: | |||||
<pre> alphabet2 cyr ru | |||||
</pre> | |||||
Alphabets names include: latin, cyr (cyrillic), ar (arabic). The default language for latin alphabet is English. | |||||
</dd> | |||||
<p> | |||||
Additional attributes are available to set various internal options which control how language is processed. These would normally be set in the program code rather than in a voice file. | Additional attributes are available to set various internal options which control how language is processed. These would normally be set in the program code rather than in a voice file. | ||||
</ul> | </ul> | ||||
<hr> | <hr> | ||||
<dl> | <dl> | ||||
<dt> | <dt> | ||||
<strong>default</strong><br> | <strong>default</strong><br> | ||||
<dd> This voice is used if none is specified in the speak command. Copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.</dd> | |||||
<dd> This voice is used if none is specified in the speak command. You can copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.</dd> | |||||
</dl> | </dl> | ||||
For a list of voices provided for English and other languages see <a href="languages.html">Languages</a>. | For a list of voices provided for English and other languages see <a href="languages.html">Languages</a>. | ||||
en-wi 30 156 | en-wi 30 156 | ||||
af 39 138 | af 39 138 | ||||
cy 29 134 | cy 29 134 | ||||
ga 29 133 | |||||
ga 30 134 | |||||
de 40 140 | de 40 140 | ||||
eo 13 116 | eo 13 116 | ||||
jbo 2 116 | jbo 2 116 | ||||
[i@] ga | [i@] ga | ||||
[i@] hy | [i@] hy | ||||
vdiph2/i@_2 [i@] en-wm | vdiph2/i@_2 [i@] en-wm | ||||
[iR] de | |||||
vdiph2/i@_3 [iR] de | |||||
vdiph2/ie [i@] en-wi | vdiph2/ie [i@] en-wi | ||||
[ie] fi | [ie] fi | ||||
[ie] mt | [ie] mt | ||||
[z;] base | [z;] base | ||||
vowel/@ [@] base | vowel/@ [@] base | ||||
[@] en | [@] en | ||||
[@2] en | |||||
[@5] en | |||||
[@] en-rp | [@] en-rp | ||||
[V] cy | [V] cy | ||||
[@/] ga | [@/] ga | ||||
vowel/@_3 [@#] en | vowel/@_3 [@#] en | ||||
[@] en-sc | [@] en-sc | ||||
[I] en-sc | [I] en-sc | ||||
[@2] en-sc | |||||
[@5] en-sc | |||||
[@3] hi | [@3] hi | ||||
[@3] ne | [@3] ne | ||||
[@3] ur | [@3] ur | ||||
[I] no | [I] no | ||||
[i] sl | [i] sl | ||||
vowel/ii#_3 [I2] en-us | vowel/ii#_3 [I2] en-us | ||||
vowel/ii_4 [@2] en | |||||
[I2] en | |||||
vowel/ii_4 [I2] en | |||||
[I] en-us | [I] en-us | ||||
[I2] tn | [I2] tn | ||||
vowel/ii_5 [i] ta | vowel/ii_5 [i] ta |
IF nextPh(isVowel) THEN | IF nextPh(isVowel) THEN | ||||
ChangePhoneme(I2) | ChangePhoneme(I2) | ||||
ENDIF | ENDIF | ||||
IF nextPh(isVowel) THEN | |||||
FMT(vowel/ii_4) | |||||
ENDIF | |||||
FMT(vowel/@) | |||||
ChangePhoneme(@) | |||||
endphoneme | endphoneme | ||||
IF nextPh(isVowel) OR nextPh(isPause) THEN | IF nextPh(isVowel) OR nextPh(isPause) THEN | ||||
ChangePhoneme(U) | ChangePhoneme(U) | ||||
ENDIF | ENDIF | ||||
FMT(vowel/@) | |||||
ChangePhoneme(@) | |||||
endphoneme | endphoneme | ||||
IF nextPh(isVowel) THEN | IF nextPh(isVowel) THEN | ||||
ChangePhoneme(I2) | ChangePhoneme(I2) | ||||
ENDIF | ENDIF | ||||
FMT(vowel/@_3) | |||||
ChangePhoneme(@) | |||||
endphoneme | endphoneme | ||||
IF nextPh(isVowel) OR nextPh(isPause) THEN | IF nextPh(isVowel) OR nextPh(isPause) THEN | ||||
ChangePhoneme(U) | ChangePhoneme(U) | ||||
ENDIF | ENDIF | ||||
FMT(vowel/@_3) | |||||
ChangePhoneme(@) | |||||
endphoneme | endphoneme | ||||
phoneme iR | |||||
phoneme iR // TEST "vier" = [f'iR] not successful | |||||
vowel starttype #i endtype #@ | vowel starttype #i endtype #@ | ||||
ipa iɐ | ipa iɐ | ||||
flag1 | flag1 | ||||
length 180 | |||||
FMT(vdiph2/i@_2) | |||||
length 230 | |||||
FMT(vdiph2/i@_3) | |||||
endphoneme | endphoneme | ||||
phoneme @ // Schwa, but always unstressed | phoneme @ // Schwa, but always unstressed | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
unstressed | unstressed | ||||
length 100 | |||||
length 110 | |||||
IF nextPh(i:) THEN | IF nextPh(i:) THEN | ||||
Length 70 | |||||
Length 80 | |||||
FMT(vwl_af/r@) | FMT(vwl_af/r@) | ||||
ENDIF | ENDIF | ||||
IF nextPh(I) THEN | IF nextPh(I) THEN | ||||
Length 70 | |||||
Length 80 | |||||
FMT(vwl_af/r@) | FMT(vwl_af/r@) | ||||
ENDIF | ENDIF | ||||
IF nextPh(e:) THEN | IF nextPh(e:) THEN | ||||
Length 70 | |||||
Length 80 | |||||
FMT(vwl_af/r@) | FMT(vwl_af/r@) | ||||
ENDIF | ENDIF | ||||
FMT(vwl_af/@) | FMT(vwl_af/@) | ||||
phoneme @/ | phoneme @/ | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
FMT(vowel/@) | FMT(vowel/@) | ||||
endphoneme | endphoneme | ||||
phoneme a | phoneme a | ||||
vowel starttype #a endtype #a | vowel starttype #a endtype #a | ||||
length 150 | |||||
length 165 | |||||
FMT(vowel/a_4) | FMT(vowel/a_4) | ||||
endphoneme | endphoneme | ||||
phoneme a# | phoneme a# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
ipa ɐ | ipa ɐ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(a) | ChangeIfStressed(a) | ||||
FMT(vowel/a#_3) | FMT(vowel/a#_3) | ||||
endphoneme | endphoneme | ||||
phoneme E | phoneme E | ||||
vowel starttype #e endtype #e | vowel starttype #e endtype #e | ||||
length 140 | |||||
length 155 | |||||
FMT(vowel/e_mid) | FMT(vowel/e_mid) | ||||
endphoneme | endphoneme | ||||
phoneme E# | phoneme E# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(E) | ChangeIfStressed(E) | ||||
ChangePhoneme(@/) | ChangePhoneme(@/) | ||||
endphoneme | endphoneme | ||||
phoneme I | phoneme I | ||||
vowel starttype #i endtype #i | vowel starttype #i endtype #i | ||||
length 120 | |||||
length 130 | |||||
FMT(vowel/ii_2) | FMT(vowel/ii_2) | ||||
endphoneme | endphoneme | ||||
phoneme i // non syllabic i for end of words | phoneme i // non syllabic i for end of words | ||||
vowel starttype #i endtype #i | vowel starttype #i endtype #i | ||||
ipa iU+032F | ipa iU+032F | ||||
length 40 | |||||
length 45 | |||||
FMT(vowel/ii_7) | FMT(vowel/ii_7) | ||||
endphoneme | endphoneme | ||||
phoneme O | phoneme O | ||||
vowel starttype #a endtype #@ | vowel starttype #a endtype #@ | ||||
length 140 | |||||
length 155 | |||||
FMT(vowel/V_4) | FMT(vowel/V_4) | ||||
endphoneme | endphoneme | ||||
phoneme O# | phoneme O# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(O) | ChangeIfStressed(O) | ||||
ChangePhoneme(a#) | ChangePhoneme(a#) | ||||
endphoneme | endphoneme | ||||
phoneme U | phoneme U | ||||
vowel starttype #u endtype #u | vowel starttype #u endtype #u | ||||
length 140 | |||||
length 155 | |||||
FMT(vowel/uu) | FMT(vowel/uu) | ||||
endphoneme | endphoneme | ||||
phoneme U# | phoneme U# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(U) | ChangeIfStressed(U) | ||||
ChangePhoneme(@/) | ChangePhoneme(@/) | ||||
endphoneme | endphoneme | ||||
phoneme u1 | phoneme u1 | ||||
vowel starttype #u endtype #u | vowel starttype #u endtype #u | ||||
ipa uU+0306 | ipa uU+0306 | ||||
length 50 | |||||
length 55 | |||||
FMT(vowel/u) | FMT(vowel/u) | ||||
endphoneme | endphoneme | ||||
phoneme 0 | phoneme 0 | ||||
vowel starttype #a endtype #a | vowel starttype #a endtype #a | ||||
length 180 | |||||
length 195 | |||||
ipa A | ipa A | ||||
FMT(vowel/aa_8) | FMT(vowel/aa_8) | ||||
endphoneme | endphoneme | ||||
phoneme 0# | phoneme 0# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(0) | ChangeIfStressed(0) | ||||
ChangePhoneme(a#) | ChangePhoneme(a#) | ||||
endphoneme | endphoneme | ||||
phoneme o: | phoneme o: | ||||
vowel starttype #o endtype #o | vowel starttype #o endtype #o | ||||
length 190 | |||||
length 210 | |||||
FMT(vowel/o) | FMT(vowel/o) | ||||
endphoneme | endphoneme | ||||
phoneme A: | phoneme A: | ||||
vowel starttype #a endtype #a | vowel starttype #a endtype #a | ||||
length 200 | |||||
length 220 | |||||
FMT(vowel/aa_2) | FMT(vowel/aa_2) | ||||
endphoneme | endphoneme | ||||
phoneme e: | phoneme e: | ||||
vowel starttype #e endtype #e | vowel starttype #e endtype #e | ||||
length 210 | |||||
length 230 | |||||
FMT(vowel/e) | FMT(vowel/e) | ||||
endphoneme | endphoneme | ||||
phoneme i: | phoneme i: | ||||
vowel starttype #i endtype #i | vowel starttype #i endtype #i | ||||
length 210 | |||||
length 230 | |||||
FMT(vowel/i) | FMT(vowel/i) | ||||
endphoneme | endphoneme | ||||
phoneme u: | phoneme u: | ||||
vowel starttype #u endtype #u | vowel starttype #u endtype #u | ||||
length 210 | |||||
length 230 | |||||
FMT(vowel/u_bck) | FMT(vowel/u_bck) | ||||
endphoneme | endphoneme | ||||
phoneme @U | phoneme @U | ||||
vowel starttype #@ endtype #u | vowel starttype #@ endtype #u | ||||
length 240 | |||||
length 260 | |||||
FMT(vdiph/@u_3) | FMT(vdiph/@u_3) | ||||
endphoneme | endphoneme | ||||
phoneme i@ | phoneme i@ | ||||
vowel starttype #i endtype #@ | vowel starttype #i endtype #@ | ||||
length 240 | |||||
length 260 | |||||
FMT(vdiph2/i@) | FMT(vdiph2/i@) | ||||
endphoneme | endphoneme | ||||
phoneme u@ | phoneme u@ | ||||
vowel starttype #u endtype #@ | vowel starttype #u endtype #@ | ||||
length 240 | |||||
length 260 | |||||
FMT(vdiph2/u@) | FMT(vdiph2/u@) | ||||
endphoneme | endphoneme | ||||
phoneme aI | phoneme aI | ||||
vowel starttype #a endtype #i | vowel starttype #a endtype #i | ||||
length 250 | |||||
length 275 | |||||
FMT(vdiph/ai) | FMT(vdiph/ai) | ||||
endphoneme | endphoneme | ||||
phoneme aI# | phoneme aI# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(aI) | ChangeIfStressed(aI) | ||||
ChangePhoneme(a#) | ChangePhoneme(a#) | ||||
endphoneme | endphoneme | ||||
phoneme aU | phoneme aU | ||||
vowel starttype #a endtype #u | vowel starttype #a endtype #u | ||||
length 270 | |||||
length 300 | |||||
FMT(vdiph/au_4) | FMT(vdiph/au_4) | ||||
endphoneme | endphoneme | ||||
phoneme aU# | phoneme aU# | ||||
vowel starttype #@ endtype #@ | vowel starttype #@ endtype #@ | ||||
length 120 | |||||
length 130 | |||||
ChangeIfStressed(aU) | ChangeIfStressed(aU) | ||||
FMT(vdiph/au_4) | FMT(vdiph/au_4) | ||||
endphoneme | endphoneme | ||||
ENDIF | ENDIF | ||||
endphoneme | endphoneme | ||||
phoneme eI | |||||
import_phoneme en/eI | |||||
endphoneme |
[Setup] | [Setup] | ||||
AppName=eSpeak | AppName=eSpeak | ||||
AppVerName=eSpeak version 1.47.01 | |||||
AppVerName=eSpeak version 1.47.03 | |||||
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details). | AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details). | ||||
WindowVisible=yes | WindowVisible=yes | ||||
[Setup] | [Setup] | ||||
AppName=eSpeakEdit | AppName=eSpeakEdit | ||||
AppVerName=eSpeakEdit version 1.47.01 | |||||
AppVerName=eSpeakEdit version 1.47.03 | |||||
DefaultDirName={pf}\eSpeak | DefaultDirName={pf}\eSpeak | ||||
DefaultGroupName=eSpeak | DefaultGroupName=eSpeak | ||||
OutputBaseFilename=setup_espeakedit | OutputBaseFilename=setup_espeakedit | ||||
[Languages] | [Languages] | ||||
Name: "en"; MessagesFile: "compiler:Default.isl" | Name: "en"; MessagesFile: "compiler:Default.isl" | ||||
Name: "af"; MessagesFile: "compiler:Languages\Afrikaans.isl" | Name: "af"; MessagesFile: "compiler:Languages\Afrikaans.isl" | ||||
Name: "bg"; MessagesFile: "compiler:Languages\Bulgarian.isl" | |||||
Name: "bs"; MessagesFile: "compiler:Languages\Bosnian.isl" | Name: "bs"; MessagesFile: "compiler:Languages\Bosnian.isl" | ||||
Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl" | Name: "cs"; MessagesFile: "compiler:Languages\Czech.isl" | ||||
Name: "da"; MessagesFile: "compiler:Languages\Danish.isl" | |||||
Name: "de"; MessagesFile: "compiler:Languages\German.isl" | Name: "de"; MessagesFile: "compiler:Languages\German.isl" | ||||
Name: "el"; MessagesFile: "compiler:Languages\Greek.isl" | Name: "el"; MessagesFile: "compiler:Languages\Greek.isl" | ||||
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl" | Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl" | ||||
Name: "fa"; MessagesFile: "compiler:Languages\Farsi.isl" | |||||
Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl" | Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl" | ||||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl" | Name: "fr"; MessagesFile: "compiler:Languages\French.isl" | ||||
Name: "hi"; MessagesFile: "compiler:Languages\Hindi.islu" | |||||
Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl" | Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl" | ||||
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl" | Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl" | ||||
Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl" | Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl" | ||||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl" | Name: "it"; MessagesFile: "compiler:Languages\Italian.isl" | ||||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian-1-5.1.11.isl" | |||||
Name: "ka"; MessagesFile: "compiler:Languages\Georgian.islu" | |||||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian.isl" | |||||
Name: "ne"; MessagesFile: "compiler:Languages\Nepali.islu" | |||||
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl" | Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl" | ||||
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl" | Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl" | ||||
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl" | Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl" | ||||
Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl" | Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl" | ||||
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl" | Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl" | ||||
Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl" | Name: "sk"; MessagesFile: "compiler:Languages\Slovak.isl" | ||||
;Name: "sq"; MessagesFile: "compiler:Languages\Albanian-2-5.1.11.isl" | |||||
Name: "sr"; MessagesFile: "compiler:Languages\Serbian.isl" | Name: "sr"; MessagesFile: "compiler:Languages\Serbian.isl" | ||||
Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl" | Name: "tr"; MessagesFile: "compiler:Languages\Turkish.isl" | ||||
Name: "vi"; MessagesFile: "compiler:Languages\Vietnamese.isl" | |||||
Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl" | Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl" | ||||
{ | { | ||||
if(tr->langopts.alt_alphabet == alphabet->offset) | if(tr->langopts.alt_alphabet == alphabet->offset) | ||||
{ | { | ||||
sprintf(phonemes,"%c%s",phonSWITCH, tr->langopts.alt_alphabet_lang); | |||||
sprintf(phonemes,"%c%s",phonSWITCH, WordToString2(tr->langopts.alt_alphabet_lang)); | |||||
return(0); | return(0); | ||||
} | } | ||||
if(alphabet->flags & AL_WORDS) | if(alphabet->flags & AL_WORDS) | ||||
const char *word_end; | const char *word_end; | ||||
const char *word1; | const char *word1; | ||||
int wflags = 0; | int wflags = 0; | ||||
int lookup_symbol; | |||||
char word_buf[N_WORD_BYTES+1]; | char word_buf[N_WORD_BYTES+1]; | ||||
char dict_flags_buf[80]; | char dict_flags_buf[80]; | ||||
wflags = wtab->flags; | wflags = wtab->flags; | ||||
} | } | ||||
lookup_symbol = flags[1] & FLAG_LOOKUP_SYMBOL; | |||||
word1 = word; | word1 = word; | ||||
if(tr->transpose_min > 0) | if(tr->transpose_min > 0) | ||||
{ | { | ||||
continue; | continue; | ||||
} | } | ||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < translator->clause_end)) | |||||
if((dictionary_flags2 & FLAG_ATEND) && (word_end < translator->clause_end) && (lookup_symbol==0)) | |||||
{ | { | ||||
// only use this pronunciation if it's the last word of the clause | |||||
// only use this pronunciation if it's the last word of the clause, or called from Lookup() | |||||
continue; | continue; | ||||
} | } | ||||
if((dictionary_flags2 & FLAG_SENTENCE) && !(translator->clause_terminator & CLAUSE_BIT_SENTENCE)) | if((dictionary_flags2 & FLAG_SENTENCE) && !(translator->clause_terminator & CLAUSE_BIT_SENTENCE)) | ||||
{ | { | ||||
// only uis this clause is a sentence , i.e. terminator is {. ? !} not {, : :} | |||||
// only if this clause is a sentence , i.e. terminator is {. ? !} not {, : :} | |||||
continue; | continue; | ||||
} | } | ||||
int Lookup(Translator *tr, const char *word, char *ph_out) | int Lookup(Translator *tr, const char *word, char *ph_out) | ||||
{//=================================================== | {//=================================================== | ||||
unsigned int flags[2]; | unsigned int flags[2]; | ||||
flags[0] = flags[1] = 0; | |||||
flags[0] = 0; | |||||
flags[1] = FLAG_LOOKUP_SYMBOL; | |||||
char *word1 = (char *)word; | char *word1 = (char *)word; | ||||
return(LookupDictList(tr, &word1, ph_out, flags, 0, NULL)); | return(LookupDictList(tr, &word1, ph_out, flags, 0, NULL)); | ||||
} | } |
if(ph_buf[0] == 0) | if(ph_buf[0] == 0) | ||||
{ | { | ||||
if(al_offset == translator->langopts.alt_alphabet) | |||||
language = translator->langopts.alt_alphabet_lang; | |||||
else | |||||
if((alphabet != NULL) && (alphabet->language != 0) && !(al_flags & AL_NOT_LETTERS)) | if((alphabet != NULL) && (alphabet->language != 0) && !(al_flags & AL_NOT_LETTERS)) | ||||
language = alphabet->language; | language = alphabet->language; | ||||
else | else | ||||
len = strlen(phonemes); | len = strlen(phonemes); | ||||
if(tr->langopts.accents & 2) | |||||
if(tr->langopts.accents & 2) // 'capital' before or after the word ? | |||||
sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,ph_buf,capital); | sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,ph_buf,capital); | ||||
else | else | ||||
sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,capital,ph_buf); // the 0xff marker will be removed or replaced in SetSpellingStress() | sprintf(ph_buf2,"%c%s%s%s",0xff,ph_alphabet,capital,ph_buf); // the 0xff marker will be removed or replaced in SetSpellingStress() |
init_path(argv[0],data_path); | init_path(argv[0],data_path); | ||||
initialise(); | initialise(); | ||||
if(voicename[0] == 0) | |||||
strcpy(voicename,"default"); | |||||
if(flag_compile) | |||||
if(SetVoiceByName(voicename) != EE_OK) | |||||
{ | { | ||||
LoadVoice(voicename,5); | |||||
memset(&voice_select,0,sizeof(voice_select)); | |||||
voice_select.languages = voicename; | |||||
if(SetVoiceByProperties(&voice_select) != EE_OK) | |||||
{ | |||||
fprintf(stderr,"%svoice '%s'\n",err_load,voicename); | |||||
exit(2); | |||||
} | |||||
} | |||||
if(flag_compile) | |||||
{ | |||||
#ifdef PLATFORM_DOS | #ifdef PLATFORM_DOS | ||||
char path_dsource[sizeof(path_home)+20]; | char path_dsource[sizeof(path_home)+20]; | ||||
strcpy(path_dsource,path_home); | strcpy(path_dsource,path_home); | ||||
} | } | ||||
if(voicename[0] == 0) | |||||
strcpy(voicename,"default"); | |||||
if(SetVoiceByName(voicename) != EE_OK) | |||||
{ | |||||
memset(&voice_select,0,sizeof(voice_select)); | |||||
voice_select.languages = voicename; | |||||
if(SetVoiceByProperties(&voice_select) != EE_OK) | |||||
{ | |||||
fprintf(stderr,"%svoice '%s'\n",err_load,voicename); | |||||
exit(2); | |||||
} | |||||
} | |||||
SetParameter(espeakRATE,speed,0); | SetParameter(espeakRATE,speed,0); | ||||
SetParameter(espeakVOLUME,amp,0); | SetParameter(espeakVOLUME,amp,0); | ||||
SetParameter(espeakCAPITALS,option_capitals,0); | SetParameter(espeakCAPITALS,option_capitals,0); |
#include "translate.h" | #include "translate.h" | ||||
#include "wave.h" | #include "wave.h" | ||||
const char *version_string = "1.47.02 19.Mar.13"; | |||||
const char *version_string = "1.47.03 21.Mar.13"; | |||||
const int version_phdata = 0x014701; | const int version_phdata = 0x014701; | ||||
int option_device_number = -1; | int option_device_number = -1; |
}; | }; | ||||
ALPHABET *AlphabetFromName(const char *name) | |||||
{//========================================== | |||||
ALPHABET *alphabet; | |||||
for(alphabet=alphabets; alphabet->name != NULL; alphabet++) | |||||
{ | |||||
if(strcmp(name, &alphabet->name[1]) == 0) | |||||
return(alphabet); | |||||
} | |||||
return(NULL); | |||||
} | |||||
ALPHABET *AlphabetFromChar(int c) | ALPHABET *AlphabetFromChar(int c) | ||||
{//=============================== | {//=============================== | ||||
// Find the alphabet from a character. | // Find the alphabet from a character. | ||||
tr->langopts.param2[LOPT_BRACKET_PAUSE] = 2; // pauses when announcing bracket names | tr->langopts.param2[LOPT_BRACKET_PAUSE] = 2; // pauses when announcing bracket names | ||||
tr->langopts.max_initial_consonants = 3; | tr->langopts.max_initial_consonants = 3; | ||||
tr->langopts.replace_chars = NULL; | tr->langopts.replace_chars = NULL; | ||||
tr->langopts.ascii_language = ""; // Non-Latin alphabet languages, use this language to speak Latin words, default is English | |||||
tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English | |||||
SetLengthMods(tr,201); | SetLengthMods(tr,201); | ||||
{ | { | ||||
tr->langopts.stress_rule = STRESSPOSN_1L; | tr->langopts.stress_rule = STRESSPOSN_1L; | ||||
tr->langopts.numbers = 1; | tr->langopts.numbers = 1; | ||||
tr->langopts.accents = 2; // 'capital' after letter name | |||||
} | } | ||||
break; | break; | ||||
tr->langopts.numbers = NUM_VIGESIMAL | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED |NUM_OMIT_1_THOUSAND | NUM_DFRACTION_5 | NUM_ROMAN; | tr->langopts.numbers = NUM_VIGESIMAL | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED |NUM_OMIT_1_THOUSAND | NUM_DFRACTION_5 | NUM_ROMAN; | ||||
tr->langopts.alt_alphabet = OFFSET_CYRILLIC; | tr->langopts.alt_alphabet = OFFSET_CYRILLIC; | ||||
tr->langopts.alt_alphabet_lang = "ru"; | |||||
tr->langopts.alt_alphabet_lang = L('r','u'); | |||||
} | } | ||||
break; | break; | ||||
#define FLAG_STEM 0x10000 // must have a suffix | #define FLAG_STEM 0x10000 // must have a suffix | ||||
#define FLAG_ATEND 0x20000 /* use this pronunciation if at end of clause */ | #define FLAG_ATEND 0x20000 /* use this pronunciation if at end of clause */ | ||||
#define FLAG_ATSTART 0x40000 // use this pronunciation if at start of clause | #define FLAG_ATSTART 0x40000 // use this pronunciation if at start of clause | ||||
#define FLAG_LOOKUP_SYMBOL 0x40000000 // to indicate called from Lookup() | |||||
#define BITNUM_FLAG_ALLCAPS 0x2a | #define BITNUM_FLAG_ALLCAPS 0x2a | ||||
#define BITNUM_FLAG_HYPHENATED 0x2c | #define BITNUM_FLAG_HYPHENATED 0x2c | ||||
int testing; // testing options: bit 1= specify stressed syllable in the form: "outdoor/2" | int testing; // testing options: bit 1= specify stressed syllable in the form: "outdoor/2" | ||||
int listx; // compile *_listx after *list | int listx; // compile *_listx after *list | ||||
const unsigned int *replace_chars; // characters to be substitutes | const unsigned int *replace_chars; // characters to be substitutes | ||||
const char *ascii_language; // switch to this language for Latin characters | |||||
char ascii_language[8]; // switch to this language for Latin characters | |||||
int alt_alphabet; // offset for another language to recognize | int alt_alphabet; // offset for another language to recognize | ||||
const char *alt_alphabet_lang; // language for the alt_alphabet | |||||
int alt_alphabet_lang; // language for the alt_alphabet | |||||
int max_lengthmod; | int max_lengthmod; | ||||
int lengthen_tonic; // lengthen the tonic syllable | int lengthen_tonic; // lengthen the tonic syllable | ||||
int suffix_add_e; // replace a suffix (which has the SUFX_E flag) with this character | int suffix_add_e; // replace a suffix (which has the SUFX_E flag) with this character | ||||
void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa); | void GetTranslatedPhonemeString(char *phon_out, int n_phon_out, int use_ipa); | ||||
const char *WordToString2(unsigned int word); | const char *WordToString2(unsigned int word); | ||||
ALPHABET *AlphabetFromChar(int c); | ALPHABET *AlphabetFromChar(int c); | ||||
ALPHABET *AlphabetFromName(const char *name); | |||||
Translator *SelectTranslator(const char *name); | Translator *SelectTranslator(const char *name); | ||||
int SetTranslator2(const char *name); | int SetTranslator2(const char *name); |
V_FAST, | V_FAST, | ||||
V_SPEED, | V_SPEED, | ||||
V_DICTMIN, | V_DICTMIN, | ||||
V_ALPHABET2, | |||||
// these need a phoneme table to have been specified | // these need a phoneme table to have been specified | ||||
V_REPLACE, | V_REPLACE, | ||||
{"fast_test2", V_FAST}, | {"fast_test2", V_FAST}, | ||||
{"speed", V_SPEED}, | {"speed", V_SPEED}, | ||||
{"dict_min", V_DICTMIN}, | {"dict_min", V_DICTMIN}, | ||||
{"alphabet2", V_ALPHABET2}, | |||||
// these just set a value in langopts.param[] | // these just set a value in langopts.param[] | ||||
{"l_dieresis", 0x100+LOPT_DIERESES}, | {"l_dieresis", 0x100+LOPT_DIERESES}, | ||||
} | } | ||||
static unsigned int StringToWord2(const char *string) | |||||
{//====================================================== | |||||
// Convert a language name string to a word such as L('e','n') | |||||
int ix; | |||||
int c; | |||||
unsigned int value = 0; | |||||
for(ix=0; (ix<4) & ((c = string[ix]) != 0); ix++) | |||||
{ | |||||
value = (value << 8) | (c & 0xff); | |||||
} | |||||
return(value); | |||||
} | |||||
voice_t *LoadVoice(const char *vname, int control) | voice_t *LoadVoice(const char *vname, int control) | ||||
{//=============================================== | {//=============================================== | ||||
// control, bit 0 1= no_default | // control, bit 0 1= no_default | ||||
int stress_lengths[8]; | int stress_lengths[8]; | ||||
int stress_add[8]; | int stress_add[8]; | ||||
char names[8][40]; | char names[8][40]; | ||||
char name1[40]; | |||||
char name2[80]; | char name2[80]; | ||||
const char *voice_dir; | const char *voice_dir; | ||||
static char voice_name[40]; // voice name for current_voice_selected | static char voice_name[40]; // voice name for current_voice_selected | ||||
static char voice_languages[100]; // list of languages and priorities for current_voice_selected | static char voice_languages[100]; // list of languages and priorities for current_voice_selected | ||||
// which directory to look for a named voice | |||||
// which directory to look for a named voice. List of voice names, must end in a space. | |||||
static const char *voices_asia = | static const char *voices_asia = | ||||
"fa fa-pin hi hy hy-west id ka kn ku ml ne pa ta tr vi vi-hue zh zh-yue "; | "fa fa-pin hi hy hy-west id ka kn ku ml ne pa ta tr vi vi-hue zh zh-yue "; | ||||
static const char *voices_europe = | static const char *voices_europe = | ||||
"an bg bs ca cs cy da el es et fi fr-be hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv "; | |||||
"an bg bs ca cs cy da el es et fi fr-be ga hr hu is it lt lv mk nl no pl pt-pt ro ru sk sq sr sv "; | |||||
strncpy0(voicename, vname, sizeof(voicename)); | strncpy0(voicename, vname, sizeof(voicename)); | ||||
case V_MBROLA: | case V_MBROLA: | ||||
{ | { | ||||
int srate = 16000; | int srate = 16000; | ||||
char name[40]; | |||||
char phtrans[40]; | |||||
phtrans[0] = 0; | |||||
sscanf(p,"%s %s %d",name,phtrans,&srate); | |||||
if(LoadMbrolaTable(name,phtrans,srate) != EE_OK) | |||||
name2[0] = 0; | |||||
sscanf(p,"%s %s %d",name1,name2,&srate); | |||||
if(LoadMbrolaTable(name1,name2,srate) != EE_OK) | |||||
{ | { | ||||
fprintf(stderr,"mbrola voice not found\n"); | fprintf(stderr,"mbrola voice not found\n"); | ||||
} | } | ||||
sscanf(p,"%d",&dict_min); | sscanf(p,"%d",&dict_min); | ||||
break; | break; | ||||
case V_ALPHABET2: | |||||
{ | |||||
ALPHABET *alphabet; | |||||
name1[0] = name2[0] = 0; | |||||
sscanf(p, "%s %s", name1, name2); | |||||
if(strcmp(name1, "latin") == 0) | |||||
{ | |||||
strncpy0(langopts->ascii_language,name2,sizeof(langopts->ascii_language)); | |||||
} | |||||
else if((alphabet = AlphabetFromName(name1)) != 0) | |||||
{ | |||||
langopts->alt_alphabet = alphabet->offset; | |||||
langopts->alt_alphabet_lang = StringToWord2(name2); | |||||
} | |||||
else | |||||
{ | |||||
fprintf(stderr,"alphabet name '%s' not found\n", name1); | |||||
} | |||||
} | |||||
break; | |||||
default: | default: | ||||
if((key & 0xff00) == 0x100) | if((key & 0xff00) == 0x100) | ||||
{ | { |