Debian Codegraph @

docs/voices.md

raw symbols SCIP
1 # Voice and Language Files
2
3 - [Identification Attributes](#identification-attributes)
4 - [name](#name)
5 - [language](#language)
6 - [gender](#gender)
7 - [Maintenance Attributes](#maintenance-attributes)
8 - [maintainer](#maintainer)
9 - [Voice Attributes](#voice-attributes)
10 - [pitch](#pitch)
11 - [formant](#formant)
12 - [freq\_add](#freq_add)
13 - [echo](#echo)
14 - [tone](#tone)
15 - [flutter](#flutter)
16 - [roughness](#roughness)
17 - [voicing](#voicing)
18 - [consonants](#consonants)
19 - [breath](#breath)
20 - [breathw](#breathw)
21 - [speed](#speed)
22 - [words](#words)
23 - [Language Attributes](#language-attributes)
24 - [brackets](#brackets)
25 - [bracketsAnnounced](#bracketsAnnounced)
26 - [phonemes](#phonemes)
27 - [dictionary](#dictionary)
28 - [dictrules](#dictrules)
29 - [lowercaseSentence](#lowercaseSentence)
30 - [replace](#replace)
31 - [spellingStress](#spellingStress)
32 - [stressOpt](#stressopt)
33 - [stressRule](#stressrule)
34 - [stressLength](#stresslength)
35 - [stressAdd](#stressadd)
36 - [stressAmp](#stressamp)
37 - [intonation](#intonation)
38 - [dictmin](#dictmin)
39
40 ----------
41
42 A voice file specifies a language (and possibly a language variant or
43 dialect or just voice) together with various attributes that affect the
44 characteristics of the voice quality and how the language is spoken.
45
46 Voice files are located in the `espeak-ng-data/` folder, and:
47
48 1. if it describes voice with language or dialect, in [lang](../../../tree/master/espeak-ng-data/lang) subfolder;
49 2. if it describes just voice, in [voices/!v](../../../tree/master/espeak-ng-data/voices/!v) subfolder.
50
51 Languages are grouped by the [ISO 639-5](https://en.wikipedia.org/wiki/ISO_639-5)
52 language family of the language being specified in the voice files.
53 See also Wikipedia's
54 [List of language families](https://en.wiktionary.org/wiki/Wiktionary:List_of_families)
55 for more details.
56
57 The `default` voice is used if none is specified in the speak command. You
58 can copy your preferred voice to "default" so you can use the speak command
59 without the need to specify a voice.
60
61 ## Identification Attributes
62
63 ### name
64
65 name <name>
66
67 A mandatory name given to this voice. Should be single word.
68
69 ### language
70
71 A mandatory identifier of the language or the voice. It can have one of
72 two options:
73
74 language <language code> [<priority>]
75
76 _or_
77
78 language variant
79
80 __NOTE:__ This attribute is mandatory and should appear before the other
81 attributes which are listed below.
82
83 It selects the default behaviour and characteristics for the language,
84 and sets default values for "phonemes", "dictionary" and other
85 attributes.
86
87 If value for `language` field is `variant`, then file describes only
88 phonetic features of the voice and it can be used as a [...+variant](../src/espeak-ng.1.ronn)
89 option for any language.
90
91 If `language` identifies actual language, then \<language code\> should be a valid
92 [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) language tag. The
93 list of valid tags originate from various standards and have been combined
94 into the
95 [IANA Language Subtag Registry](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
96 For example:
97
98 * `de` (German) -- The [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1)
99 2-letter language code for the language.
100
101 __NOTE:__ BCP 47 uses ISO 639-1 codes for languages that are allocated
102 2-letter codes (e.g. using `en` instead of `eng`).
103
104 * `yue` (Cantonese) -- The [ISO 639-3](https://en.wikipedia.org/wiki/ISO_639-3)
105 3-letter language codes for the language.
106
107 * `ta-Arab` (Tamil written in the Arabic alphabet) -- The
108 [ISO 15924](https://en.wikipedia.org/wiki/ISO_15924) 4-letter script code.
109
110 __NOTE:__ Where the script is the primary script for the language, the script
111 tag should be omitted.
112
113 * `es-419` (Spanish (Latin America)) -- The
114 [UN M.49](https://en.wikipedia.org/wiki/UN_M.49) 3-number region codes.
115
116 * `fr-CA` (French (Canada)) -- Using the
117 [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) 2-letter region codes.
118
119 * `en-GB-scotland` (English (Scotland)) -- This is using the BCP 47 variant
120 tags.
121
122 * `en-GB-x-rp` (English (Received Pronunciation)) -- This is using the
123 [bcp47-extensions](https://raw.githubusercontent.com/espeak-ng/bcp47-data/master/bcp47-extensions)
124 language tags for accents that cannot be described using the available
125 BCP 47 language tags.
126
127 __NOTE:__ If the accent you are trying to describe cannot be specified using
128 the above system, raise an issue in the
129 [bcp47-data](https://github.com/rhdunn/bcp47-data) project and a private use
130 tag will be defined for that accent.
131
132 The optional \<priority\> value gives the preference of this voice
133 compared with others for the specified language. A low value indicates a
134 more preferred voice. The default value is 5.
135
136 More than one `language` line may be present. A voice may be selected
137 for other related languages (variants which have the same initial 2
138 letter language code as the specified language), but it will be less
139 preferred for these. Different language variants may be specified by
140 additional `language` lines in order to indicate that this is a
141 preferred voice for them also. E.g.
142
143 language en-GB-x-gbclan
144 language en
145
146 indicates that this is voice is for the `en-GB-x-gbclan` dialect, but it is
147 also a main choice when a general `en` language is specified. Without
148 the second `language` line, it would be disfavoured from `en` for being
149 a more specialised voice.
150
151 ### gender
152
153 gender <gender> [<age>]
154
155 This attribute is only a label for use in voice selection. It doesn't
156 change the sound of the voice.
157
158 * \<gender\> may be male, female, or unknown.
159 * \<age\> is optional and gives an age in years.
160
161 ## Maintenance Attributes
162
163 ### maintainer
164
165 maintainer <maintaner>
166
167 Specifies the person responsible for updating the voice and associated language
168 files. If no maintainer is specified, the voice does not currently have an
169 active maintainer.
170
171 ### status
172
173 status <status level>
174
175 Specifies how advanced the support for the language is:
176
177 * `testing` -- Provides the basic level of support, with basic pronunciation
178 rules. Requires feedback from a native speaker to help improve the voice.
179
180 * `mature` -- The language is well supported. It has been improved by, or with
181 support from, a native speaker.
182
183 ## Voice Attributes
184
185 ### pitch
186
187 pitch <base> <range>
188
189 Two integer values. The first gives a base pitch to the voice (value in
190 Hz) The second controls the range of pitches used by the voice. Setting
191 it equal to the base pitch will give a monotone. The default values are 82 118.
192
193 ### formant
194
195 formant <number> <frequency> <strength> <width> <freq_add>
196
197 Systematically adjusts the frequency, strength, and width of the
198 resonance peaks of the voice. Values are percentages of the default
199 values. Changing these affects the tone/quality of the voice.
200
201 ### freq\_add
202
203 Adds a constant value (in Hz) to the frequency of the formant peak. The value
204 may be negative.
205
206 * Formants 1,2,3 are the standard three formants which define vowels.
207 * Formant 0 is used to give a low frequency component to the sounds, of
208 frequency lower than F1.
209 * Formants 4,5 are higher than F3. They affect the quality of the voice.
210 * Formants 6,7,8 are weak, high frequency, additions to vowels to give a
211 clearer sound.
212
213 ### echo
214
215 echo <delay> <amplitude>
216
217 Parameter 1 gives the delay in mS (0 to 250mS).
218
219 Parameter 2 gives the echo amplitude (0 to 100).
220
221 Adding some echo can give a clearer or more interesting sound, especially when
222 listening through a domestic stereo sound system, rather than small computer
223 speakers.
224
225 ### tone
226
227 Controls the tone of the sound.
228
229 `tone` is followed by up to 4 pairs of `<frequency> <amplitude>`
230 which define a frequency response graph. Frequency is in Hz and
231 amplitude is in the range 0 to 255 The default is:
232
233 tone 600 170 1200 135 2000 110
234
235 This means that from frequency 0Hz to 600Hz the amplitude is 170 From
236 600Hz to 1200Hz the amplitude decreases from 170 to 135, then decreases
237 to 110 at 2000Hz and remains at 110 at higher frequencies. This
238 adjustment applies only to voiced sounds such as vowels and sonorant
239 consonants (such as `[n]` and `[l]`). Unvoiced sounds such as `[s]` are
240 unaffected.
241
242 This `tone` statement can also appear in `espeak-ng-data/config`, in which case
243 it applies to all voices which don't have their own `tone` statement.
244
245 ### flutter
246
247 flutter <value>
248
249 Default value: 100.
250
251 Adds pitch fluctuations to give a wavering or older-sounding voice. A
252 large value (eg. 20) makes the voice sound "croaky".
253
254 ### roughness
255
256 roughness <value>
257
258 Default value: Range 0 - 7
259
260 Reduces the amplitude of alternate waveform cycles in order to make the
261 voice sound creaky.
262
263 ### voicing
264
265 voicing <value>
266
267 Default value: 100
268
269 Adjusts the strength of formant-synthesized sounds (vowels and sonorant
270 consonants).
271
272 ### consonants
273
274 consonants <value> <value>
275
276 Default values: 100, 100
277
278 Adjusts the strength of noise sounds which are used in consonants. The
279 first value is the strength of unvoiced consonants such as "s" and "t".
280
281 The second value is the strength of the noise component of voiced
282 consonants such as "z" and "d".
283
284 ### breath
285
286 breath <up to 8 integer values>
287
288 Default values: 0.
289
290 Adds noise which corresponds to the formant frequency peaks. The values
291 give the strength of noise for each formant peak (formants 1 to 8).
292
293 Use together with a low or zero value of the `voicing` attribute to
294 make a "wisper". For example:
295
296 breath 75 75 60 40 15 10
297 breathw 150 150 200 200 400 400
298 voicing 18
299 flutter 20
300 formant 0 100 0 100 // remove formant 0
301
302 ### breathw
303
304 breathw <up to 8 integer values>
305
306 These values give bandwidths of the noise peaks of the `breath`
307 attribute. If `breathw` values are not given, then suitable default
308 values will be used.
309
310 ### speed
311
312 speed <value>
313
314 Default value 100
315
316 Adjusts the speaking speed by a percentage of the default rate. This
317 can be used if a language voice seems faster or slower compared to other
318 voices.
319
320 ### words
321
322 words <integer value> <integer value>
323
324 The first parameter puts a pause between all words, the value can be between
325 `0` and `4`.
326
327 The second parameter adds a short pause if a word ends with a vowel and
328 the next words starts with a vowel. Values may be:
329
330 * `0`: no pause
331 * `1`: no pause, but the two vowels are kept separate
332 * `2`: short pause
333
334 For example:
335
336 words 0 1
337
338 will put a short pause between two words where the first word end with a
339 vowel and the next start with a vowel.
340
341 ## Language Attributes
342
343 ### brackets
344
345 brackets <value>
346
347 Default value: 4
348
349 Increases the pause when reading brackets. Example: "Pause (with brackets)".
350
351 ### bracketsAnnounced
352
353 bracketsAnnounced <value>
354
355 Default value: 2
356
357 Increases the pause when reading brackets when --punct is set to read bracket names. Example: "Pause (with brackets)".
358
359 ### phonemes
360
361 phonemes <name>
362
363 Specifies which set of phonemes to use from those contained in the
364 phontab, phonindex, and phondata data files. This is a `phonemetable`
365 name as given in the "phoneme" source file.
366
367 This parameter is usually not needed as it is set by default to the
368 first two letters of the "language" parameter. However, different voices
369 of the same language can use different phoneme sets, to give different
370 accents.
371
372 ### dictionary
373
374 dictionary <name>
375
376 Specifies which pair of dictionary files to use. For example, `en` indicates
377 that `speak-data/en_dict` should be used to translate from words to
378 phonemes. This parameter is usually not needed as it is set by default
379 to the value of the "language" parameter.
380
381 ### dictrules
382
383 dictrules <list of rule numbers>
384
385 Gives a list of conditional dictionary rules which are applied for this
386 voice. Rule numbers are in the range 0 to 31 and are specific to a
387 language dictionary. They apply to rules in the language's `*_rules`
388 dictionary file and also its `*_list` exceptions list. See
389 [Text to Phoneme Translation](dictionary.md#conditional-rules).
390
391 ### lowercaseSentence
392
393 lowercaseSentence <no arguments>
394
395 By default, a sentence end is detected if a period `.` is followed by an uppercase letter.
396 When lowercaseSentence is set, a period followed by a lowercase letter is also handled as end of sentence.
397
398 Note that other conditions, such as abbreviations, might override this setting.
399
400
401 ### replace
402
403 replace <flags> <phoneme> <replacement phoneme>
404
405 Replace a phoneme by another whenever it occurs.
406 \<replacement phoneme\> may be NULL.
407
408 Flags: bit 0: replacement only occurs on the final phoneme of a word.
409 Flags: bit 1: replacement doesn't occur in stressed syllables.
410
411 e.g.
412
413 replace 0 h NULL // drops h's
414 replace 0 V U // replaces vowel in 'strut' by that in 'foot'
415 // as occurs in northern British English
416 replace 3 N n // change 'fishing' to 'fishin' etc.
417 // (only the last phoneme of a word, only in unstressed syllables)
418
419 The phoneme mnemonics can be defined for each language, but some are
420 listed in [Phonemes](phonemes.md).
421
422 ### spellingStress
423
424 spellingStress
425
426 When set, stress first letter when reading abbreviations.
427
428 ### stressOpt
429
430 stressOpt <list of rule numbers>
431
432 Gives a list of stress options which are applied for this
433 language. (values are defined as bit numbers starting with "S_*" in [translate.h](../src/libespeak-ng/translate.h))
434
435 ### stressRule
436
437 stressRule <3 integer values>
438
439 Three integer parameters. These correspond to:
440
441 1. langopts->stress_rule (values in [translate.h](../src/libespeak-ng/translate.h))
442 3. langopts->unstressed_wd1 (stress for $u word of 1 syllable)
443 4. langopts->unstressed_wd2 (stress for $u word of >1 syllable)
444
445 If a value is not given, it defaults to zero. For example:
446 "stressRule 2" is equal to "stressRule 2 0 0 0"
447
448 ### stressLength
449
450 stressLength <8 integer values>
451
452 Eight integer parameters. These control the relative lengths of the
453 vowels in stressed and unstressed syllables.
454
455 * 0 unstressed. Unstressed syllable in word
456 (syllable with `%` mark or without any stress mark).
457 * 1 diminished. Its use depends on the language. In English it's used for
458 unstressed syllables (marked with `%%`) within multisyllabic words.
459 In other languages it is final unstressed syllable.
460 * 2 secondary stress (syllable with marked with `,`).
461 * 3 words marked as "unstressed" in the dictionary.
462 * 4 not currently used
463 * 5 not currently used
464 * 6 stressed syllable (the main syllable in stressed words marked with `'`).
465 * 7 tonic syllable (by default, the last stressed syllable in the clause).
466
467 ### stressAdd
468
469 stressAdd <8 integer values>
470
471 Eight integer parameters. These are added to the voice's corresponding
472 `stressLength` values. They are used in the voice variant files in
473 `espeak-ng-data/voices/!v` to give some variety. Negative values may be used.
474
475 Note that setting `stressLength` after `stressAdd` will overwrite this value.
476 `stressLength` must be set before `stressAdd`.
477
478 ### stressAmp
479
480 stressAmp <8 integer values>
481
482 Eight integer parameters. These control the relative amplitudes of the
483 vowels in stressed and unstressed syllables (see stressLength above).
484 The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although
485 these defaults may be different for particular languages.
486
487 ### intonation
488
489 intonation <param1>
490
491 * 1 -- Default.
492 * 2 -- Less intonation.
493 * 3 -- Less intonation, and comma does not raise the pitch.
494 * 4 -- Pitch rises (rather than falls) at the end of sentence.
495
496 ### dictmin
497
498 dictmin <value>
499
500 Used for some languages to detect if additional language data is
501 installed. If the size of the compiled dictionary data for the language
502 (the file `espeak-ng-data/*_dict`) is less than this size then a
503 warning is given.