Debian Codegraph @

docs/voices.html

raw
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html>
3
4 <head>
5 <title>eSpeak: Voice Files</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
7 </head>
8 <body>
9 <A href="index.html">Back</A>
10 <hr>
11 <h2>5. VOICES</h2>
12 <hr>
13 <h3>5.1 Voice Files</h3>
14 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.<p>
15 Voice files are placed in the <code>espeak-data/voices</code> directory, or within subdirectories in there.<p>
16 The available voice files can be listed by:<pre>
17 espeak --voices
18 or
19 espeak --voices=&lt;language&gt;</pre>
20 also
21 <pre> espeak --voices=&lt;variant&gt;</pre>
22 Lists voice variants which can be applied to eSpeak voices.
23 <pre> espeak --voices=&lt;mbrola&gt;</pre>
24 Lists the Mbrola voices.
25 <hr>
26 <h3>5.2 Contents of Voice Files</h3>
27 The <strong>language</strong> attribute is mandatory. All the other attributes are optional.
28 <p>
29 <h4>Identification Attributes</h4>
30 <ul>
31 <dl>
32 <dt>
33 <strong>name &nbsp;&lt;name&gt;</strong><br>
34 <dd>A name given to this voice.
35 <p>
36 <dt>
37 <strong>language &nbsp;&lt;language code&gt; [&lt;priority&gt;]</strong><br>
38 <dd>This attribute should appear before the other attributes which are listed below.<p>
39 It selects the default behaviour and characteristics for the language, and sets default values for
40 "phonemes", "dictionary" and other attributes. The &lt;language code&gt; 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).<p>
41 The optional &lt;priority&gt; 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.<p>
42 More than one <strong>language</strong> 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 <strong>language</strong> lines in order to indicate that this is a preferred voice for them also. Eg.<pre>
43 language en-uk-north
44 language en</pre>
45 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 <strong>language</strong> line, it would be disfavoured for "en" for being a more specialised voice.
46 <p>
47 <dt>
48 <strong>gender &nbsp;&lt;gender&gt; [&lt;age&gt;]</strong><br>
49 <dd>
50 This attribute is only a label for use in voice selection. It doesn't change the sound of the voice.
51 <ul>&lt;gender&gt may be male, female, or unknown.<br>
52 &lt;age&gt; is optional and gives an age in years.
53 </dl>
54 </ul>
55 <h4>Voice Attributes</h4>
56 <ul>
57 <dl>
58 <dt>
59 <strong>pitch &nbsp;&lt;base&gt; &lt;range&gt;</strong><br>
60 <dd> Two integer values.
61 The first gives a base pitch to the voice (value in Hz)
62 The second controls the range of pitches used by the voice. Setting
63 it equal to the base pitch will give a monotone. The default values are 82 118.
64 <p>
65 <dt>
66 <strong>formant &nbsp;&lt;number&gt; &lt;frequency&gt; &lt;strength&gt; &lt;width&gt; &lt;freq_add&gt;</strong><br>
67 <dd> Systematically adjusts the frequency, strength, and width of the
68 resonance peaks of the voice. Values are percentages of the
69 default values. Changing these affects the tone/quality of the voice.<p>
70 <strong>freq_add </strong> Adds a constant value (in Hz) to the frequency of the formant peak. The value may be negative.
71 <ul>
72 <li>Formants 1,2,3 are the standard three formants which define vowels.</li>
73 <li>Formant 0 is used to give a low frequency component to the sounds, of
74 frequency lower than F1.</li>
75 <li>Formants 4,5 are higher than F3. They affect the quality of the voice.</li>
76 <li>Formants 6,7,8 are weak, high frequency, additions to vowels to give
77 a clearer sound.</li>
78 </ul>
79 <p>
80 <dt>
81 <strong>echo &nbsp;&lt;delay&gt; &lt;amplitude&gt;</strong><br>
82 <dd> Parameter 1 gives the delay in mS (0 to 250mS).<br>
83 Parameter 2 gives the echo amplitude (0 to 100).<br>
84
85 Adding some echo can give a clearer or more interesting sound,
86 especially when listening through a domestic stereo sound system,
87 rather than small computer speakers.
88 <dt>
89 <strong>tone</strong><br>
90 <dd> Controls the tone of the sound.<br>
91 <strong>tone</strong> is followed by up to 4 pairs of &lt;frequency&gt; &lt;amplitude&gt; which define a frequency response graph. Frequency is
92 in Hz and amplitude is in the range 0 to 255. The default is:<p>
93 <code> &nbsp; tone 600 170 &nbsp;1200 135 &nbsp;2000 110</code><p>
94 This means that from frequency 0Hz to 600Hz the amplitude is 170. From
95 600Hz to 1200Hz the amplitude decreases from 170 to 135, then decreases to 110 at 2000Hz
96 and remains at 110 at higher frequencies. This adjustment applies only to voiced sounds such as
97 vowels and sonorant consonants (such as [n] and [l]). Unvoiced sounds such
98 as [s] are unaffected.<p>
99 This <strong>tone</strong> statement can also appear in <code>espeak-data/config</code>, in which case it applies to all voices which
100 don't have their own <strong>tone</strong> statement.
101 <p>
102 <dt>
103 <strong>flutter &nbsp;&lt;value&gt;</strong><br>
104 <dd> Default value: 2.<br>
105
106 Adds pitch fluctuations to give a wavering or older-sounding voice.
107 A large value (eg. 20) makes the voice sound "croaky".
108 <p>
109 <dt>
110 <strong>roughness &nbsp;&lt;value&gt;</strong><br>
111 <dd> Default value: 2. Range 0 - 7<br>
112
113 Reduces the amplitude of alternate waveform cycles in order to make the voice sound creaky.
114 <p>
115 <dt>
116 <strong>voicing &nbsp;&lt;value&gt;</strong><br>
117 <dd> Default value: 100.<br>
118
119 Adjusts the strength of formant-synthesized sounds (vowels and sonorant consonants).
120 <p>
121 <dt>
122 <strong>consonants &nbsp;&lt;value&gt;&nbsp;&lt;value&gt;</strong><br>
123 <dd> Default values: 100, 100.<br>
124
125 Adjusts the strength of noise sounds which are used in consonants. The first value is the strength of unvoiced consonants such as "s" and "t". The second value is the strength of the noise component of voiced consonants such as "z" and "d".
126 <p>
127 <dt>
128 <strong>breath &nbsp;&lt;up to 8 integer values&gt;</strong><br>
129 <dd> Default values: 0.<br>
130
131 Adds noise which corresponds to the formant frequency peaks. The values give the strength
132 of noise for each formant peak (formants 1 to 8).
133 <p>
134 Use together with a low or zero value of the <strong>voicing</strong> attribute to make a "wisper".
135 For example:<br>
136 <code>breath &nbsp; 75 75 60 40 15 10<br>
137 breathw &nbsp;150 150 200 200 400 400<br>
138 voicing &nbsp;18<br>
139 flutter &nbsp;20<br>
140 formant &nbsp; 0 100 0 100 &nbsp; // remove formant 0
141 </code>
142
143 <p>
144 <dt>
145 <strong>breathw &nbsp;&lt;up to 8 integer values&gt;</strong><br>
146 <dd>
147 These values give bandwidths of the noise peaks of the <strong>breath</strong> attribute. If <strong>breathw</strong> values are not given, then suitable default values will be used.
148 <p>
149 <dt>
150 <strong>speed &nbsp;&lt;value&gt;</strong><br>
151 <dd> Default value 100.<br>
152 Adjusts the speaking speed by a percentage of the default rate. This can be used if a language voice seems faster or slower compared to other voices.
153 <p>
154 </dl>
155 </ul>
156 <h4>Language Attributes</h4>
157 <ul>
158 <dl>
159 <p>
160 <dt>
161 <strong>phonemes &nbsp;&lt;name&gt;</strong><br>
162 <dd>Specifies which set of phonemes to use from those contained in the
163 phontab, phonindex, and phondata data files.
164 This is a <strong>phonemetable</strong> name as given in the "phoneme" source file.
165 <p>
166 This parameter is usually not needed as it is set by default to the first two letters of the "language" parameter.
167 However, different voices of the same language can use different phoneme sets, to give different accents.
168 </dd>
169 <dt>
170 <strong>dictionary &nbsp;&lt;name&gt;</strong><br>
171 <dd> Specifies which pair of dictionary files to use. eg. "english"
172 indicates that <em>speak-data/en_dict</em> should
173 be used to translate from words to phonemes. This parameter is usually
174 not needed as it is set by default to the first two letters of "language" parameter.</dd>
175 <p>
176 <dt>
177 <strong>dictrules &nbsp;&lt;list of rule numbers&gt;</strong><br>
178 <dd>
179 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 dictionary. They apply to rules in the language's <b>_rules</b> dictionary file and also its <b>_list</b> exceptions list.
180 See <a href="dictionary.html">dictionary.html</a>.
181 </dd>
182 <p>
183 <dt>
184 <strong>replace &nbsp;&lt;flags&gt; &lt;phoneme&gt; &lt;replacement phoneme&gt;</strong><br>
185 <dd> Replace a phoneme by another whenever it occurs.<p>
186 &lt;replacement phoneme&gt; may be NULL.<p>
187 Flags: bit 0: replacement only occurs on the final phoneme of a word.<br>
188 Flags: bit 1: replacement doesn't occur in stressed syllables.<br>
189 eg.
190 <pre>
191 replace 0 h NULL // drops h's
192 replace 0 V U // replaces vowel in 'strut' by that in 'foot'
193 // as occurs in northern British English
194 replace 3 N n // change 'fishing' to 'fishin' etc.
195 // (only the last phoneme of a word, only in unstressed syllables)
196 </pre>
197 The phoneme mnemonics can be defined for each language, but some are listed in <A href="phonemes.html">phonemes.html</A>
198 </dd>
199 <p>
200 <dt>
201 <strong>stressLength &nbsp;&lt;8 integer values&gt;</strong><br>
202 <dd> Eight integer parameters. These control the relative lengths of the vowels in
203 stressed and unstressed syllables.
204 <ul>
205 <li> 0 &nbsp; unstressed
206 </li><li> 1 &nbsp; diminished. Its use depends on the language. In English it's used for unstressed syllables within multisyllabic words. In Spanish it's used for unstressed final syllables.
207 </li><li> 2 &nbsp; secondary stress
208 </li><li> 3 &nbsp; words marked as "unstressed" in the dictionary
209 </li><li> 4 &nbsp; &nbsp; not currently used
210 </li><li> 5 &nbsp; &nbsp; not currently used
211 </li><li> 6 &nbsp; stressed syllable (the main syllable in stressed words)
212 </li><li> 7 &nbsp; tonic syllable (by default, the last stressed syllable in the clause)
213 </li></ul>
214 </dd>
215 <p>
216 <dt>
217 <strong>stressAdd &nbsp;&lt;8 integer values&gt;</strong><br>
218 <dd> Eight integer parameters. These are added to the voice's corresponding stressLength values. They are used in the voice variant files in <code>espeak-data/voices/!v</code> to give some variety. Negative values may be used.</dd>
219 <p>
220 <dt>
221 <strong>stressAmp &nbsp;&lt;8 integer values&gt;</strong><br>
222 <dd> Eight integer parameters. These control the relative amplitudes of the vowels in
223 stressed and unstressed syllables (see stressLength above).
224 The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.</dd>
225 <p>
226 <dt>
227 <strong>intonation &nbsp;&lt;param1&gt;</strong><br>
228 <dd><ul>
229 <li>1 &nbsp; Default.</li>
230 <li>2 &nbsp; Less intonation.</li>
231 <li>3 &nbsp; Less intonation, and comma does not raise the pitch.</li>
232 <li>4 &nbsp; Pitch rises (rather than falls) at the end of sentence.</li>
233 </ul>
234 </dd>
235 <p>
236 <dt>
237 <strong>charset &nbsp;&lt;param1&gt;</strong><br>
238 <dd>
239 The ISO 8859 character set number. (not all are implemented).
240 </dd>
241 <p>
242 <dt>
243 <strong>dictmin &nbsp;&lt;value&gt;</strong><br>
244 <dd>
245 Used for some languages to detect if additional language data is installed.
246 If the size of the compiled dictionary data for the language (the file <code>espeak-data/*_dict</code>) is less than
247 this size then a warning is given.
248 <p>
249 <dt>
250 <strong>alphabet2 &nbsp;&lt;alphabet&gt; &lt;language&gt;</strong><br>
251 <dd>
252 Used to specify a language to be used to speak words which are written in a non-native alphabet. eg:
253 <pre> alphabet2 cyr ru
254 </pre>
255 Alphabets names include: latin, cyr (cyrillic), ar (arabic). The default language for latin alphabet is English.
256 </dd>
257 <p>
258 <dt>
259 <strong>dictdialect &nbsp;&lt;dialect&gt;</strong><br>
260 <dd>
261 Words can be marked in the *_list or *_rules file to be spoken using a foreign voice. This <b>dictdialect</b> attribute
262 can be used to specify which dialect of the foreign language should be used, instead of the default dialect.
263 The currently available dialects are:<br>
264 <b>en-us</b> (US English)<br>
265 <b>es-la</b> (Latin American Spanish).<br>
266 eg.
267 <pre> dictdialect en-us
268 </pre>
269 This means that any words or rules which are maked with _^_EN will be spoken with the US English voice instead of the default UK English voice.
270 </dd>
271 <p>
272 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.
273 </ul>
274 <hr>
275 <h3>5.3 Voice Files Provided</h3>
276 A number of Voice files are provided in the <code>espeak-data/voices</code> directory.
277 You can select one of these with the <strong>-v &lt;voice filename&gt;</strong> parameter to the
278 speak command.
279 <p>
280 <dl>
281 <dt>
282 <strong>default</strong><br>
283 <dd> This voice is used if none is specified in the speak command. You can copy your preferred voice to "default" so you can use the speak command without the need to specify a voice.</dd>
284 </dl>
285 For a list of voices provided for English and other languages see <a href="languages.html">Languages</a>.
286
287
288 </body>
289 </html>