(Latest update is at http://www.cs.dal.ca/~lalita/festival/festivalXP.htm )

 

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

 

 

Lalita Narupiyakul, 13 March 2006

 

Following my experience of compiling and installing the Festival Speech Synthesis v. 1.95 on Window 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. The 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 the Festival with Visual C++ v. 6.0. However, if we want to use the Festival on Win XP, we must put a lot of afford to configure, remark, and change some codes.  Therefore, I wrote the short step-by-step instruction to install the Festival on Win XP.

 

System Requirements

 

1.      Preparation Step

 

2.      Unpacking festival and speech_tools

 

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

 

4.      Preparing Visual C++

 

5.      Compiling speech_tools

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

-         Go to the bottom of the file and looking 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 this line no 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 list_i_t.cc in the directory speech_tools\base_class\inst_tmpl\

-         Remark at line no. 50 Instantiate_TList(int)

o       //Instantiate_TList(int)

-         Save file

 

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

-         Remark at line no. 49 Instantiate_TVector_T(EST_FVector, tvector_fvector)

o       // Instantiate_TVector_T(EST_FVector, tvector_fvector)

-         Save file

 

6.      Buliding the Festival

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

-         Remark at line no. 45 #include <iostream>

o       // #include <iostream>

-         Save file

 

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

-         Remark at line no. 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

-         Open and Edit 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 file

 

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

-         Remark at line no. 53 Instantiate_TList(EST_String)

o       // Instantiate_TList(EST_String)

-         Save file

 

 

7.      Run the Festival

 

8.      Patch for the Festival on Windows XP

 

Reference

 

(Updated March 15, 2006)