PageRenderTime 48ms CodeModel.GetById 33ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

/native/external/espeak/docs/phontab.html

http://eyes-free.googlecode.com/
HTML | 211 lines | 202 code | 9 blank | 0 comment | 0 complexity | 352b14d853f124fea0cc806b26885725 MD5 | raw file
  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: Phoneme tables</title>
  6  <meta name="GENERATOR" content="Quanta Plus">
  7  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  8</head>
  9<body>
 10<A href="docindex.html">Back</A>
 11<hr>
 12<h2>PHONEME TABLES</h2>
 13<hr>
 14A phoneme table defines all the phonemes which are used by a language, together with their properties and the data for their production as sounds.
 15<p>
 16Generally each language has its own phoneme table, although additional phoneme tables can be used for different voices within the language.  These alternatives are referenced from Voices files.
 17<p>
 18A phoneme table does not need to define all the phonemes used by a language.  Instead it can reference a previously defined phoneme table, whose phonemes it inherits.  These can then be used as they are, or overridden by new definitions, or new phonemes added.  For example, a phoneme table may redefine (or add) some of the vowels that it uses, but inherit most of its consonants from a standard set.
 19<p>
 20<blockquote>Note: This specification is not yet complete and does not include the definitions of the formant sequence specifications.
 21<br>
 22The source files for the phoneme data is in the "phsource" directory in the espeakedit download package.
 23</blockquote>
 24<p>&nbsp;<hr>
 25<h3>Phoneme files</h3>
 26The phoneme tables are defined in a master phoneme file, named <strong>phonemes</strong>.  This starts with the <strong>base</strong> phoneme table followed by other phoneme tables for languages and voices which inherit phonemes from the <strong>base</strong> table or from each other.
 27<p>
 28In addition to phoneme definitions, the phoneme file can contain the following:
 29<dl>
 30<dt><strong>include</strong> &lt;filename&gt;
 31<dd>Includes the text of the specified file at this point. This allows different phoneme tables to be kept in different text files, for convenience.  &lt;filename&gt; is a relative path.  The included file can itself contain <strong>include</strong> statements.
 32<p>
 33<dt><strong>phonemetable</strong> &lt;name&gt; &lt;parent&gt;
 34<dd>Starts a new phoneme table, and ends the previous table.<br>
 35&lt;name&gt; Is the name of this phoneme table. This name is used in Voices files.<br>
 36&lt;parent&gt; Is the name of a previously defined phoneme table whose phoneme definitions are inherited by this one.  The name <strong>base</strong> indicates the first (base) phoneme table.
 37<p>
 38<dt><strong>phonemenumber</strong> &lt;integer&gt;
 39<dd>This statement is used at the start of the master <strong>phonemes</strong> file to define some specific code numbers for various phonemes which are used directly within the <strong>speak</strong> program.
 40</dl>
 41<p>&nbsp;<hr>
 42<h3>Phoneme definitions</h3>
 43A phoneme table contains a list of phoneme definitions. Each starts with the keyword <strong>phoneme</strong> and the phoneme name (this is the name used in the pronunciation rules), and ends with the keyword <strong>endphoneme</strong>.  For example:
 44<pre>  phoneme aI
 45    vowel
 46    length 230
 47    formants vowels/ai
 48    starttype (a) endtype (I)
 49  endphoneme
 50
 51  phoneme s
 52    vls alv frc sibilant
 53    vowelin  f1=0  f2=1700 -300 300  f3=-100 100
 54    vowelout f1=0  f2=1700 -300 250  f3=-100 100  rms=20
 55    lengthmod 3
 56    wave unvoc/s
 57    before _ unvoc/s_
 58    before p unvoc/s!
 59    before t unvoc/s!
 60    before k unvoc/s!
 61    switchvoicing z
 62  endphoneme
 63
 64</pre>
 65<p>
 66Within the phoneme definition the following lines may occur:  ( (V) indicates only for vowels, (C) only for consonants)
 67<p>
 68<ul>
 69<dl><dt>Type. One of these must be present.
 70<dd><table>
 71<tr><TD width="100"><b>vowel</b></TD></tr>
 72<tr><TD><b>liquid</b></TD><td>semi-vowels, such as:&nbsp; <code> r, l, j, w</code></td></tr>
 73<tr><TD><b>nasal</b></TD><td>nasal eg:&nbsp; <code> m, n, N</code></td></tr>
 74<tr><TD><b>stop</b></TD><td>stop eg:&nbsp; <code> p, b, t, d, k, g</code></td></tr>
 75<tr><TD><b>frc</b></TD><td>fricative eg:&nbsp; <code> f, v, T, D, s, z, S, Z, C, x</code></td></tr>
 76<tr><TD><b>afr</b></TD><td>affricate eg:&nbsp; <code> tS, dZ</code></td></tr>
 77<tr><TD><b>pause</b></TD><td></td></tr>
 78<tr><TD><b>stress</b></TD><td>stress symbols, eg: ' , = %</td></tr>
 79<tr><TD><b>virtual</b></TD><td>Used to represent a class of phonemes. See section ("Phoneme Pairs", below)</td></tr>
 80</table>
 81</dl>
 82<dl><dt>Properties:
 83<dd><table>
 84<tr><TD width="100"><b>vls</b></TD><td>(C) voiceless  eg. <code>  p, t, k, f, s</code></TD></tr>
 85<tr><TD><b>vcd</b></TD><td>(C) voiced  eg. <code>  b, d, g, v, z</code></td></tr>
 86<tr><TD><b>sibilant</b></TD><td>(C) eg: <code>  s, z, S, Z, tS, dZ</code></td></tr>
 87<tr><TD><b>palatal</b></TD><td>(C) A palatal or palatalized consonant.</td></tr>
 88<tr><TD><b>unstressed</b></TD><td>(V) This vowel is always unstressed, unless explicitly marked otherwise.</td></tr>
 89<tr><TD><b>nolink</b></TD><td>Prevent any linking from the previous phoneme.</td></tr>
 90<tr><TD><b>trill</b></TD><td>(C) Apply trill to the voicing.</td></tr>
 91</table>
 92</dl>
 93<dl><dt>Place of Articulation (C):
 94<dd><table>
 95<tr><TD><b>blb &nbsp;</b></TD><td width="100">bi-labial</TD>
 96<TD><b>ldb &nbsp;</b></TD><td width="110">labio-dental</TD>
 97<TD><b>dnt &nbsp;</b></TD><td>dental</TD></tr>
 98
 99<tr><TD><b>alv</b></TD><td>alveolar</td>
100<TD><b>rfx</b></TD><td>retroflex</TD>
101<TD><b>pla</b></TD><td>palato-alveolar</TD></tr>
102
103<tr><TD><b>pal</b></TD><td>palatal</td>
104<TD><b>vel</b></TD><td>velar</TD>
105<TD><b>lbv</b></TD><td>labio-velar</TD></tr>
106
107<tr><TD><b>uvl</b></TD><td>uvular</td>
108<TD><b>phr</b></TD><td>pharyngeal</TD>
109<TD><b>glt</b></TD><td>glottal</TD></tr>
110
111</table>
112</dl>
113
114<dl>
115<dt><strong>length</strong>
116<dd>(V) The relative length of the phoneme, typically about 140 for a short vowel and from 200 to 250 for a long vowel or diphong.  Currently used only for vowels.
117<p>
118<dt><strong>formants</strong> &lt;sound spec&gt;
119<dd>&lt;sound spece&gt; is a relative path to a file which defines how to generate the sound (a vowel or voiced consonant) from a sequence of formant values. (see **)
120<p>
121<dt><strong>wave</strong> &lt;wavefile&gt;
122<dd>(C) This is an alternative to <strong>formants</strong>. &nbsp;&lt;wavefile&gt; is a relative path to a WAV file (22 kHz, 16 bits) which will be played to produce the sound.  This method is used for unvoiced consonants. &lt;wavefile&gt; does not include a .WAV filename extension, although the file to which it refers may or may not have one.
123<p>
124<dt><strong>before</strong> &lt;phoneme&gt; &lt;sound spec&gt;
125<dd>This specifies an alternative realization when the phoneme followed by another specified phoneme. <strong>before</strong> may be followed by several &lt;phoneme&gt; &lt;sound seq&gt; pairs.
126<p>
127<dt><strong>after</strong> &lt;phoneme&gt; &lt;sound spec&gt;
128<dd>This specifies an alternative realization when the phoneme follows another specified phoneme. Vowels are considered as two parts, start and end, so both a <strong>before</strong> and an <strong>after</strong> condition may apply to the same vowel.
129<p>
130<dt><strong>starttype</strong> &lt;phoneme&gt;
131<dd>Allocates this phoneme to a category for the purposes of choosing the variant of a phoneme that precedes it.  See section "Phoneme Pairs" below.
132<p>
133<dt><strong>endtype</strong> &lt;phoneme&gt;
134<dd>Allocates this phoneme to a category for the purposes of choosing the variant of a phoneme that follows it.  See section "Phoneme Pairs" below.
135<p>
136<dt><strong>reduceto</strong> &lt;phoneme&gt; &lt;level&gt;
137<dd>(V) Change to the specified phoneme (such as schwa, @) if this syllable has a stress level less than that specified by &lt;level&gt;
138<p>
139<dt><strong>linkout</strong> &lt;phoneme&gt;
140<dd>If the following phoneme is a vowel then this additional phoneme will be inserted before it.
141<p>
142<dt><strong>beforevowel</strong> &lt;phoneme&gt;
143<dd>The phoneme changes to this one if the next phoneme is a vowel.
144<p>
145<dt><strong>beforevowelpause</strong> &lt;phoneme&gt;
146<dd>Change to this if the next phoneme is a vowel or pause.
147<p>
148<dt><strong>beforenotvowel</strong> &lt;phoneme&gt;
149<dd>Change to this if the next phoneme is <strong>not</strong> a vowel.
150<p>
151<dt><strong>lengthmod</strong> &lt;integer&gt;
152<dd>(C) Determines how this consonant affects the length of the previous vowel. This value is used as index into the <code>length_mods</code> table in the <code>CalcLengths()</code> function in the speak program.
153<p>
154<dt><strong>vowelin</strong> &lt;vowel transition data&gt;
155<dd>(C) Specifies the effects of this consonant on the formants of a following vowel. See "vowel transitions", below.
156<p>
157<dt><strong>vowelout</strong> &lt;vowel transition data&gt;
158<dd>(C) Specifies the effects of this consonant on the formants of a preceding vowel. See "vowel transitions", below.
159<p>
160
161</dl>
162</ul>
163<p>&nbsp;<hr>
164<h3>Phoneme Pairs</h3>
165The pronunciation of a phoneme can depend on the phonemes before and after it. Some of this modification is done automatically - the program automatically adjusts the beginning and end of a vowel to match its adjacent sounds.  You can also specify variant pronunciations in the phoneme table.
166<p>
167The <strong>before</strong> and <strong>after</strong> statements can specify different sound variants to be used when the phoneme is before or is after another specified phoneme.  The adjacent phoneme that's specified in a <strong>before</strong> or <strong>after</strong> statement may refer not just to one, but to other phonemes too.  For example:<pre>   before ; unvoc/s;</pre>means that the sound <code>unvoc/s;</code> is used (rather than <code>unvoc/s</code> if the following phoneme is <code>[;]</code>.  But this rule also applies if the next phoneme is another type of pause, <code>[_]</code> or <code>[;;]</code>.  This is because these two include a line<pre>   starttype ;</pre>in their phoneme specifications.  This means that they look like a <code>[;]</code> to a preceding phoneme.
168<p>
169When looking for a matching <strong>before</strong> or <strong>after</strong> rule, if an exact match is not found, then a match is looked for by replacing either or both of the two phonemes by their <strong>starttype</strong> and <strong>endtype</strong> groups as appropriate.
170<p>
171<strong>virtual</strong> phonemes can be defined for use in <strong>starttype</strong> and <strong>endtype</strong> statements.  For example, a virtual phoneme <code>[ (i) ]</code> is used to represent vowels which start with and end with an <code>[i]</code> type sound. So <code>[i:]</code> and <code>[I]</code> have <code> starttype (i) </code> and those, plus diphthongs such as <code>[aI]  [eI]  [OI]</code> have <code> endtype (i) </code>.  By convension, names of virtual phonemes include a pair of round brackets.
172<p>&nbsp;<hr>
173<h3>Sound Specifications</h3>
174There are three ways to produce sounds:
175<ul>
176<li>Playing a WAV file.  This is used for unvoiced consonants such as <code> [p] [t] [s]</code>.
177<li>Generating a wave from a sequence of formant parameters.  This is used for vowels and also for sonorants such as <code> [l] [j] [n]</code>.
178<li>A mixture of these.  A stored WAV file is mixed with a wave generated from formant parameters.  This is used for voiced stops and fricatives such as <code> [b] [g] [v] [z]</code>.
179</ul>
180A <em>&lt;sound spec&gt;</em> in the phoneme table can refer to a WAV file, a formant sequence, or a mixture of both. It can also include a numeric value to adjust the length of the sound.
181<p>&nbsp;<hr>
182<h3>Vowel Transitions</h3>
183These specify how a consonant affects an adjacent vowel.  A consonant may cause a transition in the vowel's formants as the mouth changes shape between the consonant and the vowel.  The following attributes may be specified.  Note that the maximum rate of change of formant frequencies is limited by the speak program.<p>
184<ul><dl>
185<dt><strong>len=&lt;integer&gt;</strong>
186<dd>Nominal length of the transition in mS.  If omitted a default value is used.
187<dt><strong>rms=&lt;integer&gt;</strong>
188<dd>Adjusts the amplitude of the vowel at the end of the transition.  If omitted a default value is used.
189<dt><strong>f1=&lt;integer&gt;</strong>
190<dd>
1910: &nbsp; f1 formant frequency unchanged.<br>
1921: &nbsp; f1 formant frequency decreases.<br>
1932: &nbsp; f1 formant frequency decreases more.
194<dt><strong>f2=&lt;freq&gt; &lt;min&gt; &lt;max&gt;</strong>
195<dd>
196&lt;freq&gt;: &nbsp; The frequency towards which the f2 formant moves (Hz).<br>
197&lt;min&gt;: &nbsp; Signed integer (Hz).&nbsp;  The minimum f2 frequency change.<br>
198&lt;max&gt;: &nbsp; Signed integer (Hz).&nbsp;  The maximum f2 frequency change.
199<dt><strong>f3=&lt;change&gt; &lt;amplitude&gt;</strong>
200<dd>
201&lt;change&gt;: &nbsp; Signed integer (Hz).&nbsp; Frequence change of f3, f4, and f5 formants.<br>
202&lt;amplitude&gt;: &nbsp; Amplitude of the f3, f4, and f5 formants at the end of the transition. 100 = no change.
203<dt><strong>brk</strong>
204<dd>Break. Do not merge the synthesized wave of the consonant into the vowel.  This will produce a discontinuity in the formants.
205<dt><strong>rate</strong>
206<dd>Allow a greater maximum rate of change of formant frequencies.
207<dt><strong>glstop</strong>
208<dd>Indicates a glottal stop.
209</dl></ul>
210</body>
211</html>