Compiling the Festival Speech Synthesis System Version 1.95 on Window XP SP2

 

Lalita Narupiyakul, 13 March 2006

Modified by Benjamin L. Brown, 5 May 2006

 

Following my experience of compiling and installing The Festival Speech Synthesis v. 1.95 on Window 2000/XP, I wrote this instruction for people who might be interested to use The Festival Speech Synthesis system (Festival) [ref] developed by The Centre of Speech Technology Research, The University of Edinburgh. Festival generally supports UNIX operating system and compatible with gcc 3.2, 3.3 and 3.4. The developers also provide a way to compile Festival with Visual C++ v. 6.0. However, if we want to use Festival on Win 2000/XP, we must put in a lot of effort to configure, comment, and change some code. Therefore, I wrote the following short step-by-step instruction to compile Festival on Win 2000/XP.

 

System Requirements

 

1.      Preparation Step

 

2.      Unpacking festival and speech_tools

 

3.      Creating Make files of festival and speech_tools for Visual C++

 

4.      Preparing Visual C++ for Command-Line Compiling

 

5.      Compiling a working copy of speech_tools in Visual C++

 

6.      Re-Creating Make files of speech_tools for Visual C++

 

7.      Pseudo-Compiling speech_tools

-          Open and edit the file EST_ServiceTable.cc in directory speech_tools\utils\

-          Go to the bottom of the file and look for these lines:

o        Declare_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry)

 

o        #if defined(INSTANTIATE_TEMPLATES)

 

o        #include "../base_class/EST_TList.cc"

o        #include "../base_class/EST_TSortable.cc"

o        #include "../base_class/EST_TKVL.cc"

 

o        Instantiate_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry)

 

o        #endif

-          Move these lines to the top of the file and paste them under line number 47:

o        #include <time.h>

o        Declare_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry)

 

o        #if defined(INSTANTIATE_TEMPLATES)

 

o        #include "../base_class/EST_TList.cc"

o        #include "../base_class/EST_TSortable.cc"

o        #include "../base_class/EST_TKVL.cc"

 

o        Instantiate_KVL_T(EST_String, EST_ServiceTable::Entry, EST_String_ST_entry)

 

o        #endif

 

 

-          Open and edit the file list_i_t.cc in the directory speech_tools\base_class\inst_tmpl\

-          Commend out line number 50: Instantiate_TList(int)

o       // Instantiate_TList(int)

-          Save the file

 

-          Open and edit the file vector_fvector_t.cc in the directory speech_tools\base_class\inst_tmpl\

-          Comment out line number 49: Instantiate_TVector_T(EST_FVector, tvector_fvector)

o       // Instantiate_TVector_T(EST_FVector, tvector_fvector)

-          Save the file

 

 

8.      Compiling festival

-          Open and edit the file EST_JoinCostCache.cc in the directory festival\src\modules\MultiSyn\

-          Comment out line number 45: #include <iostream>

o       // #include <iostream>

-          Save the file

 

-          Open and edit the file EST_JoinCostCache.h in the directory festival\src\modules\MultiSyn\

-          Comment out lines 91, 92, and 93:

static const unsigned char minVal =  0x0;

static const unsigned char maxVal = 0xff;

static const unsigned char defVal = 0xff;

-          Change to ...

//static const unsigned char minVal =  0x0;

//static const unsigned char maxVal = 0xff;

//static const unsigned char defVal = 0xff;

-          Save the file

 

-          Open and edit the file EST_JoinCostCache.cc in the directory festival\src\modules\MultiSyn\

-          At line no.

Line 91: return minVal;

Line 97: return defVal;

Line 135: unsigned int qleveln = maxVal-minVal;

Line 148: qcost = maxVal;

Line 150: qcost = minVal;

-          Change to ...

Line 91: return 0x0;

Line 97: return 0xff;

Line 135: unsigned int qleveln = 0xff -0x0;

Line 148: qcost = 0xff;

Line 150: qcost = 0x0;

-          Save the file

 

-          Open and edit the file us_diphone_index.cc in the directory festival\src\modules\UniSyn_diphone\

-          At line no.

Line 265: for (int i = 0; i < diph_index->diphone.n(); ++i)

Line 547: for (int j = 0; j < sub_coefs->num_frames(); ++j)

-          Change to ...

Line 265: int i; for ( i = 0; i < diph_index->diphone.n(); ++i)

Line 547: int j; for ( j = 0; j < sub_coefs->num_frames(); ++j)

-          Save the file

 

-          Open and edit the file us_prosody.cc in the directory festival\src\modules\UniSyn\

-          At line no.

Line 97: for( int i=0; i<fz_len; i++ ){

Line 205: for (int i = 0 ; i < f0.num_frames(); ++i)

-          Change to ...

Line 97: for(  i=0; i<fz_len; i++ ){

Line 205: int i; for ( i = 0 ; i < f0.num_frames(); ++i)

-          Save the file

 

-          Open and edit the file usmapping.cc in the directory festival\src\modules\UniSyn\

-          At line no.

Line 208: for (int i = 0; i < pm_num_frames; ++i)

Line 232: for( int i=0; i<num_frames; ++i ){

Line 265: for( int i=0; i<left_start_index; ++i ){

Line 298: for( int i=left_start_index; i<right_end_index; ++i )

Lint 353: for( int i=0; i<smoothn; ++i )

Line 360: for( int i=0; i<smoothn; ++i )

Line 368: for( int i=left_start_index; i<right_end_index; ++i ){

Line 375: for( int i=left_start_index; i<right_end_index; ++i ){

Line 390: for( int i=left_start_index; i<target_pm_length; ++i )

Line 457: for( int i=0; i<left_start_index; ++i ){

Line 490: for( int i=left_start_index; i<right_end_index; ++i )

Line 545: for( int i=left_start_index; i<right_end_index; ++i ){

Line 560: for( int i=left_start_index; i<target_pm_length; ++i )

-          Change to ...

Line 208: int i; for ( i = 0; i < pm_num_frames; ++i)

Line 232: int i; for(  i=0; i<num_frames; ++i ){

Line 265: int i; for(  i=0; i<left_start_index; ++i ){

Line 298: for(  i=left_start_index; i<right_end_index; ++i )

Lint 353: for(  i=0; i<smoothn; ++i )

Line 360: for(  i=0; i<smoothn; ++i )

Line 368: for(  i=left_start_index; i<right_end_index; ++i ){

Line 375: for(  i=left_start_index; i<right_end_index; ++i ){

Line 390: for(  i=left_start_index; i<target_pm_length; ++i )

Line 457: int i; for(  i=0; i<left_start_index; ++i ){

Line 490: for(  i=left_start_index; i<right_end_index; ++i )

Line 545: for(  i=left_start_index; i<right_end_index; ++i ){

Line 560: for(  i=left_start_index; i<target_pm_length; ++i )

-          Save the file

 

-          Open and edit the file us_unit.cc in the directory festival\src\modules\UniSyn\

-          At line no.

Line 534: for( int i=0; i<pp_length; ++i ){

Line 595: for( int i=smooth_start_index; i<=left_end_index; ++i, factor+=factor_incr ){

Line 603: for( int i=right_start_index; i<=smooth_end_index; ++i, factor+=factor_incr){

-          Change to ...

Line 534: int i; for(  i=0; i<pp_length; ++i ){

Line 595: int i; for( i=smooth_start_index; i<=left_end_index; ++i, factor+=factor_incr ){

Line 603: for(  i=right_start_index; i<=smooth_end_index; ++i, factor+=factor_incr){

-          Save the file

 

-          Open and edit the file EST_JoinCost.h in the directory festival\src\modules\MultiSyn\

-          At line no.

Line 190: for(int i = 0; i < l_length; i++)

-          Change to ...

Line 190: int i; for( i = 0; i < l_length; i++)

-          Save the file

 

-          Open and edit the file duffint.cc in the directory festival\src\modules\Intonation\

-          At line no.

Line 111: for (int i = 0; i < n_frames; ++ i)

-          Change to ...

Line 111: int i; for ( i = 0; i < n_frames; ++ i)

-          Save the file

 

-          Open and edit the file unitSelection.cc in the directory festival\src\modules\MultiSyn\

-          At line no.

Line 205: if( DiphoneUnitVoice* duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_duv)) ){

Line 220: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(x)) ){

Line 233: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) ){

Line 246: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) ){

Line 257: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) ){

Line 272: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) )

Line 289: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) )

Line 316: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_voice)) )

Line 338: if( DiphoneVoiceModule *dvm = dynamic_cast<DiphoneVoiceModule*>(voice(l_vm)) ){

Line 354: if( DiphoneUnitVoice *duv = dynamic_cast<DiphoneUnitVoice*>(voice(l_vm)) ){

-          Change to ...

Line 205: if( DiphoneUnitVoice* duv = (DiphoneUnitVoice*)(voice(l_duv)) ){

Line 220: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(x)) ){

Line 233: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) ){

Line 246: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) ){

Line 257: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) ){

Line 272: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) )

Line 289: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) )

Line 316: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_voice)) )

Line 338: if( DiphoneVoiceModule *dvm = (DiphoneVoiceModule*) (voice(l_vm)) ){

Line 354: if( DiphoneUnitVoice *duv = (DiphoneUnitVoice*) (voice(l_vm)) ){

-          Save the file

 

-          Open and edit the file list_s_t.cc in the directory speech_tools\base_class\inst_tmpl\

-          Comment out line number 53: Instantiate_TList(EST_String)

o       // Instantiate_TList(EST_String)

-          Save the file

 

 

9.      Try Festival Text-to-Speech

 

10.      Pre-Modified / Compiled Files for Windows

 

Reference

(Updated May 15, 2006)

 

Archive