|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void CompilePhonemeData2(const char *source, FILE *log) |
|
|
|
|
|
|
|
|
static espeak_ng_STATUS CompilePhonemeData2(const char *source, FILE *log) |
|
|
{//================================================ |
|
|
{//================================================ |
|
|
char fname[sizeof(path_home)+40]; |
|
|
char fname[sizeof(path_home)+40]; |
|
|
sprintf(fname,"%s/../phsource",path_home); |
|
|
sprintf(fname,"%s/../phsource",path_home); |
|
|
|
|
|
|
|
|
if(!access(fname, 755)) |
|
|
if(!access(fname, 755)) |
|
|
{ |
|
|
{ |
|
|
fprintf(log,"Can't find phoneme source directory: %s\n",fname); |
|
|
fprintf(log,"Can't find phoneme source directory: %s\n",fname); |
|
|
return; |
|
|
|
|
|
|
|
|
return ENE_READ_ERROR; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
strncpy0(current_fname,source,sizeof(current_fname)); |
|
|
strncpy0(current_fname,source,sizeof(current_fname)); |
|
|
|
|
|
|
|
|
if(f_in == NULL) |
|
|
if(f_in == NULL) |
|
|
{ |
|
|
{ |
|
|
fprintf(log,"Can't read master phonemes file: %s\n",fname); |
|
|
fprintf(log,"Can't read master phonemes file: %s\n",fname); |
|
|
return; |
|
|
|
|
|
|
|
|
return ENE_READ_ERROR; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sprintf(fname,"%s/../phsource/%s",path_home,"error_log"); |
|
|
sprintf(fname,"%s/../phsource/%s",path_home,"error_log"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(f_phdata==NULL || f_phindex==NULL || f_phtab==NULL) |
|
|
if(f_phdata==NULL || f_phindex==NULL || f_phtab==NULL) |
|
|
{ |
|
|
{ |
|
|
return; |
|
|
|
|
|
|
|
|
return ENE_WRITE_ERROR; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sprintf(fname,"%s/../phsource/compile_prog_log",path_home); |
|
|
sprintf(fname,"%s/../phsource/compile_prog_log",path_home); |
|
|
|
|
|
|
|
|
fclose(f_errors); |
|
|
fclose(f_errors); |
|
|
|
|
|
|
|
|
ReadPhondataManifest(); |
|
|
ReadPhondataManifest(); |
|
|
|
|
|
return ENS_OK; |
|
|
} // end of CompilePhonemeData |
|
|
} // end of CompilePhonemeData |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
espeak_ng_STATUS CompileIntonation(FILE *log) |
|
|
|
|
|
|
|
|
#pragma GCC visibility push(default) |
|
|
|
|
|
|
|
|
|
|
|
espeak_ng_STATUS espeak_ng_CompileIntonation(FILE *log) |
|
|
{//===================== |
|
|
{//===================== |
|
|
int ix; |
|
|
int ix; |
|
|
char *p; |
|
|
char *p; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CompilePhonemeData(long rate, FILE *log) |
|
|
|
|
|
|
|
|
espeak_ng_STATUS espeak_ng_CompilePhonemeData(long rate, FILE *log) |
|
|
{ |
|
|
{ |
|
|
WavegenInit(rate, 0); |
|
|
WavegenInit(rate, 0); |
|
|
WavegenSetVoice(voice); |
|
|
WavegenSetVoice(voice); |
|
|
CompilePhonemeData2("phonemes", log); |
|
|
|
|
|
|
|
|
return CompilePhonemeData2("phonemes", log); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#pragma GCC visibility pop |