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 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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 name="GENERATOR" content="Quanta Plus">
  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. <hr>
  21. <h3>5.2 Contents of Voice Files</h3>
  22. The <strong>language</strong> attribute is mandatory. All the other attributes are optional.
  23. <p>
  24. <h4>Identification Attributes</h4>
  25. <ul>
  26. <dl>
  27. <dt>
  28. <strong>name &nbsp;&lt;name&gt;</strong><br>
  29. <dd>A name given to this voice.
  30. <p>
  31. <dt>
  32. <strong>language &nbsp;&lt;language code&gt; [&lt;priority&gt;]</strong><br>
  33. <dd>This attribute should appear before the other attributes which are listed below.<p>
  34. It selectes the default behaviour and characteristics for the language, and sets default values for
  35. "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>
  36. 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>
  37. 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>
  38. language en-uk-north
  39. language en</pre>
  40. 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.
  41. <p>
  42. <dt>
  43. <strong>gender &nbsp;&lt;gender&gt; [&lt;age&gt;]</strong><br>
  44. <ul>&lt;gender&gt may be male, female, or unknown.<br>
  45. &lt;age&gt; is optional and gives an age in years.
  46. </dl>
  47. </ul>
  48. <h4>Voice Attributes</h4>
  49. <ul>
  50. <dl>
  51. <dt>
  52. <strong>pitch &nbsp;&lt;base&gt; &lt;range&gt;</strong><br>
  53. <dd> Two integer values.
  54. The first gives a base pitch to the voice (value in Hz)
  55. The second controls the range of pitches used by the voice. Setting
  56. it equal to the base pitch will give a monotone. The default values are 82 118.
  57. <p>
  58. <dt>
  59. <strong>formant &nbsp;&lt;number&gt; &lt;frequency&gt; &lt;strength&gt; &lt;width&gt;</strong><br>
  60. <dd> Systematically adjusts the frequency, strength, and width of the
  61. resonance peaks of the voice. Values are percentages of the
  62. default values. Changing these affects the tone/quality of the voice.
  63. <ul>
  64. <li>Formants 1,2,3 are the standard three formants which define vowels.</li>
  65. <li>Formant 0 is used to give a low frequency component to the sounds, of
  66. frequency lower than F1.</li>
  67. <li>Formants 4,5 are higher than F3. They affect the quality of the voice.</li>
  68. <li>Formants 6,7,8 are weak, high frequency, additions to vowels to give
  69. a clearer sound.</li>
  70. </ul>
  71. <p>
  72. <dt>
  73. <strong>echo &nbsp;&lt;delay&gt; &lt;amplitude&gt;</strong><br>
  74. <dd> Parameter 1 gives the delay in mS (0 to 250mS).<br>
  75. Parameter 2 gives the echo amplitude (0 to 100).<br>
  76. Adding some echo can give a clearer or more interesting sound,
  77. especially when listening through a domestic stereo sound system,
  78. rather than small computer speakers.
  79. <dt>
  80. <strong>tone</strong><br>
  81. <dd> Controls the tone of the sound.<br>
  82. <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
  83. in Hz and amplitude is in the range 0 to 255. The default is:<p>
  84. <code> &nbsp; tone 600 170 &nbsp;1200 135 &nbsp;2000 110</code><p>
  85. This means that from frequency 0Hz to 600Hz the amplitude is 170. From
  86. 600Hz to 1200Hz the amplitude decreases from 170 to 135, then decreases to 110 at 2000Hz
  87. and remains at 110 at higher frequencies. This adjustment applies only to voiced sounds such as
  88. vowels and sonorant consonants (such as [n] and [l]). Unvoiced sounds such
  89. as [s] are unaffected.<p>
  90. This <strong>tone</strong> statement can also appear in <code>espeak-data/config</code>, in which case it applies to all voices which
  91. don't have their own <strong>tone</strong> statement.
  92. <p>
  93. <dt>
  94. <strong>flutter &nbsp;&lt;value&gt;</strong><br>
  95. <dd> Default value: 2.<br>
  96. Adds pitch fluctuations to give a wavering or older-sounding voice.
  97. A large value (eg. 20) makes the voice sound "croaky".
  98. <p>
  99. <dt>
  100. <strong>roughness &nbsp;&lt;value&gt;</strong><br>
  101. <dd> Default value: 2. Range 0 - 7<br>
  102. Reduces the amplitude of alternate waveform cycles in order to make the voice sound creaky.
  103. <p>
  104. <dt>
  105. <strong>voicing &nbsp;&lt;value&gt;</strong><br>
  106. <dd> Default value: 100.<br>
  107. Adjusts the strength of formant-synthesized sounds (vowels and sonorant consonants).
  108. <p>
  109. <dt>
  110. <strong>breath &nbsp;&lt;up to 8 integer values&gt;</strong><br>
  111. <dd> Default values: 0.<br>
  112. Adds noise which corresponds to the formant frequency peaks. The values give the strength
  113. of noise for each formant peak (formants 1 to 8).
  114. <p>
  115. Use together with a low or zero value of the <strong>voicing</strong> attribute to make a "wisper".
  116. For example:<br>
  117. <code>breath &nbsp; 75 75 60 40 15 10<br>
  118. breathw &nbsp;150 150 200 200 400 400<br>
  119. voicing &nbsp;18<br>
  120. flutter &nbsp;20<br>
  121. formant &nbsp; 0 100 0 100 &nbsp; // remove formant 0
  122. </code>
  123. <p>
  124. <dt>
  125. <strong>breathw &nbsp;&lt;up to 8 integer values&gt;</strong><br>
  126. <dd>
  127. 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.
  128. <p>
  129. </dl>
  130. </ul>
  131. <h4>Language Attributes</h4>
  132. <ul>
  133. <dl>
  134. <p>
  135. <dt>
  136. <strong>phonemes &nbsp;&lt;name&gt;</strong><br>
  137. <dd>Specifies which set of phonemes to use from those contained in the
  138. phontab, phonindex, and phondata data files.
  139. This is a <strong>phonemetable</strong> name as given in the "phoneme" source file.
  140. <p>
  141. This parameter is usually not needed as it is set by default to the first two letters of the "language" parameter.
  142. However, different voices of the same language can use different phoneme sets, to give different accents.
  143. </dd>
  144. <dt>
  145. <strong>dictionary &nbsp;&lt;name&gt;</strong><br>
  146. <dd> Specifies which pair of dictionary files to use. eg. "english"
  147. indicates that <em>speak-data/en_dict</em> should
  148. be used to translate from words to phonemes. This parameter is usually
  149. not needed as it is set by default to the first two letters of "language" parameter.</dd>
  150. <p>
  151. <dt>
  152. <strong>dictrules &nbsp;&lt;list of rule numbers&gt;</strong><br>
  153. <dd>
  154. 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 <b>_rules</b> dictionary file and also its <b>_list</b> exceptions list.
  155. See <a href="dictionary.html">dictionary.html</a>.
  156. </dd>
  157. <p>
  158. <dt>
  159. <strong>replace &nbsp;&lt;flags&gt; &lt;phoneme&gt; &lt;replacement phoneme&gt;</strong><br>
  160. <dd> Replace a phoneme by another whenever it occurs.<p>
  161. &lt;replacement phoneme&gt; may be NULL.<p>
  162. Flags: bit 0: replacement only occurs on the final phoneme of a word.<br>
  163. Flags: bit 1: replacement doesn't occur in stressed syllables.<br>
  164. eg.
  165. <pre>
  166. replace 0 h NULL // drops h's
  167. replace 0 V U // replaces vowel in 'strut' by that in 'foot'
  168. // as occurs in northern British English
  169. replace 3 N n // change 'fishing' to 'fishin' etc.
  170. // (only the last phoneme of a word, only in unstressed syllables)
  171. </pre>
  172. The phoneme mnemonics can be defined for each language, but some are listed in <A href="phonemes.html">phonemes.html</A>
  173. </dd>
  174. <p>
  175. <dt>
  176. <strong>stressLength &nbsp;&lt;8 integer values&gt;</strong><br>
  177. <dd> Eight integer parameters. These control the relative lengths of the vowels in
  178. stressed and unstressed syllables.
  179. <ul>
  180. <li> 0 &nbsp; unstressed
  181. </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.
  182. </li><li> 2 &nbsp; secondary stress
  183. </li><li> 3 &nbsp; words marked as "unstressed" in the dictionary
  184. </li><li> 4 &nbsp; &nbsp; not currently used
  185. </li><li> 5 &nbsp; &nbsp; not currently used
  186. </li><li> 6 &nbsp; stressed syllable (the main syllable in stressed words)
  187. </li><li> 7 &nbsp; tonic syllable (by default, the last stressed syllable in the clause)
  188. </li></ul>
  189. </dd>
  190. <p>
  191. <dt>
  192. <strong>stressAdd &nbsp;&lt;8 integer values&gt;</strong><br>
  193. <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>
  194. <p>
  195. <dt>
  196. <strong>stressAmp &nbsp;&lt;8 integer values&gt;</strong><br>
  197. <dd> Eight integer parameters. These control the relative amplitudes of the vowels in
  198. stressed and unstressed syllables (see stressLength above).
  199. The general default values are: 16, 16, 20, 20, 20, 24, 24, 22, although these defaults may be different for particular languages.</dd>
  200. <p>
  201. <dt>
  202. <strong>intonation &nbsp;&lt;param1&gt; &lt;param2&gt;</strong><br>
  203. <dd> (for further development)<br>
  204. </dd>
  205. <p>
  206. <dt>
  207. <strong>charset &nbsp;&lt;param1&gt;</strong><br>
  208. <dd>
  209. The ISO 8859 character set number. (not all are implemented).
  210. </dd>
  211. <p>
  212. 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.
  213. <p>
  214. <dt>
  215. <strong>stressrule &nbsp;&lt;param1&gt; &lt;param2&gt; &lt;param3&gt; &lt;param4&gt;</strong><br>
  216. <dd>
  217. Controls how different stress levels are applied to the syllables of a word.
  218. </dd>
  219. </ul>
  220. <hr>
  221. <h3>5.3 Voice Files Provided</h3>
  222. A number of Voice files are provided in the <code>espeak-data/voices</code> directory.
  223. You can select one of these with the <strong>-v &lt;voice filename&gt;</strong> parameter to the
  224. speak command.
  225. <p>
  226. <dl>
  227. <dt>
  228. <strong>default</strong><br>
  229. <dd> 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.</dd>
  230. </dl>
  231. For a list of voices provided for English and other languages see <a href="languages.html">Languages</a>.
  232. </body>
  233. </html>