mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
Finished the voice load code. Dumping voice def does not seem possible
because it is not stored in a single place. Signed-off-by: golubovsky <golubovsky@gmail.com>
This commit is contained in:
+1
-8
@@ -28,6 +28,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <espeak-ng/espeak_ng.h>
|
||||
@@ -114,9 +115,6 @@ static const char *help_text =
|
||||
"\t List the available voices for the specified language.\n"
|
||||
"\t If <language> is omitted, then list all voices.\n"
|
||||
"--load Load voice from a file in current directory by name.\n"
|
||||
"--dump=<file>\n"
|
||||
"\t Dump the currently loaded voice definition into a file\n"
|
||||
"\t in the current directory\n"
|
||||
"-h, --help Show this help.\n";
|
||||
|
||||
int samplerate;
|
||||
@@ -326,7 +324,6 @@ int main(int argc, char **argv)
|
||||
{ "compile-intonations", no_argument, 0, 0x10f },
|
||||
{ "compile-phonemes", optional_argument, 0, 0x110 },
|
||||
{ "load", no_argument, 0, 0x111 },
|
||||
{ "dump", required_argument, 0, 0x112 },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -358,7 +355,6 @@ int main(int argc, char **argv)
|
||||
int option_waveout = 0;
|
||||
|
||||
espeak_VOICE voice_select;
|
||||
char dumpfile[200];
|
||||
char filename[200];
|
||||
char voicename[40];
|
||||
char devicename[200];
|
||||
@@ -573,9 +569,6 @@ int main(int argc, char **argv)
|
||||
case 0x111: // --load
|
||||
flag_load = 1;
|
||||
break;
|
||||
case 0x112: // --dump
|
||||
strncpy(dumpfile, optarg2, sizeof(dumpfile) - 1);
|
||||
break;
|
||||
default:
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -119,6 +119,9 @@ espeak_ng_SetPunctuationList(const wchar_t *punctlist);
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
espeak_ng_SetVoiceByName(const char *name);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
espeak_ng_SetVoiceByFile(const char *filename);
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS
|
||||
espeak_ng_SetVoiceByProperties(espeak_VOICE *voice_selector);
|
||||
|
||||
|
||||
@@ -1466,6 +1466,7 @@ static void GetVoices(const char *path, int len_path_voices, int is_language_fil
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
|
||||
ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetVoiceByFile(const char *filename)
|
||||
{
|
||||
espeak_VOICE *v;
|
||||
|
||||
Reference in New Issue
Block a user