autotools: support building the mbrola phtrans files

This commit is contained in:
Reece H. Dunn
2014-08-14 10:44:18 +01:00
parent 560b214623
commit 55b2e01a6c
43 changed files with 233 additions and 5 deletions
+11 -3
View File
@@ -3747,9 +3747,9 @@ fprintf(f_errors,"\nRefs %d, Reused %d\n",count_references,duplicate_references
ReadPhondataManifest();
} // end of CompilePhonemeData
#include <errno.h>
void CompileMbrola()
void CompileMbrola(const char *mbrola_file)
{//=================
char *p;
FILE *f_in;
@@ -3769,7 +3769,15 @@ void CompileMbrola()
int mbrola_ctrl = 20; // volume in 1/16 ths
MBROLA_TAB data[N_PHONEME_TAB];
wxString filepath = wxFileSelector(_T("Read Mbrola phonemes file"),path_phsource+_T("/mbrola"),_T(""),_T(""),_T("*"),wxOPEN);
wxString filepath;
if (mbrola_file == NULL)
{
filepath = wxFileSelector(_T("Read Mbrola phonemes file"),path_phsource+_T("/mbrola"),_T(""),_T(""),_T("*"),wxOPEN);
}
else
{
filepath = mbrola_file;
}
strcpy(buf,filepath.mb_str(wxConvLocal));
if((f_in = fopen(buf,"r")) == NULL)
{
+12 -1
View File
@@ -63,7 +63,7 @@ extern void DictionarySort(const char *dictname);
extern void init_z();
extern void CompilePhonemeData(void);
extern void CompileSampleRate(void);
extern void CompileMbrola();
extern void CompileMbrola(const char *mbrola_file = NULL);
extern void CompileIntonation();
extern void InitSpectrumDisplay();
extern void InitProsodyDisplay();
@@ -148,6 +148,17 @@ if(argc > 1)
CompilePhonemeData();
CompileIntonation();
}
else if(argc > 2 && strcmp(param,"--compile-mbrola")==0)
{
samplerate_native = samplerate = 22050;
LoadPhData(NULL);
if(LoadVoice("", 0) == NULL)
{
fprintf(stderr, "Failed to load default voice\n");
exit(1);
}
CompileMbrola(argv[2]);
}
exit(0);
}