eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

voices.html 13KB

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