|
|
|
|
|
|
|
|
#include <sys/stat.h> |
|
|
#include <sys/stat.h> |
|
|
|
|
|
|
|
|
#include "speak_lib.h" |
|
|
#include "speak_lib.h" |
|
|
|
|
|
#include "espeak_ng.h" |
|
|
|
|
|
|
|
|
#ifndef S_ISDIR |
|
|
#ifndef S_ISDIR |
|
|
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) |
|
|
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) |
|
|
|
|
|
|
|
|
"--compile=<voice name>\n" |
|
|
"--compile=<voice name>\n" |
|
|
"\t Compile pronunciation rules and dictionary from the current\n" |
|
|
"\t Compile pronunciation rules and dictionary from the current\n" |
|
|
"\t directory. <voice name> specifies the language\n" |
|
|
"\t directory. <voice name> specifies the language\n" |
|
|
|
|
|
"--compile-mbrola=<voice name>\n" |
|
|
|
|
|
"\t Compile an MBROLA voice\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-data directory\n" |
|
|
"\t Specifies the directory containing the espeak-data directory\n" |
|
|
|
|
|
|
|
|
{"version", no_argument, 0, 0x10b}, |
|
|
{"version", no_argument, 0, 0x10b}, |
|
|
{"sep", optional_argument, 0, 0x10c}, |
|
|
{"sep", optional_argument, 0, 0x10c}, |
|
|
{"tie", optional_argument, 0, 0x10d}, |
|
|
{"tie", optional_argument, 0, 0x10d}, |
|
|
|
|
|
{"compile-mbrola", optional_argument, 0, 0x10e}, |
|
|
{0, 0, 0, 0} |
|
|
{0, 0, 0, 0} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
phonemes_separator = 0x200d; // ZWJ |
|
|
phonemes_separator = 0x200d; // ZWJ |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case 0x10e: // --compile-mbrola |
|
|
|
|
|
samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK,0,data_path,0); |
|
|
|
|
|
espeak_ng_CompileMbrolaVoice(optarg2, stdout); |
|
|
|
|
|
exit(0); |
|
|
|
|
|
|
|
|
default: |
|
|
default: |
|
|
exit(0); |
|
|
exit(0); |