Back

## 3. VOICES

### 3.1 Voice Files

A Voice file specifies a language (and possibly a language variant or dialect) together with various attributes that affect the characteristics of the voice quality and how the language is spoken.

Voice files are placed in the `espeak-data/voices` directory, or within subdirectories in there.

The available voice files can be listed by:

       speak --voices
    or
       speak --voices=<language>

### 3.2 Contents of Voice Files

The language attribute is mandatory. All the other attributes are optional.

#### Identification Attributes

name <name>
  A name given to this voice.

language <language code> [<priority>]
  This attribute should appear before the other attributes which are listed below.

  It selectes the default behaviour and characteristics for the language, and sets default values for "phonemes", "dictionary" and other attributes. The <language code> should be a two-letter ISO 639-1 language code. One or more language variant codes may be appended, separated by hyphens. (eg. en-uk-north).

  The optional <priority> value gives the preference of this voice compared with others for the specified language. A low value indicates a more preferred voice. The default value is 5.

  More than one language line may be present. A voice may be selected for other related languages (variants which have the same initial 2 letter language code as the specified language), but it will be less preferred for these. Different language variants may be specified by additional language lines in order to indicate that this is a preferred voice for them also. Eg.

         language en-uk-north
         language en

  indicates that this is voice is for the "en-uk-north" dialect, but it is also a main choice when a general "en" language is specified. Without the second language line, it would be disfavoured for "en" for being a more specialised voice.

gender <gender> [<age>]

<gender> may be male, female, or unknown.
<age> is optional and gives an age in years.

#### Voice Attributes

pitch <base> <range>
  Two integer values. The first gives a base pitch to the voice (value in Hz) The second controls the range of pitches used by the voice. Setting it equal to the base pitch will give a monotone. The default values are 82 118.

formant <number> <frequency> <strength> <width>
  Systematically adjusts the frequency, strength, and width of the resonance peaks of the voice. Values are percentages of the default values. Changing these affects the tone/quality of the voice.
  - Formants 1,2,3 are the standard three formants which define vowels.
  - Formant 0 is used to give a low frequency component to the sounds, of frequency lower than F1.
  - Formants 4,5 are higher than F3. They affect the quality of the voice.
  - Formants 6,7,8 are weak, high frequency, additions to vowels to give a clearer sound.

echo <delay> <amplitude>
  Parameter 1 gives the delay in mS (0 to 250mS).
  Parameter 2 gives the echo amplitude (0 to 100).
  Adding some echo can give a clearer or more interesting sound, especially when listening through a domestic stereo sound system, rather than small computer speakers.

flutter <value>
  Default value: 2.
  Adds pitch fluctuations to give a wavering or older-sounding voice. A large value (eg. 20) makes the voice sound "croaky".

roughness <value>

Default value: 2. Range 0 - 7
Reduces the amplitude of alternate waveform cycles in order to make the voice sound creaky.

#### Language Attributes

phonemes <name>
  Specifies which set of phonemes to use from those contained in the phontab, phonindex, and phondata data files. This is a phonemetable name as given in the "phoneme" source file.

  This parameter is usually not needed as it is set by default to the first two letters of the "language" parameter. However, different voices of the same language can use different phoneme sets, to give different accents.

dictionary <name>
  Specifies which pair of dictionary files to use. eg. "english" indicates that speak-data/en_dict should be used to translate from words to phonemes. This parameter is usually not needed as it is set by default to the first two letters of "language" parameter.

dictrules <list of rule numbers>
  Gives a list of conditional dictionary rules which are applied for this voice. Rule numbers are in the range 0 to 31 and are specific to a language. They can apply to rules in the langauge's _rules dictionary file and also its _list exceptions list. See dictionary.html.

words <value>
  Indicates to what extent words are separated from each other, or run together. A default value is set by "language".
  - 0 run words together where appropriate
  - 1 don't merge phonemes between words
  - 2 as (1) but also ensure a short pause before stops and fricatives
  - 3 short pause between words
  - 4 slightly longer pause between words

replace <flags> <phoneme> <replacement phoneme>
  Replace a phoneme by another whenever it occurs.

  <replacement phoneme> may be NULL.

  Flags: bit 0: replacement only occurs on the final phoneme of a word.
  Flags: bit 1: replacement doesn't occur in stressed syllables.
  eg.

            replace  0  h  NULL      // drops h's
            replace  0  V  U         // replaces vowel in 'strut' by that in 'foot'
                                     // as occurs in northern British English
            replace  3  N  n         // change 'fishing' to 'fishin' etc.
                                     // (only the last phoneme of a word, only in unstressed syllables)

  The phoneme mnemonics can be defined for each language, but some are listed in phonemes.html

stressLength <8 integer values>
  Eight integer parameters. These control the relative lengths of the vowels in stressed and unstressed syllables.
  - 0 unstressed
  - 1 diminished. Its use depends on the language. In English it's used for unstressed syllables within multisyllabic words.
  - 2 secondary stress
  - 3 words marked as "unstressed" in the dictionary
  - 4 not currently used
  - 5 not currently used
  - 6 stressed syllable (the main syllable in stressed words)
  - 7 tonic syllable (by default, the last stressed syllable in the clause)

stressAmp <8 integer values>
  Eight integer parameters. These control the relative amplitudes of the vowels in stressed and unstressed syllables (see stressLength above). The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.

intonation <param1> <param2>
  (for further development)
  param1 is currently not used
  param2 can be 0, 1, 2 (default=0) It affects how often the pitch rises and falls during a clause.

Additional attributes are available to set various internal options which control how language is processed. These would normally be set in the program code rather than in a voice file.

charset <param1>
  The ISO 8859 character set number.
stressrule <param1> <param2> <param3> <param4>
  Controls how different stress levels are applied to the syllables of a word.
l_dieresis <param1>
l_prefix <param1>
l_regressive_voicing <param1>
l_unpronouncable <param1>
l_final_syllable <param1>
l_sonorant_min <param1>

### 3.3 Voice Files Provided

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.

default
  This voice is used if none is specified in the speak command. Copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.

#### 3.3.1 English Voices

en
  is the standard default English voice.

en-n
en-rp
en-wn
  are different English voices. These can be considered caricatures of various British accents: Northern, Received Pronunciation, West Midlands respectively.

en-f, en-n-f, en-rp-f, en-wm-f
  Female versions of the above. Not genuine female voices, just variants with different pitch and formant parameters.

en1 to en8
  Variations of "en" with different effects and settings.

#### 3.3.2 Other Languages

These are mostly 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 work on 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.

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

af
  Afrikaans. This has been worked on by a native speaker. He says it's ready for release, although needing some more work, particularly in the area of which syllables are stressed (Afrikaans has irregular phonemic stress, like English) and pronunciation of compound words. Features include some distinctive diphthongs and an interesting [g] sound (a sort of gargling noise).

de
  A simple attempt at German, perhaps a bit improved from the previous release. I have only a small knowledge of German, from school many years ago, but even I can at tell that it needs much improvement. A big problem is stress placement (which like English is irregular), prosody, and the use of compound words where correct detection of the sub-word boundaries would probably be needed for accurate pronunciation.

el
  Greek. This hasn't been seen by a Greek speaker yet. Stress position is marked in text and spelling is fairly regular, so it shouldn't be too bad. It uses a different alphabet and switches to English pronunciation for words which contain Latin characters a-z.

eo
  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. The stress pattern (stress on penultimate syllables) is different from English. Text can be either UTF-8, or Latin3 alphabet, or can use the Latin1 convention of two-letter combinations (cx, gx, etc).

es
  Spanish. Just something I knocked together one day after reading a couple of articles on Spanish pronunciation. However, since spelling is regular and stress is explicitly marked when it deviates from the normal rules, it might even be intelligible. This would be a good opportunity for a native Spanish speaker to assist. Perhaps we could have different variants for Castilian Spanish, Mexican Spanish, etc., in a similar way to how I've done different English accents.

it
  Italian. This has had some attention from a native speaker but more work is needed. Spelling is fairly regular, but stress marks and vowel accents are often omitted from text, so the dictionary/exceptions list will need to determine whether to use open/close [e] or [E] and [o] or [O].

pl
  Polish. An experiment with a language with some fearsome consonant clusters, palatal consonants, and even a couple of nasal vowels. I don't know whether I've got those anything like correct, or how it will sound to a Pole, but it sounds vaguely Slavic to me.