Browse Source

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 <[email protected]>
master
golubovsky 6 years ago
parent
commit
009b6b5d14
3 changed files with 5 additions and 8 deletions
  1. 1
    8
      src/espeak-ng.c
  2. 3
    0
      src/include/espeak-ng/espeak_ng.h
  3. 1
    0
      src/libespeak-ng/voices.c

+ 1
- 8
src/espeak-ng.c View File

@@ -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);
}

+ 3
- 0
src/include/espeak-ng/espeak_ng.h View File

@@ -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);


+ 1
- 0
src/libespeak-ng/voices.c View File

@@ -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;

Loading…
Cancel
Save