Browse Source

espeak-ng: add a <phsource-dir> argument to --compile-phonemes.

master
Reece H. Dunn 8 years ago
parent
commit
e372d84348
2 changed files with 11 additions and 4 deletions
  1. 2
    0
      CHANGELOG.md
  2. 9
    4
      src/espeak-ng.c

+ 2
- 0
CHANGELOG.md View File

* Documentation updates. * Documentation updates.
* Emscripten support. * Emscripten support.
* Merged the Android port into the main espeak-ng codebase. * Merged the Android port into the main espeak-ng codebase.
* Extend `--compile-phoneme` to support specifying the source directory for
phoneme files.


bug fixes: bug fixes:



+ 9
- 4
src/espeak-ng.c View File

"\t Compile an MBROLA voice\n" "\t Compile an MBROLA voice\n"
"--compile-intonations\n" "--compile-intonations\n"
"\t Compile the intonation data\n" "\t Compile the intonation data\n"
"--compile-phonemes\n"
"\t Compile the phoneme data\n"
"--compile-phonemes=<phsource-dir>\n"
"\t Compile the phoneme data using <phsource-dir> or the default phsource directory\n"
"--ipa Write phonemes to stdout using International Phonetic Alphabet\n" "--ipa Write phonemes to stdout using International Phonetic Alphabet\n"
"--path=\"<path>\"\n" "--path=\"<path>\"\n"
"\t Specifies the directory containing the espeak-ng-data directory\n" "\t Specifies the directory containing the espeak-ng-data directory\n"
{ "tie", optional_argument, 0, 0x10d }, { "tie", optional_argument, 0, 0x10d },
{ "compile-mbrola", optional_argument, 0, 0x10e }, { "compile-mbrola", optional_argument, 0, 0x10e },
{ "compile-intonations", no_argument, 0, 0x10f }, { "compile-intonations", no_argument, 0, 0x10f },
{ "compile-phonemes", no_argument, 0, 0x110 },
{ "compile-phonemes", optional_argument, 0, 0x110 },
{ 0, 0, 0, 0 } { 0, 0, 0, 0 }
}; };


{ {
espeak_ng_InitializePath(data_path); espeak_ng_InitializePath(data_path);
espeak_ng_ERROR_CONTEXT context = NULL; espeak_ng_ERROR_CONTEXT context = NULL;
espeak_ng_STATUS result = espeak_ng_CompilePhonemeData(22050, stdout, &context);
espeak_ng_STATUS result;
if (optarg2) {
result = espeak_ng_CompilePhonemeDataPath(22050, optarg2, NULL, stdout, &context);
} else {
result = espeak_ng_CompilePhonemeData(22050, stdout, &context);
}
if (result != ENS_OK) { if (result != ENS_OK) {
espeak_ng_PrintStatusCodeMessage(result, stderr, context); espeak_ng_PrintStatusCodeMessage(result, stderr, context);
espeak_ng_ClearErrorContext(&context); espeak_ng_ClearErrorContext(&context);

Loading…
Cancel
Save