[1.47.03]

git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@329 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
jonsd
2013-03-21 13:47:36 +00:00
parent 8cba4d3b96
commit 2f2eee48a2
27 changed files with 240 additions and 142 deletions
+8 -8
View File
@@ -185,7 +185,7 @@ p Q r R s s; t T
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
@@ -213,7 +213,7 @@ s S t T tS ts v w
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
@@ -272,12 +272,12 @@ p2 r r2 s S t t2 t3
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 aU aU# e E E# e: eI i
i: i@ o O O# o: u U I i: i@ o O O# o: u
U# u1 u: 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
@@ -333,7 +333,7 @@ m n N p r s S t
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:
@@ -569,7 +569,7 @@ r r. s S s. t t# t.
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
+18 -17
View File
@@ -61,6 +61,7 @@ a eI $atend
// 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
@@ -3214,7 +3215,7 @@ Korean kOr'i:@n
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:
@@ -3908,8 +3909,8 @@ would $u+ $verbf $only $strend2
(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) wUd@-nt@v $u1 $pastf $strend2
(wouldn't have to) ,wUdntavt@5 $verbf $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
@@ -3920,18 +3921,18 @@ must $verbf
(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 mVs@-nt $verbf
(mustn't have) mVsntha#v $pastf $u1+ (mustn't have) mVs@-ntha#v $pastf $u1+
(mustn't have to) m'Vsnthavt@5 $pastf (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 ,SUd@-nt $verbf $strend2 $only
(shouldn't have) SUdnth@v $pastf $u1+ (shouldn't have) SUd@-nth@v $pastf $u1+
(shouldn't have to) 'SUdntavt@5 $verbf $strend2 (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
@@ -3947,9 +3948,9 @@ could %kUd $verbf $strend2 $only
(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 ,kUd@-nt $verbf $strend2
(couldn't have) kUd@nt@v $pastf $u1+ (couldn't have) kUd@-nt@v $pastf $u1+
(couldn't have to) 'kUd@ntavt@5 $verbf $strend2 (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+
@@ -3980,9 +3981,9 @@ had ,had $atend
(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 haven't hav@-nt $pastf
hadn't had@nt $pastf hadn't had@-nt $pastf
hasn't haz@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
@@ -4088,8 +4089,8 @@ his hIz $u $nounf $only $strend2
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 our aU@ $u $nounf $only
?3 our aU3 $u $nounf $onlys ?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
+4 -2
View File
@@ -3827,7 +3827,8 @@
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
@@ -4847,7 +4848,7 @@
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
@@ -6042,6 +6043,7 @@
χ tS'aI_ χ tS'aI_
ψ ps'aI_ ψ ps'aI_
ω 'oUmIg@_ ω 'oUmIg@_
?3 ω oUm'eIg@_
ώ 'oUmIg@_ ώ 'oUmIg@_
ό 'oUmIkr0n_ ό 'oUmIkr0n_
+1
View File
@@ -338,6 +338,7 @@ ll 'El^e
é '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
+2 -1
View File
@@ -37,11 +37,12 @@ y waI
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
+10 -8
View File
@@ -462,6 +462,7 @@ shetlan) d (szige d
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
@@ -820,12 +821,12 @@ _megsz) í (vatta i
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: progressz) í (ve i:
sz) í (vemel i: sz) í (vemel i:
sz) í (vere i: sz) í (vere i:
sz) í (veré i: sz) í (veré i:
sz) í (verő i: sz) í (verő i:
sz) í (vevő i: sz) í (vevő i:
.group j .group j
j j j j
@@ -1177,7 +1178,8 @@ _tetszé) s S
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
@@ -1713,7 +1715,7 @@ szállodá) ssz Ss
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
+4
View File
@@ -1544,6 +1544,10 @@ spektakel $2
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
+4 -2
View File
@@ -258,6 +258,7 @@
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
@@ -738,8 +739,8 @@ _) inn (@P2 'I // ?? inneren
u (x 8 u (x 8
uu y uu y
ui Wy ui Wy
uw yU uw (A yw
uw (_ yU uw (K yU
_) uit (@P3 'Wyt _) uit (@P3 'Wyt
uul (_ 'yl // from -ule uul (_ 'yl // from -ule
@@ -759,6 +760,7 @@ _) inn (@P2 'I // ?? inneren
_) 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
+12 -16
View File
@@ -29,22 +29,12 @@ Some Linux distrubitions (eg. SuSe 10) have version 19 of PortAudio which has a
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>&nbsp;<hr> <p>&nbsp;<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> <h3>2.1.2 Windows</h3>
<p>&nbsp;<hr> The installer: <strong>setup_espeak.exe</strong> installs the SAPI5 version of eSpeak.
<h3>2.1.3 Windows</h3> During installation you need to specify which voices you want to appear in SAPI5 voice menus.
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>
It also installs a command line program <strong>espeak</strong> in the espeak program directory.
<p>&nbsp;<hr> <p>&nbsp;<hr>
<h2>2.2 COMMAND OPTIONS</h2> <h2>2.2 COMMAND OPTIONS</h2>
@@ -176,7 +166,13 @@ The same as <strong>--compile</strong>, but source line numbers from the *_rules
<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 [="&lt;directory path&gt;"]</strong><br> <dt><strong>--path [="&lt;directory path&gt;"]</strong><br>
<dd> <dd>
+4
View File
@@ -311,6 +311,10 @@ S&lt;number&gt; may be followed by additonal letters (eg. S2ei ). Some of these
<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>
+1 -1
View File
@@ -46,7 +46,7 @@ The list of phoneme mnemonics for English, for use in the Pronunciation Dictiona
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.
+27 -1
View File
@@ -17,6 +17,11 @@ The available voice files can be listed by:<pre>
espeak --voices espeak --voices
or or
espeak --voices=&lt;language&gt;</pre> espeak --voices=&lt;language&gt;</pre>
also
<pre> espeak --voices=&lt;variant&gt;</pre>
Lists voice variants which can be applied to eSpeak voices.
<pre> espeak --voices=&lt;mbrola&gt;</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.
@@ -141,6 +146,11 @@ don't have their own <strong>tone</strong> statement.
<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 &nbsp;&lt;value&gt;</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>
@@ -229,6 +239,22 @@ See <a href="dictionary.html">dictionary.html</a>.
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 &nbsp;&lt;value&gt;</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 &nbsp;&lt;alphabet&gt; &lt;language&gt;</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>
@@ -240,7 +266,7 @@ speak command.
<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>.
+3 -8
View File
@@ -13,7 +13,7 @@ consonants 11 119
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
@@ -1090,7 +1090,7 @@ vdiph2/i@ [i@] en-n
[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
@@ -1506,8 +1506,6 @@ voc/z_pzd_ [Z;] base
[z;] base [z;] base
vowel/@ [@] base vowel/@ [@] base
[@] en [@] en
[@2] en
[@5] en
[@] en-rp [@] en-rp
[V] cy [V] cy
[@/] ga [@/] ga
@@ -1558,8 +1556,6 @@ vowel/@_2 [@:] vi
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
@@ -2072,8 +2068,7 @@ vowel/ii_3 [I] cy
[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 vowel/ii_4 [I2] en
[I2] en
[I] en-us [I] en-us
[I2] tn [I2] tn
vowel/ii_5 [i] ta vowel/ii_5 [i] ta
+2 -5
View File
@@ -145,10 +145,7 @@ phoneme @2 // Schwa, changes to I before a vowel
IF nextPh(isVowel) THEN IF nextPh(isVowel) THEN
ChangePhoneme(I2) ChangePhoneme(I2)
ENDIF ENDIF
IF nextPh(isVowel) THEN ChangePhoneme(@)
FMT(vowel/ii_4)
ENDIF
FMT(vowel/@)
endphoneme endphoneme
@@ -159,7 +156,7 @@ phoneme @5 // Schwa, changes to U before a vowel
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
+2 -2
View File
@@ -36,7 +36,7 @@ phoneme @2 // Schwa, changes to I before a vowel
IF nextPh(isVowel) THEN IF nextPh(isVowel) THEN
ChangePhoneme(I2) ChangePhoneme(I2)
ENDIF ENDIF
FMT(vowel/@_3) ChangePhoneme(@)
endphoneme endphoneme
@@ -47,7 +47,7 @@ phoneme @5 // Schwa, changes to U before a vowel
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
+3 -3
View File
@@ -342,12 +342,12 @@ 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 length 230
FMT(vdiph2/i@_2) FMT(vdiph2/i@_3)
endphoneme endphoneme
+34 -30
View File
@@ -6,17 +6,17 @@
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/@)
@@ -25,14 +25,14 @@ endphoneme
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
@@ -40,7 +40,7 @@ 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
@@ -48,13 +48,13 @@ 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
@@ -62,27 +62,27 @@ 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
@@ -90,13 +90,13 @@ 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
@@ -104,20 +104,20 @@ 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
@@ -125,7 +125,7 @@ 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
@@ -134,21 +134,21 @@ 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
@@ -157,7 +157,7 @@ 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
@@ -167,44 +167,44 @@ 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
@@ -237,3 +237,7 @@ phoneme ; // linking j, used between (i) vowels and a following vowel
ENDIF ENDIF
endphoneme endphoneme
phoneme eI
import_phoneme en/eI
endphoneme
Binary file not shown.
+1 -1
View File
@@ -2,7 +2,7 @@
[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
+9 -3
View File
@@ -1,7 +1,7 @@
[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
@@ -32,18 +32,24 @@ Source: "License.txt"; DestDir: "{app}";
[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"
@@ -51,8 +57,8 @@ Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.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"
+8 -5
View File
@@ -2694,7 +2694,7 @@ int TranslateRules(Translator *tr, char *p_start, char *phonemes, int ph_size, c
{ {
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)
@@ -2984,6 +2984,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
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];
@@ -2992,6 +2993,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
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)
{ {
@@ -3178,9 +3180,9 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
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;
} }
@@ -3192,7 +3194,7 @@ static const char *LookupDict2(Translator *tr, const char *word, const char *wor
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;
} }
@@ -3471,7 +3473,8 @@ int LookupDictList(Translator *tr, char **wordptr, char *ph_out, unsigned int *f
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));
} }
+4 -1
View File
@@ -691,6 +691,9 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
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
@@ -793,7 +796,7 @@ int TranslateLetter(Translator *tr, char *word, char *phonemes, int control)
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()
+13 -16
View File
@@ -750,11 +750,22 @@ int main (int argc, char **argv)
init_path(argv[0],data_path); init_path(argv[0],data_path);
initialise(); initialise();
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);
}
}
if(flag_compile) if(flag_compile)
{ {
LoadVoice(voicename,5);
#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);
@@ -776,20 +787,6 @@ int main (int argc, char **argv)
} }
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);
+1 -1
View File
@@ -35,7 +35,7 @@
#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;
+16 -2
View File
@@ -103,6 +103,19 @@ ALPHABET alphabets [] = {
}; };
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.
@@ -276,7 +289,7 @@ static const char transpose_map_latin[] = {
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);
@@ -828,6 +841,7 @@ Translator *SelectTranslator(const char *name)
{ {
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;
@@ -1054,7 +1068,7 @@ SetLengthMods(tr,3); // all equal
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;
+4 -2
View File
@@ -83,6 +83,7 @@
#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
@@ -542,9 +543,9 @@ typedef struct {
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
@@ -713,6 +714,7 @@ int towlower2(unsigned int c);
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);
+45 -7
View File
@@ -109,6 +109,7 @@ enum {
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,
@@ -160,6 +161,7 @@ static MNEM_TAB keyword_tab[] = {
{"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},
@@ -530,6 +532,21 @@ static int Read8Numbers(char *data_in,int *data)
} }
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
@@ -571,6 +588,7 @@ voice_t *LoadVoice(const char *vname, int control)
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;
@@ -581,11 +599,11 @@ voice_t *LoadVoice(const char *vname, int control)
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));
@@ -960,12 +978,10 @@ voice_t *LoadVoice(const char *vname, int control)
case V_MBROLA: case V_MBROLA:
{ {
int srate = 16000; int srate = 16000;
char name[40];
char phtrans[40];
phtrans[0] = 0; name2[0] = 0;
sscanf(p,"%s %s %d",name,phtrans,&srate); sscanf(p,"%s %s %d",name1,name2,&srate);
if(LoadMbrolaTable(name,phtrans,srate) != EE_OK) if(LoadMbrolaTable(name1,name2,srate) != EE_OK)
{ {
fprintf(stderr,"mbrola voice not found\n"); fprintf(stderr,"mbrola voice not found\n");
} }
@@ -988,6 +1004,28 @@ voice_t *LoadVoice(const char *vname, int control)
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)
{ {