From d460f1c448765a14564ebba80c0447a4f4ee2eac Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Tue, 29 Dec 2015 11:39:51 +0000 Subject: [PATCH] Support the additional --compile-... options in speak-ng. --- src/speak-ng.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/speak-ng.c b/src/speak-ng.c index d735fda4..805423d2 100644 --- a/src/speak-ng.c +++ b/src/speak-ng.c @@ -47,6 +47,8 @@ #include #include "speak_lib.h" +#include "espeak_ng.h" + #include "phoneme.h" #include "synthesize.h" #include "voice.h" @@ -402,6 +404,9 @@ int main(int argc, char **argv) { "version", no_argument, 0, 0x10b }, { "sep", optional_argument, 0, 0x10c }, { "tie", optional_argument, 0, 0x10d }, + { "compile-mbrola", optional_argument, 0, 0x10e }, + { "compile-intonations", no_argument, 0, 0x10f }, + { "compile-phonemes", no_argument, 0, 0x110 }, { 0, 0, 0, 0 } }; @@ -641,6 +646,18 @@ int main(int argc, char **argv) if (phonemes_separator == 'z') phonemes_separator = 0x200d; // ZWJ break; + case 0x10e: // --compile-mbrola + samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, data_path, 0); + espeak_ng_CompileMbrolaVoice(optarg2, stdout); + exit(0); + case 0x10f: // --compile-intonations + samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, data_path, espeakINITIALIZE_PATH_ONLY); + espeak_ng_CompileIntonation(stdout); + exit(0); + case 0x110: // --compile-phonemes + samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, data_path, espeakINITIALIZE_PATH_ONLY); + espeak_ng_CompilePhonemeData(22050, stdout); + exit(0); default: exit(0); }