Академический Документы
Профессиональный Документы
Культура Документы
espeak-data/voices/fr. The voice file. This gives the language name and may set some
options.
phsource/ph_french. The phoneme definition file. This contains phoneme definitions for
the vowels and consonants which the language uses. Usually it will contain mostly
vowels. Most consonants will be inherited from the common phoneme definitions in the
master phoneme file, phsource/phonemes. The master phoneme file needs to be edited
to call your new ph_french file.
dictsource/fr_list. This contains pronunciations for numbers, letter and symbol names,
and words with exceptional pronunciations. It also gives attributes such as "unstressed"
and "pause" to some common words.
The fr_rules and fr_list files are compiled to produce the file espeak-data/fr_dict, which
eSpeak uses when it is speaking.
This language code specifies which phoneme table and dictionary to use (i.e. phonemetable fr
and espeak-data/fr_dict) to be used. If needed, these can be overridden by phonemes and
dictionary attributes in the voice file. For example you may want to start the implementation of
a new language by using the phoneme table of an existing language.
This example defines a phoneme table "fr" which inherits the contents of phoneme table
"base". Its contents are found in the file ph_french.
The base phoneme table contains definitions of a basic set of consonants, and also some
"control" phonemes such as stress marks and pauses. These are defined in phsource/phonemes.
The phoneme table for a language will inherit these, 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 that are needed), or
phonemes whose definitions differ from the inherited version (eg. the redefinition of a
consonant).
Details of phonemes files are given in phontab.html.
The Compile phoneme data function of the espeakedit program compiles the phonemes files of
all languages to produce the files espeak-data/phontab, phonindex, and phondata which are
used by eSpeak.
For many languages, the consonant phonemes which are already available in eSpeak, together
with the available vowel files which can be used to define vowel phonemes, will be sufficient. At
least for an initial implementation.
Pronunciation of numbers.
Attributes for words. For example, common function words which should not be stressed,
or conjunctions which should be preceded by a pause.
The behaviour of the eSpeak program is controlled by various options such as:
Default rules for which syllable of a word has the main stress.
The function SetTranslator() at the start of the source code file tr_languages.cpp recognizes the
language code and sets the appropriate 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 in the voice file in espeak-data/voices (see
Voice files).
Make the spelling-to-phoneme translation rules more accurate, including the position of
stressed syllables within words. Some languages are easier than others. I expect most are
easier than English.
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, in a stressed or unstressed syllable, etc. This may consist of making small
adjustments to vowel and diphthong quality or length, or adjusting the strength of
consonants. Phoneme definitions can include conditional statements which can be used to
change the sound of a phoneme depending on its environment. Bigger changes may be
recording new or replacement consonant sounds, or may even need program code to
implement new types of sounds.
Some common words should be added to the dictionary (the fr_list file for the language)
with an "unstressed" attribute $u or $u+ (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.
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.
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.
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.