diff --git a/dictsource/dict_phonemes b/dictsource/dict_phonemes index 515db926..94fd27ff 100644 --- a/dictsource/dict_phonemes +++ b/dictsource/dict_phonemes @@ -164,7 +164,7 @@ t tS ts v z Z z2 Dictionary it_dict @- a a/ aI aU e E i -o O oI U u +o O oI u * : b d dZ f g j k l l^ m n N n^ p @@ -285,8 +285,8 @@ Dictionary pt_dict & &/ &U~ &~ @ @- a A aI aU e E eI EI eU EU -e~ i i/ iU o O oI OI -o~ U u uI u~ y +i i/ iU i~ o O oI OI +o~ u U uI u~ y * : ; b C d dZ f g h j k l l^ m n diff --git a/dictsource/it_list b/dictsource/it_list index 506e550f..95c61f63 100644 --- a/dictsource/it_list +++ b/dictsource/it_list @@ -7,7 +7,7 @@ _cap k'apital _?? s'imbolo -_! p'Untoesklamat'ivo +_! p'untoesklamat'ivo _" viRgolet:e _# kantSellet:o _$ dolla:Ro @@ -15,37 +15,37 @@ _% peRtS'ento _& _!e: _' ap'OstRofo _( ap'eRtapaR'entezi -_) kj,UzapaR'entezi +_) kj,uzapaR'entezi _* asteRisko -_+ pjU +_+ pju _, v'iRgola _- t@-*at:ino -_. pUnto +_. punto _/ slaS -_: d,Uep'Unte -_; p'Untoev'iRgola +_: d,uep'unte +_; p'untoev'iRgola _< ap'eRta'angolo -_= Ugwale -_> kj,Uza'angolo -_? p'UntointeRogat'ivo +_= ugwale +_> kj,uza'angolo +_? p'untointeRogat'ivo _@ ki'otS:ola _[ ap'eRtakw'ad@-*a _\ bakslaS -_] kj,Uzakw'ad@-*a -_^ kap:UtS:o -__ 'UndeRskoRe +_] kj,uzakw'ad@-*a +_^ kap:utS:o +__ 'undeRskoRe _` bakp@-*aIm _{ ap'eRtag@-*'af:a _| b'aRa -_} kj,Uzag@-*'af:a +_} kj,uzag@-*'af:a _~ tilde // numbers _0 dz'eRo -_1 'Uno -_2 d'Ue +_1 'uno +_2 d'ue _3 tR'e _4 kw'at:Ro _5 tS'inkwe diff --git a/dictsource/it_rules b/dictsource/it_rules index c8df768f..f9ee8b5c 100644 --- a/dictsource/it_rules +++ b/dictsource/it_rules @@ -266,22 +266,22 @@ tt t: .group u - _) u(_ U: - u U: - u (CK U + _) u(_ u: + u u: + u (CK u u (A w2 - Kr) u (A U - Kl) u (A U + Kr) u (A u + Kl) u (A u @) u (dine_ 'u @) u (colo_ 'u .group v - _) v(_ vU: + _) v(_ vu: v v .group w - _) w(_ d'op:jav'U + _) w(_ d'op:jav'u w w2 .group x @@ -315,8 +315,8 @@ ó (CK 'o ò 'O: ò (CK 'O - ù 'U: - ù (CK 'U + ù 'u: + ù (CK 'u % pertS'ento $ dolla:ro @@ -325,14 +325,14 @@ & _!e @ ki'otS:ola © k'opiraIt - + pjU - . pUnto + + pju + . punto , (D v'irgola - : d,Uep'Unte - ; p'Untoev'irgola - ! _p'Untoesklamat'ivo_ + : d,uep'unte + ; p'untoev'irgola + ! _p'untoesklamat'ivo_ !) ! - ? _p'UntointeRogat'ivo_ + ? _p'untointeRogat'ivo_ ?) ? \\ bakslaS / slaS diff --git a/docs/add_language.html b/docs/add_language.html new file mode 100644 index 00000000..63c660f9 --- /dev/null +++ b/docs/add_language.html @@ -0,0 +1,132 @@ + + + + + + + +Back +
+

6. ADDING OR IMPROVING A LANGUAGE

+
+Most of the work doesn't need any programming knowledge. Just an understanding of the language, an +awareness of its features, patience and attention to detail. Wikipedia is a good source of basic phonetic information, eg +http://en.wikipedia.org/wiki/Vowel +

+In many cases it should be fairly easy to add a rough implementation of a new language, hopefully +enough to be intelligible.
+After that it's a gradual process of improvement to: +

+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. +
+

6.1 Language Code

+

Generally, the language's international ISO 639-1 code is used to +identify the language. It is used in the filenames which +contains the language's data. In the examples below the code "en" +(English) is used as an example. Replace this with the code of your +language.

+It is possible to have different variants of a language, for example where the sound of some phonemes changed, +or where some of the pronunciation rules differ. +


+

6.2 Phoneme File

+

You must first decide on the set of phonemes to be used for the +language. These should be listed and defined in a phonemes file such as +ph_english. A reference to this file is then included at the end of +the phonemes, file (the master phoneme file), eg:

+
   phonemetable  en  base
+   include  ph_english

+This example defines a phoneme table "en" which inherits +the contents of phoneme table "base". Its contents are +found in the file ph_english.

+

The base phoneme table contains definitions of a basic set of +consonants, and also some "control" phonemes such as stress marks and +pauses. The phoneme table for a language will generally inherit this, +or alternatively it may inherit the phoneme table of another language +which in turn inherits the base phoneme table.

+

The phonemes file for the language defines those additional +phonemes which are not inherited (generally the vowels and diphthongs, plus any additional +consonants), or phonemes whose definitions differ from the +inherited version (eg. the redefinition of a consonant).

+

Details of the contents of phonemes files are given in +phontab.html.

+The Compile phoneme data function of the espeakedit +program compiles the phonemes files to produce the files +espeak-data/phontab, phonindex, and phondata.

+For information on how to analyse recorded sounds of the language and to +prepare the corresponding phoneme data, see (not yet written).

+For an initial draft a language will often be able to use vowels and +consonants which have already been set up for another language. +


+

6.3 Dictionary Files

+

Once the language's phonemes have been +defined, then pronunciation dictionary data can be produced in order +to translate the language's source text into phonemes. This consists +of two source files: en_rules (the spelling to phoneme rules) and +en_list (an exceptions list, and attributes of certain words). The corresponding compiled data +file is espeak-data/en_dict which is produced from en_rules +and en_list sources by the command: speak  --compile=en.

+

Details of the contents of the +dictionary files are given in dictionary.html.

+

The en_list file contains not +only pronunciation exceptions, but also gives attributes to specific +words, Most notable of these are:

+

$u Some common words should be +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 +common adverbs and adjectives (eg. any, already)

+

$pause 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 +some prepositions.

+
+

6.4 Voice File

+

Each language should have one or more +voice files in espeak-data/voices. The filename of the default voice +for a language should be the same as the language code.

+

Details of the contants of voice files +are given in voices.html.

+

The simplest voice file would contain +just a single line to give the language code, eg:

+
   language en

+This language code specifies the phoneme table (i.e. phonemetable en and the +dictionary (i.e. espeak-data/en_dict) to be used. If needed, these can be +overridden by phonemes and dictionary attributes in the +voices file.

+
+

6.5 Program Code

+

The behaviour of the speak program is +controlled by various options (eg. whether words are stressed on the first, +last, or penultimate syllable). The function SetTranslator() at the +start of the tr_languages.cpp file recognizes the language +code and sets the appropriate set of options.

+

For a new language, you would add its +language code and the required options in SetTranslator(). However, this +may not be necessary during testing because most of the options can also be +set from the voice file in +espeak-data/voices.

+

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.

+
+ + + \ No newline at end of file diff --git a/docs/analyse.html b/docs/analyse.html new file mode 100644 index 00000000..4599eb84 --- /dev/null +++ b/docs/analyse.html @@ -0,0 +1,69 @@ + + + + + + + + + +Back +
+

ANALYSIS

+
+(Further notes are needed) +

+Recordings of spoken words and phrases can be analysed to try and make eSpeak match a language more closely. + +Unlike most other (larger and better quality) synthesizers, eSpeak's data is not produced directly from recorded sounds. To use an analogy, it's like a drawing or sketch compared with a photograph. Or vector graphics compared with a bitmap image. It's smaller, less accurate, with less subtlety, but it can sometimes show some aspects of the picture more clearly than a more accurate image. + +

Recording Sounds

+Recordings should be made while speaking slowly, clearly, and firmly and loudly (but not shouting). Speak about half a metre from the microphone. Try to avoid background noise and hum interference from electrical power cables. + + +

Praat

+I use a modified version of the praat program (www.praat.org) to view and analyse both sound recordings and output from eSpeak. The modification adds a new function (Spectrum->To_eSpeak) which analysis a voiced sound and produces a file which can be loaded into espeakedit. Details of the modification are in the "praat-mod" directory in the espeakedit package. + +The analysis contains a sequence of frames, one per cycle at the speech's fundamental frequency. Each frame is a short time spectrum, together with praat's estimation of the f1 to f5 formant frequencies at the time of that cycle. + +I also use Praat's New->Record_mono_sound function to make sound recordings. + +

Vowels and Diphthongs

+

Analysing a Recording

+ +Make a recording, with a male voice, and trim it in Praat to keep just the required vowel sound. Then use the new Spectrum->To_eSpeak modification (this was named To_Spectrogram2 in earlier versions) to analyse the sound. It produces a file named "spectrum.dat". + +Load the "spectrum.dat" file into espeakedit. Espeakedit has two Open functions, File->Open and File->Open2. They are the same, except that they remember different paths. I generally use File->Open2 for reading the "spectrum.dat" file. + +The data is displayed in espeakedit as a sequence of spectrum frames (see editor.html). + +

Tone Quality

+ +It can be difficult to match the tonal quality of a new vowel to be compatible with existing vowel files. This is determined by the relative heights and widths of the formant peaks. These vary depending on how the recording was made, the microphone, and the strength and tone of the voice. Also the positions of the higher peaks (F3 upwards) can vary depending on the characteristics of the speaker's voice. Formant peaks correspond to resonances within the mouth and throat, and they depend on its size and shape. With a female voice, all the formants (F1 upwards) are generally shifted to higher frequencies. + +For these reasons, it's best to use a male voice, and to use its analysed spectra only as guidance. Rather than construct formant-peaks entirely to match the analysed data, instead copy keyframes from a similar existing vowel. Then make small adjustments to match the position of the F1, F2, F3 formant peaks and hopefully produce the required vowel sound. + +

Using an Existing Vowel File

+ +Choose a similar vowel file from phsource/vowel and open it into espeakedit. It may be useful to use phsource/vowel/vowelchart as a map to show how vowel files compare with each other. You can select a keyframe from the vowel file and use CTRL-C and CTRL-V to copy the green formant peaks onto a frame of the new spectrum sequence. Then adjust the peaks to match the new frame. Press F1 to hear the sound of the formant peaks in the selected frame. + +The F0 peak is provided in order to adjust the correct balance of low frequencies, below the F1 peak. If the sound is too muffled, or conversely, too "thin", try adjusting the amplitude or position of the F0 peak. + + +

Length and Amplitude

+ +Use an existing vowel file as a guide for how to set the amplitude and length of the keyframes. At the right of each keyframe, its length is shown in mS and under that is its relative (RMS) amplitude. + +The second keyframe should be marked with a red marker (use CTRL-M to toggle this). This divides the vowel into the front-part (with one frame), and the rest. + +Use F2 to play the sound of the new vowel sequence. It will also produce a WAV file (the default name is speech.wav) which you can read into praat to see whether it has a sensible shape. + + +

Using the New Vowel

+ +Make a new directory (eg. vwl_xx) in phsource for your new vowels. Save the spectrum sequence with a name which you have chosen for it. + +You can then edit the phoneme file for your language (eg. phsource/ph_xxx), and change a phoneme to refer to your new vowel file. Then do Data->Compile_Phoneme_Data from espeakedit's menubar to re-compile the phoneme data. + + + diff --git a/docs/commands.html b/docs/commands.html new file mode 100644 index 00000000..2db107ea --- /dev/null +++ b/docs/commands.html @@ -0,0 +1,169 @@ + + + + + eSpeak Speech Synthesizer + + + + +Back +
+

2.1 INSTALLATION

+
+(This section only applies to Linux and other Posix systems).
+There are two versions of the command line program. They both have the same command parameters (see below). +
    +
  1. espeak uses speech engine in the libespeak shared library. The libespeak library must first be installed. +

    +

  2. speak is a stand-alone version which includes its own copy of the speech engine. +
+Place the espeak or speak executable file in the command path, eg in /usr/local/bin +

+Place the "espeak-data" directory in /usr/share as /usr/share/espeak-data.
+Alternatively if it is placed in the user's home directory (i.e. /home/<user>/espeak-data) +then that will be used instead. +

+

Dependencies

+espeak uses the PortAudio sound library (version 18), so you will need to have the libportaudio0 library package installed. It may be already, since it's used by other software, such as OpenOffice.org and the Audacity sound editor.

+Some Linux distrubitions (eg. SuSe 10) have version 19 of PortAudio which has a slightly different API. The speak program can be compiled to use version 19 of PortAudio by copying the file portaudio19.h to portaudio.h before compiling.

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

   #define USE_PORTAUDIO
+
in the file speech.h. +

 


+

2.2 COMMAND OPTIONS

+
+

2.2.1 Examples

+To use at the command line, type:
+   espeak "This is a test"
+or
+   espeak -f <text file> +

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

 


+

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

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

+Note: +

+

 


+

2.2.3 The Command Line Options

+
+
+espeak [options] ["words"]
+
Text input can be taken either from a file, from a string in the command, or from stdin. +

+

+-f <text file>
+
Speaks a text file. +

+

+ --stdin
+
Takes the text input from stdin. +

+

+If neither -f nor --stdin is given, then the text input is taken from "words" (a text string within double quotes).
If that is not present then text is taken from stdin, but each line is treated as a separate sentence. +

+

+-a <integer>
+
Sets amplitude (volume) in a range of 0 to 200. The default is 100. +

+

+-p <integer>
+
Adjusts the pitch in a range of 0 to 99. The default is 50. +

+

+-s <integer>
+
Sets the speed in words-per-minute (approximate values for the default voice, others may +differ slightly). The default value is 170. I generally use a faster speed +of 190. Range 80 to 370. +

+

+-b
+
Indicates that the input text is in the 8-bit character set which corresponds to the language (eg. Latin-2 for Polish). Without this option, eSpeak assumes text is UTF8, but will automatically switch to the 8-bit character set if it finds an illegal UTF8 sequence. That may give wrong results if some 8-bit character sequences look like valid UFT8 multibyte characters. +

+

+-l <integer>
+
Line-break length, default value 0. If set, then lines which are shorter +than this are treated as separate clauses and spoken separately with a +break between them. This can be useful for some text files, but bad for +others. +

+

+-m
+
Indicates that the text contains SSML (Speech Synthesis Markup Language) tags or other XML tags. Those SSML tags which are supported are interpreted. Other tags, including HTML, are ignored, except that some HTML tags such as <hr> <h2> and <li> ensure a break in the speech. +

+

+-v <voice filename>[+<variant>]
+
Sets a Voice for the speech, usually to select a language. eg: +
   espeak -vaf
+To use the Afrikaans voice. A modifier after the voice name can be used to vary the tone of the voice, eg: +
   espeak -vaf+3
+The variants are +1 +2 +3 +4 +5 for male voices and +11 +12 +13 +14 which simulate female voices by using higher pitches. +

+<voice filename> is a file within the espeak-data/voices directory.
+Voice files can specify a language, different pitches, tonal qualities, and prosody for the voice. +See the voices.html file.

+Voice names which start with mb- are for use with Mbrola diphone voices, see mbrola.html

+Some languages may need additional dictionary data, see languages.html +

+

+-w <wave file>
+
Writes the speech output to a file in WAV format, rather than speaking it. +

+

+-x
+
The phoneme mnemonics, into which the input text is translated, are +shown on stdout. +

+

+-X
+
As -x, but in addition, details are shown of the pronunciation rule and dictionary list lookup. This can be useful to see why a certain pronunciation is being produced. Each matching pronunciation rule is listed, together with its score, the highest scoring rule being used in the translation. "Found:" indicates the word was found in the dictionary lookup list, and "Flags:" means the word was found with only properties and not a pronunciation. You can see when a word has been retranslated after removing a prefix or suffix. +

+

-q
+Quiet. No sound is generated. This may be useful with the -x option. +

+

+-z
+
The option removes the end-of-sentence pause which normally occurs at the end of the text. +

+

+--stdout
+
Writes the speech output to stdout rather than speaking it. +

+

--compile[=<voice name>]
+
+Compile the pronunciation rule and dictionary lookup data from their source files in the current directory. The Voice determines which language's files are compiled. For example, if it's an English voice, then en_rules, en_list, and en_extra (if present), are compiled to replace en_dict in the speak-data directory. If no Voice is specified then the default Voice is used. +

+

--punct[="<characters>"]
+
+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. --punct=".,;?" +

+

+--voices[=<language code>]
+
Lists the available voices.
+If =<language code> is present then only those voices which are suitable for that language are listed.
+ +
+

 


+

2.2.4 The Input Text

+
+
HTML Input +
+If the -m option is used to indicate marked-up text, then HTML can be spoken directly. +

+

Phoneme Input +
+As well as plain text, phoneme mnemonics can be used in the text input to espeak. They are enclosed within double square brackets. Spaces are used to separate words and all stressed syllables must be marked explicitly.
+   eg:   [[D,Is Iz sVm f@n'EtIk t'Ekst 'InpUt]] +
+ + diff --git a/docs/dictionary.html b/docs/dictionary.html new file mode 100644 index 00000000..244078da --- /dev/null +++ b/docs/dictionary.html @@ -0,0 +1,566 @@ + + + + + eSpeak: Pronunciation Dictionaries + + + + + +Back +
+

4. TEXT TO PHONEME TRANSLATION

+
+

4.1 Translation Files

+There is a separate set of pronunciation files for each language, their names starting with the language name. +

+There are two separate methods for translating words into phonemes: +

+These two files are compiled into the file + <language>_dict  in the espeak-data directory (eg. espeak-data/en_dict) + +

 


+

4.2 Phoneme names

+Each of the language's phonemes is represented by a mnemonic of 1, 2, 3, or 4 characters. Together with a number of utility codes (eg. stress marks and pauses), these are defined in the phoneme data file (see *spec not yet available*). +

+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. +

+The phonemes which are used to represent a language's sounds are based on the Kirshenbaum ascii character representation of the International Phonetic Alphabet www.kirshenbaum.net/IPA/ascii-ipa.pdf + +

 


+

4.3 Pronunciation Rules

+The rules in the <language>_rules  file specify the phonemes which are used to pronounce each letter, or sequence of letters. Some rules only apply when the letter or letters are preceded by, or followed by, other specified letters. +

+To find the pronunciation of a word, the rules are searched and any which match the letters at the in the word are given a score depending on how many letters are matched. The pronunciation from the best matching rule is chosen. The pointer into the source word is then advanced past those letters which have been matched and the process is repeated until all the letters of the word have been processed. +

+

4.3.1 Rule Groups

+The rules are organized in groups, each starting with a ".group" line: +When matching a word, firstly the 2-letter group for the two letters at the current position in the word (if such a group exists) is searched, and then the single-letter group. The highest scoring rule in either of those two groups is used. + +

4.3.2 Rules

+Each rule is on separate line, and has the syntax: + +eg. + + "oo" is pronounced as [u:], but when also preceded by "b" and followed by "k", it is pronounced [U]. +

+In the case of a single-letter group, the first character of <match> much be the group letter. In the case of a 2-letter group, the first two characters of <match> must be the group letters. The second and third rules above may be in either .group o or .group oo +

+Alphabetic characters in the <pre>, <match>, and <post> parts must be lower case, and matching is case-insensitive. Some upper case letters are used in <pre> and <post> with special meanings. +

+

4.3.3 Special characters in <phoneme string>:

+ +

4.3.4 Special Characters in both <pre> and <post>:

+ + +The sets of letters indicated by A, B, C, E, F G may be defined differently for each language. +

+Examples of rules: +

     _)  a         // "a" at the start of a word
+         a (CC     // "a" followed by two consonants
+         a (C%     // "a" followed by a double consonant (the same letter twice)
+         a (/%     // "a" followed by a percent sign
+     %C) a         // "a" preceded by a double consonants
+
+

4.3.5 Special characters only in <pre>:

+ +eg. +
     @@)  bi      // "bi" preceded by at least two syllables
+     @@a) bi      // "bi" preceded by at least 2 syllables and following 'a'
+
+Note, that matching characters in the <pre> part do not affect the syllable counting. +

+

4.3.6 Special characters only in <post>:

+ + +eg. +
   @) ly (_$2   lI      // "ly", at end of a word with at least one other
+                        //   syllable, is a suffix pronounced [lI].  Remove
+                        //   it and retranslate the word.
+
+   _) un (@P2   ¬Vn     // "un" at the start of a word is an unstressed
+                        //   prefix pronounced [Vn]
+   _) un (i     ju:     // ... except in words starting "uni"
+   _) un (inP2  ,Vn     // ... but it is for words starting "unin"
+
+S and P must be at the end of the <post> string. +

+S<number> may be followed by additonal letters (eg. S2ei ). Some of these are probably specific to English, but similar functions could be used for other languages. + +

+

+P<number> may be followed by additonal letters (eg. P3v ). + +

+ +

 


+

4.4 Pronunciation Dictionary List

+The <language>_list  file contains a list of words whose pronunciations are given explicitly, rather than determined by the Pronunciation Rules. +The <language>_extra  file, if present, is also used and it's contents are taken as coming after those in <language>_list. +

+Also the list can be used to specify the stress pattern, or other properties, of a word. +

+If the Pronunciation rules are applied to a word and indicate a standard prefix or suffix, then the word is again looked up in Pronunciation Dictionary List after the prefix or suffix has been removed. +

+Lines in the dictionary list have the form: +

eg. +
     book      bUk
+
+Rather than a full pronunciation, just the stress may be given, to change where it would be otherwise placed by the Pronunciation Rules: +
     berlin       $2      // stress on second syllable
+     absolutely   $3      // stress on third syllable
+     for          $u      // an unstressed word
+
+

4.4.1 Multiple Words

+A pronunciation may also be specified for a group of words, when these appear together. Up to four words may be given, enclosed in brackets. This may be used for change the pronunciation or stress pattern when these words occur together, +
    (de jure)    deI||dZ'U@rI2   // note || used as a word break in the phoneme string
+or to run them together, pronounced as a single word +
    (of a)       @v@
+
+or to give them a flag when they occur together +
    (such as)    sVtS||a2z   $pause	   // precede with a pause
+
+

4.4.2 Special characters in <phoneme string>:

+ +

4.4.3 Flags

+A word (or group of words) may be given one or more flags, either instead of, or as well as, the phonetic translation. + + +The last group are probably English specific, but something similar may be useful in other languages. They are a crude attempt to improve the accuracy of pairs like ob'ject (verb) v 'object (noun) and read (present) v read (past). +

+The dictionary list is searched from bottom to top. The first match that satisfies any conditions is used (i.e. the one lowest down the list). So if we have: +

+    to    t@               // unstressed version
+    to    tu:   $atend     // stressed version
+
+then if "to" is at the end of the clause, we get [tu:], if not then we get [t@]. + +

 


+

4.5 Numbers and Character Names

+

4.5.1 Letter names

+The names of individual letters can be given either in the _rules or _list file. Sometimes an individual letter is also used as a word in the language and its pronunciation as a word differs from its letter name. If so, it should be listed in the _list file, preceded by an underscore, to give the letter name (as distinct from its pronunciation as a word). eg. in English: +
   _a   eI
+

4.5.2 Numbers

+The operation the TranslateNumber() function is controlled by the language's langopts.numbers option. This constructs spoken numbers from fragments according to various options which can be set for each language. The number fragments are given in the _list file. +

+

+ + + diff --git a/docs/docindex.html b/docs/docindex.html new file mode 100644 index 00000000..f3806d23 --- /dev/null +++ b/docs/docindex.html @@ -0,0 +1,65 @@ + + + + + eSpeak Speech Synthesizer + + + + + + + + + + + + + + + + +
+SourceForge.net Logo + +

eSpeak - Documents

+
+ +Home +

+Usage +

+Languages + +

+

Voice Files

+Voice files specify a language and other characteristics of a voice. +

Mbrola Voices

+eSpeak can be used as a front-end for Mbrola diphone voices. +

Pronunciation Dictionary

+
    +
  • How to add pronunciation corrections. +
  • How to build up pronunciation rules for a new language. +

+

Adding a Language

+How to add or improve a language. +

Phonemes

+The list of phoneme mnemonics, for use in the Pronunciation Dictionary. +

Phoneme Tables

+The tables of the phonemes used by each language, with their properties and sound production. +

eSpeak Libary API

+API definition and header file for a shared library version of eSpeak. +

Markup tags

+SSML (Speech Synthesis Markup Language) and HTML tags recognized by eSpeak. +

The espeakedit program

+GUI software to edit vowel files and to compile the phoneme data for use by eSpeak.
+ +
+ + + + diff --git a/docs/download.html b/docs/download.html new file mode 100644 index 00000000..089ce319 --- /dev/null +++ b/docs/download.html @@ -0,0 +1,37 @@ + + + + + espeak: Downloads + + + +Back +
+

ESPEAK DOWNLOADS

+
+This page gives direct links to eSpeak downloads on one of the Sourceforge mirrors.
To get other versions of eSpeak, or use other mirrors, use the Sourceforge download page +

+Source code and dictionary data.
+espeak-1.23-source.zip (0.9 MBytes) +

+Compiled for Linux i386 (Debian/Ubuntu based distros)
+espeak-1.23-linux.zip (0.7 MBytes) +

+Compiled for Windows. SAPI5 and command-line versions.
+espeak-1.23-win.zip (0.7 MBytes) +

+Compiled for RISC OS
+espeak-3.23-riscos.zip (0.7 MBytes) + +


+espeakedit program and the phoneme data. +

+Source code and compiled for Linux.
+espeakedit-1.23.zip (6 MBytes) +

+Compiled for Windows.
+espeakedit-1.23-win.zip (4 MBytes) + + + diff --git a/docs/editor.html b/docs/editor.html new file mode 100644 index 00000000..da25f105 --- /dev/null +++ b/docs/editor.html @@ -0,0 +1,75 @@ + + + + + + espeakedit + + + + +Back +


+

ESPEAKEDIT PROGRAM

+
+The espeakedit program is used to prepare phoneme data for the eSpeak speech synthesizer.

+It has two main functions: +

+
+

Installation

+espeakedit needs the following packages:
+(The package names mentioned here are those from the Ubuntu "Dapper" Linux distribution). + +In addition, a modified version of praat (www.praat.org) is used to view and analyse WAV sound files. +This needs the package libmotif3 to run and libmotif-dev to compile. +
+

Quick Guide

+This will quickly illustrate the main features. Details of the interface and key commands are given in editor_if.html

+For more detailed information on analysing sound recordings and preparing phoneme definitions and keyframe data see analyse.html (to be written). +

Compiling Phoneme Data

+
    +
  1. Run the espeakedit program.

    +

  2. Select Data->Compile phoneme data from the menu bar. Dialog boxes will ask you to locate the directory (phsource) which contains the master phonemes file, and the directory (dictsource,) which contains the dictionary files (en_rules, en_list, etc). Once specified, espeakedit will remember their locations, although they can be changed later from Options->Paths.

    +

  3. A message in the status line at the bottom of the espeakedit window will indicate whether there are any errors in the phoneme data, and how many language's dictionary files have been compiled. The compiled data is placed into the espeak-data directory, ready for use by the speak program. If errors are found in the phoneme data, they are listed in a file error_log in the phsource directory.
  4. +

    +NOTE: espeakedit can be used from the command line to compile the phoneme data, with the command: espeakedit --compile +

  5. Select Tools->Make vowels chart->From compiled phoneme data. This will look for the vowels in the compiled phoneme data of each language and produce a vowel chart (.png file) in phsource/vowelcharts. These charts plot the vowels' F1 (formant 1) frequency against their F2 frequency, which corresponds approximately to their open/close and front/back positions. The colour in the circle for each vowel indicates its F3 frequency, red indicates a low F3, through yellow and green to blue and violet for a high F3. In the case of a diphthong, a line is drawn from the circle to the position of the end of the vowel. +
+

Keyframe Sequences

+
    +
  1. Select File->Open from the menu bar and select a vowel file, phsource/vowel/a. This will open a tab in the espeakedit window which contains a sequence of 4 keyframes. Each keyframe shows a black graph, which is the outline of an original analysed spectrum from a sound recording, and also a green line, which shows the formant peaks which have been added (using the black graph as a guide) and which produce the sound.

    +

  2. Click in the "a" tab window and then press the F2 key. This will produce and play the sound of the keyframe sequence. The first time you do this, you'll get a save dialog asking where you want the WAV file to be saved. Once you give a location all future sounds will be stored in that same location, although it can be changed from Options->Paths.

    +

  3. Click on the second of the four frames, the one with the red square. Press F1. That plays the sound of just that frame.

    +

  4. Press the 1 (number one) key. That selects formant F1 and a red triangle appears under the F1 formant peak to indicate that it's selected. Also an = sign appears next to formant 1 in the formants list in the left panel of the window.

    +

  5. Press the left-arrow key a couple of times to move the F1 peak to the left. The red triangle and its associated green formant peak moves lower frequency. Its numeric value in the formants list in the left panel decreases.

    +

  6. Press the F1 key again. The frame will give a slightly different vowel sound. As you move the F1 peak slightly up and down and then press F1 again, the sound changes. Similarly if you press the 2 key to select the F2 formant, then moving that will also change the sound. If you move the F1 peak down to about 700 Hz (and reduce its height a bit with the down-arrow key) and move F2 up to 1400 Hz, then you'll hear a "er" schwa [@] sound instead of the original [a].

    +

  7. Select File->Open and choose phsource/vowel/aI. This opens a new tab labelled "aI" which contains more frames. This is the [aI] diphthong and if you click in the tab window and press F2 you'll hear the English word "eye". If you click on each frame in turn and press F1 then you can hear each of the keyframes in turn. They sound different, starting with an [A] sound (as in "palm"), going through something like [@] in "her" and ending with something like [I] in "kit" (or perhaps a French é). Together they make the diphthong [aI]. +
+

Text and Prosody Windows

+
    +
  1. Click on the Text tab in the left panel. Two text windows appear in the panel with buttons Translate and Speak below them.

    +

  2. Type some text into the top window and click the Translate button. The phonetic translation will appear in the lower window.

    +

  3. Click the Speak button. The text will be spoken and a Prosody tab will open in the main window.

    +

  4. Click on a vowel phoneme which is displayed in the Prosody tab. A red line appears under it to indicate that it has been selected.

    +

  5. Use the up-arrow or down-arrow key to move the vowel's blue pitch contour up or down. Then click the Speak button again to hear the effect of the altered pitch. If the adjacent phoneme also has a pitch contour then you may hear a discontinuity in the sound if it no longer matches with the one which you have moved.

    +

  6. Hold down the Ctrl key while using the up-arrow or down-arrow keys. The gradient of the pitch contour will change.

    +

  7. Click with the right mouse button over a phoneme. A menu allows you to select a different pitch envelope shape. Details of the currently selected phoneme appear in the Status line at the bottom of the window. The Stress number gives the stress level of the phoneme (see voices.html for a list).

    +

  8. Click the Translate button. This re-translates the text and restores the original pitches.

    +

  9. Click on a vowel phoneme in the Prosody window and use the < and > keys to shorten or lengthen it.

    +

+The Prosody window can be used to experiment with different phoneme lengths and different intonation.

+ +


+ + + + + + diff --git a/docs/editor_if.html b/docs/editor_if.html new file mode 100644 index 00000000..3a850427 --- /dev/null +++ b/docs/editor_if.html @@ -0,0 +1,143 @@ + + + + + Editor - Spectrum + + + + +Back +
+

USER INTERFACE - FORMANT EDITOR

+
+

Frame Sequence Display

+The eSpeak editor can display a number of frame-sequencies in tabbed windows. Each frame can contain a short-time frequency spectrum, covering the period of one cycle at the sound's pitch. Frames can also show: + +

Text Tab

+Enter text in the top left text window. Click the Translate button to see the phonetic transcription in the text window below. Then click the Speak button to speak the text and show the results in the Prosody tab, if that is open. +

+If changes are made in the Prosody tab, then clicking Speak will speak the modified prosody while Translate will revert to the default prosody settings for the text. +

+To enter phonetic symbols (Kirschenbaum encoding) in the top left text window, enclose them within [[ ]]. +

Spect Tab

+The "Spect" tab in the left panel of the eSpeak editor shows information about the currently selected frame and sequence. + + + +

Key Commands

+ +

  +


+

USER INTERFACE - PROSODY EDITOR

+
+ + + diff --git a/docs/images/lips.png b/docs/images/lips.png new file mode 100644 index 00000000..27481b30 Binary files /dev/null and b/docs/images/lips.png differ diff --git a/docs/images/sand-light.jpg b/docs/images/sand-light.jpg new file mode 100644 index 00000000..87715ad2 Binary files /dev/null and b/docs/images/sand-light.jpg differ diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..410f5bf7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,78 @@ + + + + eSpeak: Speech Synthesizer + + + + + + + + + + + + + + +
+SourceForge.net Logo + +
+

eSpeak text to speech

+
+(email)   jonsd at users dot sourceforge.net
+Download +         Forum +
+
+ +Usage +

+Languages +

+Documents +

+Samples + +

+eSpeak is a compact open source software speech synthesizer for English and other languages.   +http://espeak.sourceforge.net +

+eSpeak produces good quality English speech. It uses a different synthesis method from other open source TTS engines, and sounds quite different. It's perhaps not as natural or "smooth", but I find the articulation clearer and easier to listen to for long periods. +

+It can run as a command line program to speak text from a file or from stdin. A shared library version is also available. + +

    +
  • Includes different Voices, whose characteristics can be altered. +
  • Can produce speech output as a WAV file. +
  • SSML (Speech Synthesis Markup Language) is supported (not complete), and also HTML. +
  • Compact size. The program and its data, including several languages, totals about 700 kbytes. +
  • Can translate text to phoneme codes, so it could be adapted as a front end for another speech synthesis engine. +
  • Potential for other languages. Several are included in varying stages of progress. Help from native speakers for these or other languages is welcomed. +
  • Development tools available for producing and tuning phoneme data. +
  • Written in C++. +
+

+It works well as a "Talker" with the KDE text to speech system (KTTS), as an alternative to Festival for example. As such, it can speak text which has been selected into the clipboard, or directly from the Konquerer browser or the Kate editor. A Gnome Speech driver is now available. +

+I regularly use it to listen to blogs and news sites. I prefer the sound through a domestic stereo system rather than my small computer speakers. +


+Windows Version. There is now a Windows SAPI5 version of eSpeak. It can be used with screen readers such as NVDA, JAWS, Supernova, and Window-Eyes.
+This is available as a Windows installer package from the eSpeak Download page.

+A Windows version of the espeakedit program is also available. + +


+Languages. 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.

+eSpeak does text to speech synthesis for the following languages, some better than others. Afrikaans, Croatian, Czech, Dutch, English, Esperanto, Finnish, French, German, Greek, Hindi, Hungarian, Italian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swahili, Swedish, Vietnamese, Welsh. See Languages. +


+espeakedit 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. +
+speak was originally written for Acorn/RISC_OS computers starting in 1995. This version is an update and re-write, including a relaxation of the original memory and processing power constraints, and with support for additional languages if anyone is interested in doing so. +

+The project name speak had already been taken by another project on SourceForge (for a Windows TTS front-end) so I added a letter 'e' to the front to make eSpeak. For now, the program executable remains speak and is referred to as such in the documentation. +

+ + + diff --git a/docs/languages.html b/docs/languages.html new file mode 100644 index 00000000..82a4791c --- /dev/null +++ b/docs/languages.html @@ -0,0 +1,220 @@ + + + + + eSpeak Speech Synthesizer + + + + +Back +
+

3. LANGUAGES

+
+

Help Needed

+Many of these are just experimental attempts at these languages, produced after a quick reading of the corresponding article on wikipedia.org. They will need work or advice from native speakers to improve them. Please contact me if you want to advise or assist with these or other languages.

+The sound of some phonemes may be poorly implemented, particularly [r] since I'm English and therefore unable to make a "proper" [r] sound.

+A major factor is the rhythm or cadance. An Italian speaker told me the Italian voice improved from "difficult to understand" to "good" by changing the relative length of stressed syllables. Identifying unstressed function words in the xx_list file is also important to make the speech flow well. See Adding or Improving a Language +

Character sets

+Languages recognise text either as UTF8 or alternatively in an 8-bit character set which is appropriate for that language. For example, for Polish this is Latin2, for Russian it is KOI8-R. This choice can be overridden by a line in the voices file to specify an ISO 8859 character set, eg. for Russian the line:
+
     charset 5
+will mean that ISO 8859-5 is used as the 8-bit character set rather than KOI8-R. +

+In the case of a language which uses a non-Latin character set (eg. Greek or Russian) if the text contains a word with Latin characters then that particular word will be pronounced using English pronunciation rules and English phonemes. Speaking entirely English text using a Greek or Russian voice will sound OK, but each word is spoken separately so it won't flow properly. +

+Sample texts in various languages can be found at http://<language>.wikipedia.org and www.gutenberg.org +

3.1 Voice Files

+ +A number of Voice files are provided in the espeak-data/voices directory. +You can select one of these with the -v <voice filename> parameter to the +speak command, eg: +
   espeak -vaf
+to speak using the Afrikaans voice. +

+For details of the voice files see Voices. +

Default Voice

+ +

3.2 English Voices

+ +

3.3 Voice Variants

+To make alternative voices for a language, you can make additional voice files in espeak-data/voices which contains commands to change various voice and pronunciation attributes. See voices.html. +

+Alternatively there are some preset voice variants which can be applied to any of the language voices, by appending + and a number. Their effects are defined by files in espeak-data/voices/!v. +

+The variant numbers are +1 +2 +3 +4 +5 for male voices and +11 +12 +13 +14 for female voices. For example: +

   espeak -ven+3
+

3.4 Other Languages

+The eSpeak speech synthesizer does text to speech for the following additional langauges. + +

3.5 Provisional Languages

+These languages are only initial naive implementations which have had little or no feedback and improvement from native speakers. +