Fix mbrola translation for "r" in Spanish and some other languages. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@214 d46cf337-b52f-0410-862d-fd96e6ae7743master
@@ -22,15 +22,14 @@ syllables within words. Some languages are easier than others. I expect most are | |||
<p><li>Improve the sounds of the phonemes. It may be that a phoneme should sound different depending on adjacent sounds, or whether it's at the start or the end of a word, between vowels, etc. This may consist of making small adjustments to vowel and diphthong quality, | |||
or adjusting the strength of consonants. Bigger changes may be recording new or replacement consonant | |||
sounds, or even writing program code to implement new types of sounds. | |||
<p><li>Marking some common words in the dictionary that should be unstressed (words such as "the", "is"), or should be preceded | |||
by a short pause (such as "and", "but"), or have other attributes, in order to make the speech flow better. | |||
<p><li>Some common words should be added to the dictionary (the *_list file for the language) with an "unstressed" attribute (eg. in English, words such as "the", "is", "had", "my", "she", "of", "in", "some"), or should be preceded | |||
by a short pause (such as "and", "but", "which"), or have other attributes, in order to make the speech flow better. | |||
<p><li>Improve the rhythm of the speech by adjusting the relative lengths of vowels in different contexts, eg. stressed/unstressed syllable, | |||
or depending on the following phonemes. This is important for making the speech sound good for the language. | |||
<p><li>Identify or implement new functions in the program to improve the speech, or to deal with | |||
characteristics of the language which are not currently implemented. For example, a different intonation module. | |||
</ul> | |||
<b><em>If you are interested in working on a language, please contact me to set up the initial data and to | |||
discuss the features of the language.</em></b> | |||
<b><em>If you are interested in working on a language, please contact me so that I can set up the initial data and discuss the features of the language.</em></b> | |||
<p> | |||
For most of the eSpeak voices, I do not speak or understand the language, and I do not know how it should sound. I can only make improvements as a result of feedback from speakers of that language. If you want to help to improve a language, listen carefully and try to identify individual errors, either in the spelling-to-phoneme translation, the position of stressed syllables within words, or the sound of phonemes, or problems with rhythm and vowel lengths. | |||
<HR> | |||
@@ -90,11 +89,11 @@ marked as "unstressed" in order to make the speech flow better. | |||
These words generally include articles (eg: a, the, this, that), | |||
auxillary verbs (eg: is, have, will, can, may), pronouns and | |||
possessive adjectives (eg: he, his), some common prepositions (eg: | |||
of, to, in, of), some common conjunctions (eg. and, or, if)., some | |||
of, to, in, of), some common conjunctions (eg. and, or, if), some | |||
common adverbs and adjectives (eg. any, already)</P> | |||
<P><B>$pause </B>Some words should be marked to have a short pause | |||
before then, in order to produce natural pauses in long sentences. | |||
These include conjunctions (eg. and, or, but, however) and perhaps | |||
These include conjunctions (eg. and, or, but, however, which) and perhaps | |||
some prepositions.</P> | |||
<HR> | |||
<H3>6.4 Voice File</H3> | |||
@@ -122,12 +121,8 @@ language code and the required options in <B>SetTranslator()</B>. However, this | |||
may not be necessary during testing because most of the options can also be | |||
set from the voice file in | |||
<B>espeak-data/voices</B>.</P> | |||
<P STYLE="font-weight: medium">If necessary, you can define a new | |||
translator class for a language, and select this in the | |||
SetTranslator() function. This inherits the standard functions | |||
from the base translator class, but allows you to replace these where | |||
needed by new functions which are written specially for this | |||
language.</P> | |||
</BODY> | |||
</HTML> |
@@ -99,6 +99,10 @@ of 190. Range 80 to 390. | |||
<dd>Word gap. This option inserts a pause between words. The value is the length of the pause, in units of 10 mS (at the default speed of 170 wpm). | |||
<p> | |||
<dt> | |||
<strong>-h </strong> or <strong> --help</strong><br> | |||
<dd>The first line of output gives the eSpeak version number. | |||
<p> | |||
<dt> | |||
<strong>-k <integer></strong><br> | |||
<dd>Indicate words which begin with capital letters.<p> | |||
1 eSpeak uses a click sound to indicate when a word starts with a capital letter, or double click if word is all capitals.<p> | |||
@@ -164,6 +168,14 @@ Compile the pronunciation rule and dictionary lookup data from their source file | |||
<dd> | |||
The same as <strong>--compile</strong>, but source line numbers from the *_rules file are included. These are included in the rules trace when the <strong>-X</strong> option is used. | |||
<p> | |||
<dt><strong>--path [="<directory path>"]</strong><br> | |||
<dd> | |||
Specifies the directory which contains the espeak-data directory. | |||
<p> | |||
<dt><strong>--phonout [="<filename>"]</strong><br> | |||
<dd> | |||
If specified, mbrola phoneme data, and also the output from -x and -X options is written to this file, rather than stdout. | |||
<p> | |||
<dt><strong>--punct [="<characters>"]</strong><br> | |||
<dd> | |||
Speaks the names of punctuation characters when they are encountered in the text. If <characters> are given, then only those listed punctuation characters are spoken, eg. <code> --punct=".,;?"</code> | |||
@@ -190,8 +202,10 @@ If the -m option is used to indicate marked-up text, then HTML can be spoken dir | |||
<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.<p> | |||
eg: <code> espeak -v en [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] </code><p> | |||
("This is some phonetic text input"). | |||
eg: <code> espeak -v en "[[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]]" </code><p> | |||
This command will speak: "This is some phonetic text input". | |||
</dl> | |||
</body> | |||
</b> | |||
@@ -73,7 +73,7 @@ The utility 'phonemes' are: | |||
It is not necessary to specify the stress of every syllable. Stress markers are only needed in order to change the effect of the language's default stress rule. | |||
<p> | |||
The phonemes which are used to represent a language's sounds are based on the Kirshenbaum ascii character representation of the International Phonetic Alphabet <a href="http://www.kirshenbaum.net/IPA/ascii-ipa.pdf">www.kirshenbaum.net/IPA/ascii-ipa.pdf</a> | |||
The phonemes which are used to represent a language's sounds are based loosely on the Kirshenbaum ascii character representation of the International Phonetic Alphabet <a href="http://www.kirshenbaum.net/IPA/ascii-ipa.pdf">www.kirshenbaum.net/IPA/ascii-ipa.pdf</a> | |||
<p> <hr> | |||
<h3>4.3 Pronunciation Rules</h3> | |||
@@ -94,7 +94,7 @@ The rules are organized in groups, each starting with a ".group" line: | |||
A group for other characters which don't have their own group. | |||
<p> | |||
<dt><strong>.L<nn></strong><br><dd> | |||
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 20. eg:<p> | |||
Defines a group of letter sequences, any of which can match with <strong>Lnn</strong> in a <strong>post</strong> rule (see below). <strong>nn</strong> is a 2 digit decimal number in the range 01 to 25. eg:<p> | |||
<code>.L01 b bl br pl pr</code> | |||
<p> | |||
<dt><strong>.replace</strong><br><dd> | |||
@@ -249,7 +249,7 @@ Note, that matching characters in the <pre> part do not affect the syllabl | |||
</tr> | |||
<tr> | |||
<td><strong>T</strong></td> | |||
<td>Only use this rule if the word in found in the *_list file with the <b>$alt1</b> attribute.</td> | |||
<td>Only use this rule if the word in found in the *_list file with the <b>$alt</b> attribute.</td> | |||
</tr> | |||
<tr> | |||
<td><strong>#</strong></td> | |||
@@ -352,6 +352,7 @@ or to run them together, pronounced as a single word | |||
or to give them a flag when they occur together | |||
<pre> (such as) sVtS||a2z $pause // precede with a pause | |||
</pre> | |||
Hyphenated words in the <strong><em><language>_list</em></strong> file must also be enclosed within brackets, because the two parts are considered as separate words. | |||
<h4>4.4.2 Special characters in <phoneme string>:</h4> | |||
<ul><table> | |||
<tbody> | |||
@@ -600,7 +601,7 @@ _0 to _9 | |||
<tr><TD>_0M1<td>The word for "thousand"</tr> | |||
<tr><TD>_0M2<td>The word for "million"</tr> | |||
<tr><TD>_0M3<td>The word for 1000000000</tr> | |||
<tr><TD>_1M1 _2T1<td>Special pronunciation for one thousand, two thousand, tc, if needed</td> | |||
<tr><TD>_1M1 _2M1<td>Special pronunciation for one thousand, two thousand, tc, if needed</td> | |||
<tr><TD>_0and<td>Word for "and" when speaking numbers (eg. "two hundred and twenty").</tr> | |||
<tr><TD>_dpt<td>Word spoken for the decimnal point/comma</tr> | |||
<tr><TD>_dpt2<td>Word spoken (if any) at the end of all the digits after a decimal point.</tr> | |||
@@ -619,5 +620,6 @@ Character substitutions can be specified by using a <b> .replace </b> section at | |||
<p> | |||
</body> | |||
</html> |
@@ -18,7 +18,7 @@ | |||
(email) jonsd at users dot sourceforge.net<br> | |||
<a href="http://espeak.sf.net/download.html"><strong>Download</strong></a> | |||
<a href="http://sourceforge.net/forum/?group_id=159649"><strong>Forum</strong></a> | |||
<a href="http://sourceforge.net/projects/espeak"><strong>eSpeak Sourceforge page</a> | |||
<a href="http://sourceforge.net/projects/espeak/"><strong>eSpeak Sourceforge page</a> | |||
</div> | |||
</td> | |||
</tr> | |||
@@ -48,7 +48,7 @@ It can run as a command line program to speak text from a file or from stdin. A | |||
<li>Includes different Voices, whose characteristics can be altered. | |||
<li>Can produce speech output as a WAV file. | |||
<li>SSML (Speech Synthesis Markup Language) is supported (not complete), and also HTML. | |||
<li>Compact size. The program and its data, including several languages, totals about 700 kbytes. | |||
<li>Compact size. The program and its data, including many languages, totals about 1 Mbytes. | |||
<li>Can translate text to phoneme codes, so it could be adapted as a front end for another speech synthesis engine. | |||
<li>Potential for other languages. Several are included in varying stages of progress. Help from native speakers for these or other languages is welcomed. | |||
<li>Development tools available for producing and tuning phoneme data. | |||
@@ -65,7 +65,7 @@ A Windows version of the espeakedit program is also available. | |||
<hr> | |||
<strong>Languages</strong>. The eSpeak speech synthesizer supports several languages, however in most cases these are initial drafts and need more work to improve them. Assistance from native speakers is welcome for these, or other new languages. Please contact me if you want to help.<p> | |||
eSpeak does text to speech synthesis for the following languages, some better than others. Afrikaans, Cantonese, Croatian, Czech, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Icelandic, Italian, Lojban, Macedonian, Mandarin, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Vietnamese, Welsh. See <a href="languages.html">Languages</a>. | |||
eSpeak does text to speech synthesis for the following languages, some better than others. Afrikaans, Albanian, Armenian, Cantonese, Catalan, Croatian, Czech, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Icelandic, Indonesian, Italian, Kurdish, Latvian, Lojban, Macedonian, Mandarin, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Spanish, Swahili, Swedish, Tamil, Vietnamese, Welsh. See <a href="languages.html">Languages</a>. | |||
<hr> | |||
<strong>espeakedit</strong> is a GUI program used to prepare and compile phoneme data. It is now available for download. Documentation is currently sparse, but if you want to use it to add or improve language support, let me know. | |||
<hr> |
@@ -46,12 +46,12 @@ For details of the voice files see <a href="voices.html">Voices</a>. | |||
<dd> is the standard default English voice.</dd> | |||
<p> | |||
<dt> | |||
<strong>en-sc</strong><br> | |||
<dd> Scottish English. | |||
<strong>en-us</strong><br> | |||
<dd> American English. | |||
<p> | |||
<dt> | |||
<strong>en-r</strong><br> | |||
<dd> Some slight vowel changes, and a "rhotic" accent, where "r" is pronounced even when not followed by a vowel. This may sound less "British" to an American. | |||
<strong>en-sc</strong><br> | |||
<dd> Scottish English. | |||
<p> | |||
<dt> | |||
<strong>en-n<br> | |||
@@ -73,7 +73,7 @@ The variants are <code> +m1 +m2 +m3 +m4 +m5 </code> for male voices, <code> | |||
The available voice variants can be listed with:<br> | |||
<pre> espeak --voices=variant</pre> | |||
<h3>3.4 Other Languages</h3> | |||
The eSpeak speech synthesizer does text to speech for the following additional languages. | |||
The eSpeak speech synthesizer does text to speech for the following additional langauges. | |||
<ul> | |||
<dl> | |||
<p> | |||
@@ -87,6 +87,10 @@ The eSpeak speech synthesizer does text to speech for the following additional l | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>ca Catalan</strong><br> | |||
<dd></dd> | |||
<p> | |||
<dt> | |||
<strong>cs Czech</strong><br> | |||
<dd>Usable. | |||
</dd> | |||
@@ -102,11 +106,7 @@ The eSpeak speech synthesizer does text to speech for the following additional l | |||
<p> | |||
<dt> | |||
<strong>eo Esperanto</strong><br> | |||
<dd>Esperanto has simple and regular pronunciation rules, so it should be OK, although I'm not | |||
certain how it's supposed to sound, other than what I've read in an introduction. | |||
Text can be either UTF-8, or Latin3 alphabet, or | |||
can use the Latin1 convention of two-letter combinations (cx, | |||
gx, etc).</dd> | |||
<dd>Esperanto has simple and regular pronunciation rules, so it should be OK.</dd> | |||
<p> | |||
<dt> | |||
<strong>es Spanish</strong><br> | |||
@@ -149,6 +149,17 @@ Not much work yet, but Kurdish has good spelling rules so it should be OK. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>lv Latvian</strong><br> | |||
<dd>This has had assistance from a native speaker and it should be OK. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>pl Polish</strong><br> | |||
<dd> | |||
Usable. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>pt Portuguese (Brazil)</strong><br> | |||
<dd>Brazilian Portuguese. This has had assistance from a native speaker and it should be OK. Like Italian there is further work to do about the ambiguity in the spelling between open/close "e" and "o" vowels.<p> | |||
</dd> | |||
@@ -224,6 +235,11 @@ These languages are only initial naive implementations which have had little or | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>hy Armenian</strong><br> | |||
<dd>Needs feedback from native speakers. The <strong>hy-west</strong> voice has different pronunciation of some consonants for Western Armenian pronunciation. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>id Indonesian</strong><br> | |||
<dd>An initial guess, no feedback yet. | |||
</dd> | |||
@@ -250,7 +266,7 @@ These languages are only initial naive implementations which have had little or | |||
<p> | |||
<dt> | |||
<strong>nl Dutch</strong><br> | |||
<dd>Probably needs improvement of the spelling-to-phoneme rules. | |||
<dd>Needs improvement of the spelling-to-phoneme rules. | |||
</dd> | |||
<p> | |||
<dt> | |||
@@ -259,23 +275,22 @@ These languages are only initial naive implementations which have had little or | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>pl Polish</strong><br> | |||
<dd>Some initial feedback, but I'm told it's difficult to understand, so more work is needed. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>ru Russian</strong><br> | |||
<dd>So far it's just an initial attempt with basic pronunciation rules. Work is needed especially on the consonants. Russian has two versions of most consonants, "hard" and "soft" (palatalised) and in most cases eSpeak doesn't yet make a proper distinction.<br> | |||
Russian stress position is unpredictable so a large lookup dictionary is needed of those words where eSpeak doesn't guess correctly. To avoid increasing the size of the basic eSpeak package, this is available separately at: <a href="http://espeak.sourceforge.net/data/">http://espeak.sourceforge.net/data/</a> | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>sq Albanian</strong><br> | |||
<dd>Some initial feedback, but needs more work.</dd> | |||
<p> | |||
<dt> | |||
<strong>vi Vietnamese</strong><br> | |||
<dd>This is interesting because it's a tone language. I don't know how it should sound, so it's just a guess and I need feedback. | |||
</dd> | |||
<p> | |||
<dt> | |||
<strong>zhy Cantonese Chinese</strong><br> | |||
<strong>zh-yue Cantonese Chinese</strong><br> | |||
<dd>Just a naive simple one-to-one translation from single Simplified Chinese characters to phonetic equivalents in Cantonese. There is limited attempt at disambiguation, grouping characters into words, or adjusting tones according to their surrounding syllables. This voice needs Chinese character to phonetic translation data, which is available as a separate download for Cantonese at: <a href="http://espeak.sourceforge.net/data/">http://espeak.sourceforge.net/data/</a>.<br>The voice can also read Jyutping romanised text. | |||
</dd> | |||
</ul> |
@@ -3,6 +3,7 @@ | |||
<head> | |||
<title>eSpeak</title> | |||
<meta name="GENERATOR" content="Quanta Plus"> | |||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |||
</head> | |||
<body> | |||
@@ -35,16 +36,11 @@ The following markup tags and attributes are recognised:<p> | |||
</ul> | |||
<p><b><say-as></b> | |||
<ul> | |||
<li>interpret-as="characters"<p> | |||
The names of the characters are spoken. | |||
<li>interpret-as="characters" format="glyphs"<p> | |||
As "characters", but upper-case letters are prefixed with "Capital". | |||
<li>interpret-as="tts:key"<p> | |||
If the text is only one character, the name of the character is spoken, including punctuation characters. If the text is more than one character, it is spoken as words. | |||
<li>interpret-as="tts:char"<p> | |||
The name of the character is spoken, including punctuation characters. | |||
<li>interpret-as="tts:digits"<p> | |||
The digits are spoken individually. | |||
<li>interpret-as="characters" | |||
<li>interpret-as="characters" format="glyphs" | |||
<li>interpret-as="tts:key" | |||
<li>interpret-as="tts:char" | |||
<li>interpret-as="tts:digits" | |||
</ul> | |||
<p><b><mark></b> name | |||
<p><b><s></b> |
@@ -1,7 +1,9 @@ | |||
name cantonese-test | |||
language zh-yue | |||
language yue | |||
language zhy | |||
translator zhy | |||
phonemes zhy | |||
dictionary zhy | |||
gender male |
@@ -17,6 +17,7 @@ volume 16 | |||
0 @- NULL 0 NULL | |||
0 * NULL 0 r | |||
0 r* NULL 0 NULL | |||
0 R2 NULL 0 r | |||
0 I NULL 0 i | |||
0 U NULL 0 u |
@@ -14,6 +14,7 @@ | |||
0 ** NULL 0 r | |||
0 R NULL 0 rr | |||
0 R2 NULL 0 NULL | |||
0 v# NULL 0 b | |||
0 v NULL 0 b | |||
0 j NULL 0 i |
@@ -13,6 +13,7 @@ volume 32 | |||
0 g- NULL 0 NULL | |||
0 @- NULL 0 NULL | |||
0 * NULL 0 r | |||
0 R2 NULL 0 r | |||
0 e NULL 0 e: | |||
0 A NULL 0 O |
@@ -23,6 +23,8 @@ volume 32 | |||
0 g- NULL 0 NULL | |||
0 @- NULL 0 NULL | |||
0 * NULL 0 r | |||
0 R2 NULL 0 r | |||
0 R NULL 0 r | |||
0 a NULL 0 V | |||
0 E NULL 0 e |
@@ -15,6 +15,7 @@ | |||
0 @- NULL 0 NULL | |||
0 * NULL 0 r | |||
0 a# NULL 0 a | |||
0 y NULL 0 I | |||
0 E NULL 0 e | |||
0 O NULL 0 o |
@@ -9,7 +9,6 @@ copy <obey$dir>.^.src.synthdata/cpp <obey$dir>.cpp.synthdata fq~c | |||
copy <obey$dir>.^.src.synth_mbrola/cpp <obey$dir>.cpp.synth_mbrola fq~c | |||
copy <obey$dir>.^.src.synthesize/cpp <obey$dir>.cpp.synthesize fq~c | |||
copy <obey$dir>.^.src.translate/cpp <obey$dir>.cpp.translate fq~c | |||
copy <obey$dir>.^.src.tr_english/cpp <obey$dir>.cpp.tr_english fq~c | |||
copy <obey$dir>.^.src.tr_languages/cpp <obey$dir>.cpp.tr_languages fq~c | |||
copy <obey$dir>.^.src.voices/cpp <obey$dir>.cpp.voices fq~c | |||
copy <obey$dir>.^.src.wavegen/cpp <obey$dir>.cpp.wavegen fq~c |
@@ -357,7 +357,7 @@ LINK32=link.exe | |||
# PROP Ignore_Export_Lib 0 | |||
# PROP Target_Dir "" | |||
# ADD BASE CPP /nologo /MD /W4 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c | |||
# ADD CPP /nologo /MD /W4 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c | |||
# ADD CPP /nologo /MD /W3 /GR /O2 /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /Fd"vc_mswu\minimal.pdb" /FD /EHsc /c | |||
# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32 | |||
# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32 | |||
# ADD BASE RSC /l 0x409 /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /i ".\..\..\samples" /d "__WXMSW__" /d "_UNICODE" /d "_WINDOWS" /d "NOPCH" | |||
@@ -541,6 +541,14 @@ SOURCE=.\src\intonation.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\klatt.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\klatt.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\main.h | |||
# End Source File | |||
# Begin Source File | |||
@@ -653,18 +661,10 @@ SOURCE=.\src\synthesize.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_english.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\translate.cpp | |||
# End Source File | |||
# Begin Source File |
@@ -1,62 +1,63 @@ | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
#define LOG_FRAMES // write keyframe info to src/log | |||
// comment this out when compiling the "speak" process | |||
//#define SPECT_EDITOR | |||
#include <windows.h> | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define mkdir(p1,p2) mkdir(p1) | |||
#define PATHSEP '\\' | |||
#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
#define __cdecl | |||
#define ESPEAK_API | |||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 120 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
#define LOG_FRAMES // write keyframe info to src/log | |||
// comment this out when compiling the "speak" process | |||
//#define SPECT_EDITOR | |||
#define INCLUDE_KLATT | |||
#include <windows.h> | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define mkdir(p1,p2) mkdir(p1) | |||
#define PATHSEP '\\' | |||
#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
#define __cdecl | |||
#define ESPEAK_API | |||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 120 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
@@ -1,62 +1,63 @@ | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
#define LOG_FRAMES // write keyframe info to src/log | |||
// comment this out when compiling the "speak" process | |||
//#define SPECT_EDITOR | |||
#include <windows.h> | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define mkdir(p1,p2) mkdir(p1) | |||
#define PATHSEP '\\' | |||
#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
#define __cdecl | |||
#define ESPEAK_API | |||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 120 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
#define LOG_FRAMES // write keyframe info to src/log | |||
// comment this out when compiling the "speak" process | |||
//#define SPECT_EDITOR | |||
#define INCLUDE_KLATT | |||
#include <windows.h> | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define mkdir(p1,p2) mkdir(p1) | |||
#define PATHSEP '\\' | |||
#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
#define __cdecl | |||
#define ESPEAK_API | |||
#define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 120 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
@@ -2,7 +2,7 @@ | |||
[Setup] | |||
AppName=eSpeak | |||
AppVerName=eSpeak version 1.38 | |||
AppVerName=eSpeak version 1.40 | |||
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details). | |||
WindowVisible=yes | |||
@@ -15,6 +15,7 @@ ShowLanguageDialog=auto | |||
[InstallDelete] | |||
Type: files; Name: "{app}\espeak.dll" | |||
Type: filesandordirs; Name: "{app}\espeak-data\voices\test" | |||
[Dirs] | |||
Name: "{app}\espeak-data\soundicons" | |||
@@ -31,12 +32,7 @@ Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme | |||
Source: "License.txt"; DestDir: "{app}"; | |||
[Registry] | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_1"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_2"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_3"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_4"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_5"; Flags: deletekey uninsdeletekey | |||
;Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_5"; Flags: deletekey uninsdeletekey | |||
Root: HKLM; Subkey: "Software\Microsoft\Speech\PhoneConverters\Tokens\eSpeak"; Flags: deletekey uninsdeletekey | |||
@@ -52,7 +48,9 @@ Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl" | |||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl" | |||
Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl" | |||
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl" | |||
Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl" | |||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl" | |||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian-1-5.1.11.isl" | |||
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl" | |||
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl" | |||
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl" | |||
@@ -60,8 +58,10 @@ Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl" | |||
Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl" | |||
Name: "ru"; MessagesFile: "compiler:Languages\Russian.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: "tr"; MessagesFile: "compiler:Languages\Turkish.isl" | |||
Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl" | |||
[CustomMessages] | |||
v1=Select which voices to install | |||
@@ -111,6 +111,7 @@ begin | |||
// translation from microsoft codes to language codes | |||
case lang_main of | |||
$03: Result := 'ca'; | |||
$04: Result := 'zh'; | |||
$05: Result := 'cs'; | |||
$06: Result := 'da'; | |||
@@ -132,16 +133,21 @@ begin | |||
$19: Result := 'ru'; | |||
$1a: Result := 'hr'; | |||
$1b: Result := 'sk'; | |||
$1c: Result := 'sq'; | |||
$1d: Result := 'sv'; | |||
$1f: Result := 'tr'; | |||
$21: Result := 'id'; | |||
$26: Result := 'lv'; | |||
$2a: Result := 'vi'; | |||
$2b: Result := 'hy'; | |||
$2f: Result := 'mk'; | |||
$36: Result := 'af'; | |||
$39: Result := 'hi'; | |||
$41: Result := 'sw'; | |||
$49: Result := 'ta'; | |||
$4b: Result := 'kn'; | |||
$52: Result := 'cy'; | |||
$61: Result := 'ne'; | |||
$87: Result := 'rw'; | |||
end; | |||
@@ -178,6 +184,7 @@ begin | |||
case lang1 of | |||
'af': value := $436; | |||
'bs': value := $41a; // should be $141a but Jaws crashes on startup | |||
'ca': value := $403; | |||
'cs': value := $405; | |||
'cy': value := $452; | |||
'da': value := $406; | |||
@@ -190,11 +197,15 @@ begin | |||
'hi': value := $439; | |||
'hr': value := $41a; | |||
'hu': value := $40e; | |||
'hy': value := $42b; | |||
'id': value := $421; | |||
'is': value := $40f; | |||
'it': value := $410; | |||
'kn': value := $44b; | |||
'ko': value := $412; | |||
'lv': value := $426; | |||
'mk': value := $42f; | |||
'ne': value := $461; | |||
'nl': value := $413; | |||
'no': value := $414; | |||
'pl': value := $415; | |||
@@ -203,6 +214,7 @@ begin | |||
'ru': value := $419; | |||
'rw': value := $487; | |||
'sk': value := $41b; | |||
'sq': value := $41c; | |||
'sr': value := $81a; | |||
'sv': value := $41d; | |||
'sw': value := $441; | |||
@@ -311,13 +323,16 @@ begin | |||
end; | |||
procedure SetupVoice(Voice, Lcode: String; Index: Integer); | |||
procedure SetupVoice(Voice: String; Index: Integer); | |||
var | |||
RegVoice2: String; | |||
RegVoice2a: String; | |||
VoiceUC: String; | |||
Lcode: String; | |||
begin | |||
Lcode := LanguageFromVoice(Voice); | |||
if Index = 0 then | |||
RegVoice2 := RegVoice1 | |||
else | |||
@@ -339,7 +354,7 @@ begin | |||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Gender','Male'); | |||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Age','Adult'); | |||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Language',Lcode); | |||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Vendor','Jonathan Duddington'); | |||
RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Vendor','http://espeak.sf.net'); | |||
SetPhoneConvertor(Lcode); | |||
end; | |||
@@ -348,14 +363,38 @@ end; | |||
procedure CurStepChanged(CurStep: TSetupStep); | |||
var | |||
field: Integer; | |||
Index: Integer; | |||
ix: Integer; | |||
ix2: Integer; | |||
Line: String; | |||
Voice: String; | |||
Voice2: String; | |||
separator: String; | |||
begin | |||
if CurStep = ssPostInstall then | |||
begin | |||
for ix := 0 to 5 do begin | |||
if Page.Values[ix] <> '' then | |||
SetUpVoice(Page.Values[ix],LanguageFromVoice(Page.Values[ix]),ix); | |||
separator := ' '; | |||
Index := 0; | |||
for field := 0 to 4 do begin | |||
Line := Page.Values[field]; | |||
ix := 1; | |||
ix2 := 1; | |||
while ix2 > 0 do begin | |||
ix2 := Pos(separator,Copy(Line,ix,999)); | |||
if ix2 = 0 then | |||
Voice := Copy(Line,ix,999) | |||
else | |||
Voice := Copy(Line,ix,ix2-1); | |||
Voice2 := Trim(Voice); | |||
if Voice2 <> '' then begin | |||
SetUpVoice(Trim(Voice),Index); | |||
Index := Index + 1; | |||
end; | |||
ix := ix + ix2; | |||
end; | |||
end; | |||
end; | |||
end; | |||
@@ -364,6 +403,7 @@ end; | |||
procedure InitializeWizard; | |||
var | |||
lang: String; | |||
voice2: String; | |||
begin | |||
// Create the language selection page | |||
lang := ActiveLanguage; | |||
@@ -375,20 +415,55 @@ begin | |||
Page.Add('', False); | |||
Page.Add('', False); | |||
Page.Add('', False); | |||
Page.Add('', False); | |||
UILanguage := GetUILanguage; | |||
UIVoice := VoiceFromLanguage(UILanguage); | |||
// Set initial values (optional) | |||
Page.Values[0] := UIVoice; | |||
Page.Values[1] := UIVoice+'+f2'; | |||
if UIVoice = 'en' then | |||
Page.Values[2] := 'en-r' | |||
voice2 := 'en-us' | |||
else | |||
Page.values[2] := 'en'; | |||
voice2 := 'en'; | |||
Page.Values[0] := Format('%s %s %s',[UIVoice, UIVoice+'+f2', voice2]); | |||
end; | |||
procedure ClearRegistry; | |||
var | |||
Index: Integer; | |||
RegVoice2: String; | |||
exists: Boolean; | |||
begin | |||
// remove all espeak voices from the registry | |||
exists := True; | |||
Index := 0; | |||
while exists do begin | |||
if Index = 0 then | |||
RegVoice2 := RegVoice1 | |||
else | |||
RegVoice2 := RegVoice1 + Format('_%d',[Index]); | |||
exists := RegKeyExists(HKEY_LOCAL_MACHINE,RegVoice2); | |||
RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE,RegVoice2); | |||
Index := Index + 1; | |||
end; | |||
end; | |||
function InitializeSetup: Boolean; | |||
begin | |||
// remove all espeak voices from the registry | |||
ClearRegistry; | |||
result := True; | |||
end; | |||
function InitializeUninstall: Boolean; | |||
begin | |||
// remove all espeak voices from the registry | |||
ClearRegistry; | |||
result := True; | |||
end; | |||
@@ -1,7 +1,7 @@ | |||
[Setup] | |||
AppName=eSpeakEdit | |||
AppVerName=eSpeakEdit version 1.38 | |||
AppVerName=eSpeakEdit version 1.40 | |||
DefaultDirName={pf}\eSpeak | |||
DefaultGroupName=eSpeak | |||
OutputBaseFilename=setup_espeakedit | |||
@@ -32,7 +32,9 @@ Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl" | |||
Name: "fr"; MessagesFile: "compiler:Languages\French.isl" | |||
Name: "hr"; MessagesFile: "compiler:Languages\Croatian.isl" | |||
Name: "hu"; MessagesFile: "compiler:Languages\Hungarian.isl" | |||
Name: "id"; MessagesFile: "compiler:Languages\Indonesian-5.1.11.isl" | |||
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl" | |||
Name: "lv"; MessagesFile: "compiler:Languages\Latvian-1-5.1.11.isl" | |||
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl" | |||
Name: "no"; MessagesFile: "compiler:Languages\Norwegian.isl" | |||
Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl" | |||
@@ -40,6 +42,8 @@ Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl" | |||
Name: "ro"; MessagesFile: "compiler:Languages\Romanian.isl" | |||
Name: "ru"; MessagesFile: "compiler:Languages\Russian.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: "tr"; MessagesFile: "compiler:Languages\Turkish.isl" | |||
Name: "zh"; MessagesFile: "compiler:Languages\ChineseSimp-12-5.1.11.isl" | |||
@@ -98,6 +98,10 @@ SOURCE=.\src\intonation.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\klatt.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\numbers.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -135,10 +139,6 @@ SOURCE=.\src\synthesize.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_english.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -159,6 +159,10 @@ SOURCE=.\src\wavegen.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\src\klatt.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\phoneme.h | |||
# End Source File | |||
# Begin Source File | |||
@@ -183,10 +187,6 @@ SOURCE=.\src\synthesize.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\translate.h | |||
# End Source File | |||
# Begin Source File |
@@ -31,7 +31,7 @@ | |||
#define PATHSEP '\\' | |||
#define USE_PORTAUDIO | |||
#define ESPEAK_API | |||
#define INCLUDE_KLATT | |||
//#define INCLUDE_KLATT | |||
// will look for espeak_data directory here, and also in user's home directory | |||
#define PATH_ESPEAK_DATA "/usr/share/espeak-data" |
@@ -1,65 +1,65 @@ | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
// speech.h file for the Windows SAPI5 version of eSpeak | |||
// conditional compilation options | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define NEED_WCSTOF | |||
#define NEED_GETOPT | |||
#define USE_MBROLA_LIB | |||
#define ESPEAK_API | |||
#define PATHSEP '\\' | |||
//#define PLATFORM_POSIX | |||
//#define __cdecl // define as null, needed for Borland compiler ? | |||
//#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
#define INCLUDE_KLATT | |||
// will look for espeak_data directory here, and also in user's home directory | |||
#define PATH_ESPEAK_DATA "/usr/share/espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 220 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
/*************************************************************************** | |||
* Copyright (C) 2005,2006 by Jonathan Duddington * | |||
* [email protected] * | |||
* * | |||
* This program is free software; you can redistribute it and/or modify * | |||
* it under the terms of the GNU General Public License as published by * | |||
* the Free Software Foundation; either version 2 of the License, or * | |||
* (at your option) any later version. * | |||
* * | |||
* This program is distributed in the hope that it will be useful, * | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |||
* GNU General Public License for more details. * | |||
* * | |||
* You should have received a copy of the GNU General Public License * | |||
* along with this program; if not, write to the * | |||
* Free Software Foundation, Inc., * | |||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |||
***************************************************************************/ | |||
// speech.h file for the Windows SAPI5 version of eSpeak | |||
// conditional compilation options | |||
#define PLATFORM_WINDOWS | |||
#define __WIN32__ | |||
#define NEED_WCSTOF | |||
#define NEED_GETOPT | |||
#define USE_MBROLA_LIB | |||
#define ESPEAK_API | |||
#define PATHSEP '\\' | |||
//#define PLATFORM_POSIX | |||
//#define __cdecl // define as null, needed for Borland compiler ? | |||
//#define USE_PORTAUDIO | |||
//#define USE_NANOSLEEP | |||
//#define INCLUDE_KLATT | |||
// will look for espeak_data directory here, and also in user's home directory | |||
#define PATH_ESPEAK_DATA "/usr/share/espeak-data" | |||
typedef unsigned short USHORT; | |||
typedef unsigned char UCHAR; | |||
typedef double DOUBLEX; | |||
typedef struct { | |||
const char *mnem; | |||
int value; | |||
} MNEM_TAB; | |||
int LookupMnem(MNEM_TAB *table, char *string); | |||
#define N_PATH_HOME 220 | |||
extern char path_home[N_PATH_HOME]; // this is the espeak-data directory | |||
extern void strncpy0(char *to,const char *from, int size); | |||
int GetFileLength(const char *filename); | |||
char *Alloc(int size); | |||
void Free(void *ptr); | |||
@@ -124,6 +124,10 @@ SOURCE=.\src\intonation.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\klatt.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\numbers.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -162,10 +166,6 @@ SOURCE=.\src\synthesize.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_english.cpp | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.cpp | |||
# End Source File | |||
# Begin Source File | |||
@@ -209,6 +209,10 @@ SOURCE=.\src\wavegen.cpp | |||
# PROP Default_Filter "h;hpp;hxx;hm;inl" | |||
# Begin Source File | |||
SOURCE=.\src\klatt.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\phoneme.h | |||
# End Source File | |||
# Begin Source File | |||
@@ -249,10 +253,6 @@ SOURCE=.\src\synthesize.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\tr_languages.h | |||
# End Source File | |||
# Begin Source File | |||
SOURCE=.\src\translate.h | |||
# End Source File | |||
# Begin Source File |
@@ -68,6 +68,47 @@ int frag_count=0; | |||
FRAG_OFFSET *frag_offsets = NULL; | |||
//#define TEST_INPUT // printf input text received from SAPI to espeak_text_log.txt | |||
#ifdef TEST_INPUT | |||
static int utf8_out(unsigned int c, char *buf) | |||
{//==================================== | |||
// write a unicode character into a buffer as utf8 | |||
// returns the number of bytes written | |||
int n_bytes; | |||
int j; | |||
int shift; | |||
static char unsigned code[4] = {0,0xc0,0xe0,0xf0}; | |||
if(c < 0x80) | |||
{ | |||
buf[0] = c; | |||
return(1); | |||
} | |||
if(c >= 0x110000) | |||
{ | |||
buf[0] = ' '; // out of range character code | |||
return(1); | |||
} | |||
if(c < 0x0800) | |||
n_bytes = 1; | |||
else | |||
if(c < 0x10000) | |||
n_bytes = 2; | |||
else | |||
n_bytes = 3; | |||
shift = 6*n_bytes; | |||
buf[0] = code[n_bytes] | (c >> shift); | |||
for(j=0; j<n_bytes; j++) | |||
{ | |||
shift -= 6; | |||
buf[j+1] = 0x80 + ((c >> shift) & 0x3f); | |||
} | |||
return(n_bytes+1); | |||
} // end of utf8_out | |||
#endif | |||
int VisemeCode(unsigned int phoneme_name) | |||
{//====================================== | |||
// Convert eSpeak phoneme name into a SAPI viseme code | |||
@@ -589,8 +630,32 @@ int CTTSEngObj::ProcessFragList(const SPVTEXTFRAG* pTextFragList, wchar_t *pW_st | |||
frag_offsets[frag_count].bufix = pW - pW_start; | |||
frag_offsets[frag_count].cmdlen = len; | |||
#ifdef TEST_INPUT | |||
{ | |||
FILE *f; | |||
unsigned int c; | |||
int n; | |||
char buf[10]; | |||
f = fopen("C:\\espeak_text_log.txt","a"); | |||
if(f != NULL) | |||
{ | |||
fprintf(f,"----------\n"); | |||
for(ix=0; ix<pTextFragList->ulTextLen; ix++) | |||
{ | |||
c = pTextFragList->pTextStart[ix]; | |||
n = utf8_out(c,buf); | |||
buf[n] = 0; | |||
fprintf(f,"%s",buf); | |||
} | |||
fprintf(f,"\n"); | |||
fclose(f); | |||
} | |||
} | |||
#endif | |||
for(ix=0; ix<pTextFragList->ulTextLen; ix++) | |||
{ | |||
*pW++ = pTextFragList->pTextStart[ix]; | |||
} | |||
if(pTextFragList->ulTextLen > 0) |
@@ -5,8 +5,8 @@ | |||
// | |||
VS_VERSION_INFO VERSIONINFO | |||
FILEVERSION 1,0,38,00 | |||
PRODUCTVERSION 1,0,38,00 | |||
FILEVERSION 1,0,40,00 | |||
PRODUCTVERSION 1,0,40,00 | |||
FILEFLAGSMASK 0x3fL | |||
#ifdef _DEBUG | |||
FILEFLAGS 0x1L | |||
@@ -24,14 +24,14 @@ BEGIN | |||
VALUE "Comments", "\0" | |||
VALUE "CompanyName", "Jonathan Duddington\0" | |||
VALUE "FileDescription", "Text to Speech\0" | |||
VALUE "FileVersion", "1, 0,38,00\0" | |||
VALUE "InternalName", "espeak1.38\0" | |||
VALUE "FileVersion", "1, 0,40,00\0" | |||
VALUE "InternalName", "espeak1.40\0" | |||
VALUE "LegalCopyright", "Copyright (c) Jonathan Duddington\0" | |||
VALUE "LegalTrademarks", "\0" | |||
VALUE "OriginalFilename", "espeak_sapi.dll\0" | |||
VALUE "PrivateBuild", "\0" | |||
VALUE "ProductName", "espeak TTS\0" | |||
VALUE "ProductVersion", "1, 0, 38, 00\0" | |||
VALUE "ProductVersion", "1, 0, 40, 00\0" | |||
VALUE "SpecialBuild", "\0" | |||
END | |||
END |
@@ -1178,7 +1178,7 @@ void TestTest(int control) | |||
//CharsetToUnicode("ISO-8859-4"); | |||
//CharsetToUnicode("ISCII"); | |||
TestCompile2(); | |||
//TestCompile2(); | |||
return; | |||
if(control==2) |
@@ -168,6 +168,8 @@ FormantDlg::FormantDlg(wxWindow *parent) : wxPanel(parent,-1,wxDefaultPosition,w | |||
t_pitch = new wxStaticText(this,-1,_T(""),wxPoint(4,520),wxSize(192,24)); | |||
HideFields(0); | |||
pitchgraph = new ByteGraph(this,wxPoint(0,538),wxSize(200,140)); | |||
pitchgraph->SetData(128,env_fall); | |||
pitchgraph->ShowSpectrum(1); |
@@ -34,7 +34,6 @@ | |||
#define MAX_HARMONIC 400 // 400 * 50Hz = 20 kHz, more than enough | |||
#define KLATT_TEST | |||
extern void SetSynth_Klatt(int length, int modn, frame_t *fr1, frame_t *fr2, voice_t *v, int control); | |||
extern int Wavegen_Klatt(int resume); | |||
@@ -1027,7 +1026,9 @@ void SpectSeq::MakeWave(int start, int end, PitchEnvelope &pitch) | |||
peak_t peaks1[N_PEAKS]; | |||
peak_t peaks2[N_PEAKS]; | |||
#ifdef KLATT_TEST | |||
KlattInit(); | |||
#endif | |||
SpeakNextClause(NULL,NULL,2); // stop speaking file | |||
if(numframes==0) return; | |||
@@ -1158,7 +1159,9 @@ void SpectFrame::MakeWaveF(int control, PitchEnvelope &pitche, int amplitude, in | |||
int pbase; | |||
char *fname_speech; | |||
#ifdef KLATT_TEST | |||
KlattInit(); | |||
#endif | |||
SpeakNextClause(NULL,NULL,2); // stop speaking file | |||
length = duration; |
@@ -21,7 +21,7 @@ | |||
#include <sys/types.h> | |||
// conditional compilation options | |||
#define INCLUDE_KLATT | |||
//#define INCLUDE_KLATT | |||
#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN | |||
#define ARCH_BIG |
@@ -35,7 +35,7 @@ | |||
#include "translate.h" | |||
#include "wave.h" | |||
const char *version_string = "1.39.49 21.Dec.08"; | |||
const char *version_string = "1.40 22.Dec.08"; | |||
const int version_phdata = 0x014000; | |||
int option_device_number = -1; |
@@ -249,7 +249,9 @@ void MakeWave2(PHONEME_LIST *p, int n_phonemes) | |||
char *fname_speech; | |||
int n_ph; | |||
#ifdef KLATT_TEST | |||
KlattInit(); | |||
#endif | |||
n_ph = n_phonemes; | |||
fname_speech = WavFileName(); | |||
OpenWaveFile2(fname_speech); |