This file is indexed.

/usr/share/doc/flite/html/Converting-FestVox-Voices.html is in flite 2.0.0-release-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.0, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Flite: a small, fast speech synthesis engine: 8 Converting FestVox Voices</title>

<meta name="description" content="Flite: a small, fast speech synthesis engine: 8 Converting FestVox Voices">
<meta name="keywords" content="Flite: a small, fast speech synthesis engine: 8 Converting FestVox Voices">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2any">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space: nowrap}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: serif; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Converting-FestVox-Voices"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="APIs.html#APIs" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="APIs.html#Streaming-Synthesis" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Cocantenative-Voice-Building" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Converting-FestVox-Voices-1"></a>
<h1 class="chapter">8 Converting FestVox Voices</h1>

<p>As of 1.2 initial scripts have been added to aid the conversion of
FestVox voices to Flite.  In general the conversion cannot be automatic.
For example all specific Scheme code written for a voice needs to be
hand converted to C to work in Flite, this can be a major task.
</p>
<p>Simple conversion scripts are given as examples of the stages you need
to go through.  These are designed to work on standard (English)
diphone sets, and simple limited domain voices.  The conversion
technique will almost certainly fail for large unit selection voices
due to limitations in the C compiler (more discussion below).  In 1.4
we have also added support for converting clustergen voices too (which
is a little easier, see section below).
</p>
<hr>
<a name="Cocantenative-Voice-Building"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Statistical-Voice-Building-_0028Clustergen_0029" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.1 Cocantenative Voice Building</h2>

<p>Conversion is basically taking the description of units (clunit
catalogue or diphone index) and constructing some C files that can be
compiled to form a usable database.  Using the C compiler to generate
the object files has the advantage that we do not need to worry about
byte order, alignment and object formats as the C compiler for the
particular target platform should be able to generate the right code.
</p>
<p>Before you start ensure you have successfully built and run your FestVox
voice in Festival.  Flite is not designed as a voice building/debugging
tool it is just a delivery vehicle for finalized voices so you should
first ensure you are satisfied with the quality of Festival voices
before you start converting it for Flite.
</p>
<p>The following basic stages are required:
</p><ul>
<li> Setup the directories and copy the conversion scripts
</li><li> Build the LPC files
</li><li> Build the MCEP files (for ldom/clunits)
</li><li> Convert LPC (MCEP) into STS (short term signal) files
</li><li> Convert the catalogue/diphone index
</li><li> Compile the generated C code
</li></ul>

<p>The conversion assumes the environment variable <code>FLITEDIR</code>
is set, for example
</p><div class="example">
<pre class="example">   export FLITEDIR=/home/awb/projects/flite/
</pre></div>
<p>The basic flite conversion takes place within a FestVox voice directory.
Thus all of the conversion scripts expect that the standard files are
available.  The first task is to build some new directories and copy in
the build scripts.  The scripts are copied rather than linked from the
Flite directories as you may need to change these for your particular
voices.
</p><div class="example">
<pre class="example">   $FLITEDIR/tools/setup_flite
</pre></div>
<p>This will read <samp>etc/voice.defs</samp>, which should have been created by
the FestVox build process (except in very old versions of FestVox).
</p>
<p>If you don&rsquo;t have a <samp>etc/voice.defs</samp> you can construct one
with <code>festvox/src/general/guess_voice_defs</code> in the Festvox
distribution, or generate one by hand making it look
like
</p><div class="example">
<pre class="example">FV_INST=cmu
FV_LANG=us
FV_NAME=ked_timit
FV_TYPE=clunits
FV_VOICENAME=$FV_INST&quot;_&quot;$FV_LANG&quot;_&quot;$FV_NAME
FV_FULLVOICENAME=$FV_VOICENAME&quot;_&quot;$FV_TYPE
</pre></div>

<p>The main script build building the Flite voice is <samp>bin/build_flite</samp>
which will eventually build sufficient C code in <samp>flite/</samp> that can
be compiled with the constructed <samp>flite/Makefile</samp> to give you a
library that can be linked into applications and also an example
<samp>flite</samp> binary with the constructed voice built-in.
</p>
<p>You can run all of these stages, except the final make, together by
running the the build script with no arguments
</p><div class="example">
<pre class="example">   ./bin/build_flite
</pre></div>
<p>But as things may not run smoothly, we will go through the 
stages explicitly.
</p>
<p>The first stage is to build the LPC files, this may have already been
done as part of the diphone building process (though probably not in
the ldom/clunit case).  In our experience it is very important that the
records be of similar power, as mis-matched power can often cause
overflows in the resulting flite (and sometimes Festival) voices. Thus,
for diphone voices, it is important to run the power normalization
techniques described int he FestVox document.  The Flite LPC build
process also builds a parameter file of the ranges of the LPC parameters
used in later coding of the files, so even if you have already built your
LPC files you should still do this again
</p><div class="example">
<pre class="example">   ./bin/build_flite lpc
</pre></div>

<p>For ldom, and clunit voices (but not for diphone voices) we also
need the Mel-frequency Cepstral Coefficients.  These are assumed to
have been cleared and are in <samp>mcep/</samp> as they are necessary
for running the voice in Festival.  This stage simply constructs 
information about the range of the mcep parameters.
</p><div class="example">
<pre class="example">   ./bin/build_flite mcep
</pre></div>

<p>The next stage is to construct the STS files.  Short Term Signals (STS)
are built for each pitch period in the database.  These are ascii files
(one for each utterance file in the database, with LPC coefficients, and
ulaw encoded residuals for each pitch period.  These are built using a
binary executable built as part of the Flite build
(<samp>flite/tools/find_sts</samp>.
</p><div class="example">
<pre class="example">   ./bin/build_flite sts
</pre></div>
<p>Note that the flite code expects waveform files to be in Microsoft RIFF
format and cannot deal with files in other formats.  Some earlier
versions of the Edinburgh Speech Tools used NIST as the default header
format.  This is likely to cause flite and its related programs not
work. So do ensure your waveform files are in riff format (ch_wave -info
wav/* will tell you the format).  And the following fill convert
all your wave files
</p><div class="example">
<pre class="example">   mv wav wav.nist
   mkdir wav
   cd wav.nist
   for i in *.wav
   do
      ch_wave -otype riff -o ../wav/$i $i
   done
</pre></div>

<p>The next stage is to convert the index to the required C format.  For
diphone voices this takes the <samp>dic/*.est</samp> index files, for
clunit/ldom voices it takes the <samp>festival/clunit/VOICE.catalogue</samp>
and <samp>festival/trees/VOICE.tree</samp> files.  This process uses a binary
executable built as part of the Flite build process
(<samp>flite/tools/flite_sort</samp>) to sort the indices into the same
sorting order required for flite to run.  (Using unix sort may or may
not give the same result due to definitions of lexicographic order so
we use the very same function in C that will be used in flite to ensure
that a consistent order is given.)
</p><div class="example">
<pre class="example">   ./bin/build_flite idx
</pre></div>
<p>All the necessary C files should now have been built in <samp>flite/</samp>
and you may compile them by
</p><div class="example">
<pre class="example">   cd flite
   make
</pre></div>
<p>This should give a library and an executable called <samp>flite</samp> that
can run as
</p><div class="example">
<pre class="example">   ./flite &quot;Hello World&quot;
</pre></div>
<p>Assuming a general voice.  For ldom voices it will only be able to say
things in its domain.  This <samp>flite</samp> binary offers the same options
as standard the standard <samp>flite</samp> binary compiled in the Flite build
but with your voice rather than the distributed voices.
</p>
<p>Almost certainly this process will not run smoothly for you.  Building
voices is still a very hard thing to do and problems will probably
exist.
</p>
<p>This build process does not deal with customization for the given
voices.  Thus you will need to edit <samp>flite/VOICE.c</samp> to set
intonation ranges and duration stretch for your particular voice.
</p>
<p>For example in our <samp>cmu_us_sls_diphone</samp> voice (a US English female
diphone voice).  We had to change the default parameters from 
</p><div class="example">
<pre class="example">    feat_set_float(v-&gt;features,&quot;int_f0_target_mean&quot;,110.0);
    feat_set_float(v-&gt;features,&quot;int_f0_target_stddev&quot;,15.0);

    feat_set_float(v-&gt;features,&quot;duration_stretch&quot;,1.0); 
</pre></div>
<p>to
</p><div class="example">
<pre class="example">    feat_set_float(v-&gt;features,&quot;int_f0_target_mean&quot;,167.0);
    feat_set_float(v-&gt;features,&quot;int_f0_target_stddev&quot;,25.0);

    feat_set_float(v-&gt;features,&quot;duration_stretch&quot;,1.0); 
</pre></div>

<p>Note this conversion is limited.  Because it depends on the C compiler
to do the final conversion into binary object format (a good idea in
general for portability), you can easily generate files too big for the
C compiler to deal with.  We have spent some time investigating this
so the largest possible voices can be converted but it is still too
limited for our larger voices.  In general the limitation seems to be
best quantified by the number of pitch periods in the database.  After
about 100k pitch periods the files get too big to handle.  There are
probably solutions to this but we have not yet investigated them.  This
limitation doesn&rsquo;t seem to be an issue with the diphone voices as they
are typically much smaller than unit selection voices.
</p>
<hr>
<a name="Statistical-Voice-Building-_0028Clustergen_0029"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cocantenative-Voice-Building" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Lexicon-Conversion" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.2 Statistical Voice Building (Clustergen)</h2>

<p>The process of building from a clustergen (cg) voice is also
supported.  It is assumed the environment variable <code>FLITEDIR</code> is
set
</p><div class="example">
<pre class="example">   export FLITEDIR=/home/awb/projects/flite/
</pre></div>
<p>After you build the clustergen voice you can convert by first setting
up the skeleton files in the <samp>flite/</samp> directory
</p><div class="example">
<pre class="example">   $FLITEDIR/tools/setup_flite
</pre></div>
<p>Assuming <samp>etc/voice.defs</samp> properly identifies the voice the cg
templates will be compied in.
</p>
<p>The conversion itself is actually much faster than a clunit build
(there is less to actually convert).
</p><div class="example">
<pre class="example">   ./bin/build_flite cg
</pre></div>
<p>Will convert then necessary models into files in the <samp>flite/</samp>
directory.  The you can compile it with
</p><div class="example">
<pre class="example">   cd flite
   make
   ./flite_cmu_us_awb &quot;Hello world&quot;
</pre></div>
<p>Note that the voice that is to be converted *must* be a standard
clustergen voice with f0, mceps, delta mceps (optionally strengths for
mixed excitation) and voicing in its
combined coeffs files.  The method could be changed to deal with other
possibilities but it will only work for default build method.
</p>
<p>The generated library <samp>libflite_cmu_us_awb.a</samp> may be linked with
other programs like any other flite voice.  The binary generated
<code>flite_cmu_us_awb</code> links in only one voice (unlike the flite binary in
the full flite distribution.
</p>
<p>A single flat file contain the cg voice can also be generated that can
be loaded at run time into the flite binary.  You can dump this file
from the initial constructed flite binary
</p><div class="example">
<pre class="example">   ./flite_cmu_us_awb -voicedump cmu_us_awb.flitevox
</pre></div>
<p>The file cmu_us_awb.flitevox may now be references (with pathname/url) on
the flite command line and used by the synthesizer
</p><div class="example">
<pre class="example">   ./flite -voice cmu_us_awb.flitevox &quot;Hello World&quot;
</pre></div>

<hr>
<a name="Lexicon-Conversion"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Statistical-Voice-Building-_0028Clustergen_0029" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Language-Conversion" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.3 Lexicon Conversion</h2>

<p>As of 1.3 the script for converting the CMU lexicon (as distributed as
part of Festival) is included.  <samp>make_cmulex</samp> will use the
version of CMULEX unpacked in the current directory to build a new
lexicon.  Also in 1.3. a more sophisticated compression technique is
used to reduce the lexicon size.  The lexicon is pruned, removing
those words which the letter to sound rule models get correct.  Also
the letters and phones are separately huffman coded to produce a
smaller lexicon.
</p>
<hr>
<a name="Language-Conversion"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Lexicon-Conversion" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">8.4 Language Conversion</h2>

<p>This is by far the weakest part as this is the most open ended.  There
are basic tools in the <samp>flite/tools/</samp> directory that include Scheme
code to convert various Scheme structures to C include CART tree
conversion and Lisp list conversion.  The other major source of help
here is the existing language examples in <samp>flite/lang/usenglish/</samp>.
</p>
<p>Adding new language support is far from automatic, but there are core
scripts for setting up new Flite support for languages and lexicons.  There
are also scripts for converting (Festival) phoneset definitions to C
and converting Festival lexicons to LTS rules and compressed lexicons
in C.
</p>
<p>But beyond that you are sort of on your own.  The largest gap here is
text normalization.  We do not yet have a standardize model for text
normalization with well definied models for which we could write
conversion scripts.  
</p>
<p>However here is a step by step attempt to show you what to do when
building support for a new language/lexicon.
</p>
<p>Suppose we need to create support for Pashto, and already have a 
festival voice running, and want it now to run in flite.  Converting
the voice itself (unitselction or clustergen) is fairly robust, but
you will also need C libraries for <samp>cmu_pashto_lang</samp> and 
<samp>cmu_pasho_lex</samp>.  The first stage is to create the basic
temple files for these.  In the core <samp>flite/</samp> source directory 
type
</p><div class="example">
<pre class="example">   ./tools/make_new_lang_lex pashto
</pre></div>
<p>This will create language and lex template files in
<samp>lang/cmu_pashto_lang/'</samp> and <samp>cmu_pashto_lex</samp>.
</p>
<p>Then in firectory <samp>lang/cmu_pashto_lang/</samp> type
</p><div class="example">
<pre class="example">    festival $FLITEDIR/tools/make_phoneset.scm
    ...
    festival&gt; (phonesettoC &quot;cmu_pashto&quot; (car (load &quot;PATHTO/cmu_pashto_transtac_phoneset.scm&quot; t)) &quot;pau&quot; &quot;.&quot;)
</pre></div>
<p>This will create <samp>cmu_pashto_lang_phoneset.[ch]</samp>.  You must the add these
explicitly to the <samp>Makefile</samp>.
</p>
<p>Then in <samp>lang/cmu_pashto_lex/</samp> you have to build the C version of
the lexicon and letter to sound rules.  The core script is in
<samp>flite/tools/build_lex</samp>.
</p><div class="example">
<pre class="example">    mkdir lex
    cd lex
    cp -p $FLITEDIR/tooks/build_lex .
</pre></div>
<p>Edit build_lex to give it the name of your lexicon name, and compiled
lexicon from your voice.
</p><div class="example">
<pre class="example">LEXNAME=cmu_pashto
LEXFILE=lexicon.out
</pre></div>
<p>You should (I think) remove the first line &ldquo;MNCL&rdquo; from your
<samp>lexicon.out</samp> file, note this <em>must</em> be the compiled lexicon
not the list of entries you compiled from as it expects the ordering, and
the syllabification.
</p><div class="example">
<pre class="example">    ./build_lex setup
</pre></div>
<p>Build the letter to sound rules (probably again)
</p><div class="example">
<pre class="example">    ./build_lex lts
</pre></div>
<p>Convert the compiled letter to sound rules to C.  This converts the
decision trees to decision graphs and runs WFST minimization of them
to get a more efficient set of structures.  This puts the generated C
files in <samp>c/</samp>.
</p><div class="example">
<pre class="example">    ./build_lex lts2c
</pre></div>
<p>Now convert the lexical entries themselves
</p><div class="example">
<pre class="example">    ./build_lex lex
</pre></div>
<p>Again the generate C files will be put in <samp>c/</samp>.
</p>
<p>Now we generated a Huffman codes compressed lexicon to reduce the 
lexicon size, merging frequent letter sequences and phone sequences.
</p><div class="example">
<pre class="example">    ./build_lex compresslex
</pre></div>
<p>The copy the <samp>.c</samp> and <samp>.h</samp> files to <samp>lang/cmu_pashto_lex/</samp>
[something about compressed and non-compressed???]
</p>

<hr>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Converting-FestVox-Voices" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="Porting-to-new-platforms.html#Porting-to-new-platforms" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="index.html#Abstract" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="flite_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[Index]</td>
<td valign="middle" align="left">[<a href="flite_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p><font size="-1">
  This document was generated on <em>October 23, 2015</em> using <a href="http://www.gnu.org/software/texinfo/"><em>texi2any</em></a>.
</font></p>


</body>
</html>