diff --git a/src/libespeak-ng/compiledata.c b/src/libespeak-ng/compiledata.c index abcb3c8d..421f70a1 100644 --- a/src/libespeak-ng/compiledata.c +++ b/src/libespeak-ng/compiledata.c @@ -2638,10 +2638,22 @@ static void CompilePhonemeFiles() phoneme_tab2[n_phcodes+1].mnemonic = 0; // terminator } -static espeak_ng_STATUS CompilePhonemeData2(FILE *log, espeak_ng_ERROR_CONTEXT *context) +#pragma GCC visibility push(default) + +espeak_ng_STATUS espeak_ng_CompilePhonemeData(long rate, FILE *log, espeak_ng_ERROR_CONTEXT *context) { + if (!log) log = stderr; + char fname[sizeof(path_home)+40]; + samplerate_native = samplerate = rate; + LoadPhData(NULL, NULL); + if (LoadVoice("", 0) == NULL) + return ENS_VOICE_NOT_FOUND; + + WavegenInit(rate, 0); + WavegenSetVoice(voice); + n_envelopes = 0; error_count = 0; resample_count = 0; @@ -2767,6 +2779,8 @@ static espeak_ng_STATUS CompilePhonemeData2(FILE *log, espeak_ng_ERROR_CONTEXT * return error_count > 0 ? ENS_COMPILE_ERROR : ENS_OK; } +#pragma GCC visibility pop + static const char *preset_tune_names[] = { "s1", "c1", "q1", "e1", NULL }; @@ -3057,18 +3071,4 @@ espeak_ng_STATUS espeak_ng_CompileIntonation(FILE *log, espeak_ng_ERROR_CONTEXT return error_count > 0 ? ENS_COMPILE_ERROR : ENS_OK; } -espeak_ng_STATUS espeak_ng_CompilePhonemeData(long rate, FILE *log, espeak_ng_ERROR_CONTEXT *context) -{ - if (!log) log = stderr; - - samplerate_native = samplerate = rate; - LoadPhData(NULL, NULL); - if (LoadVoice("", 0) == NULL) - return ENS_VOICE_NOT_FOUND; - - WavegenInit(rate, 0); - WavegenSetVoice(voice); - return CompilePhonemeData2(log, context); -} - #pragma GCC visibility pop