From f6e7f8bb7c565aeb09a82c4b6f68153337445cd6 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 23 Apr 2016 18:29:35 +0100 Subject: [PATCH] Move some initialisation code from the old espeakedit.cpp file into espeak_ng_CompilePhonemeData to fix the phoneme data. --- src/libespeak-ng/compiledata.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libespeak-ng/compiledata.c b/src/libespeak-ng/compiledata.c index 7dd4a4b4..943be963 100644 --- a/src/libespeak-ng/compiledata.c +++ b/src/libespeak-ng/compiledata.c @@ -3058,6 +3058,12 @@ espeak_ng_STATUS espeak_ng_CompileIntonation(FILE *log, espeak_ng_ERROR_CONTEXT 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("phonemes", log, context);