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

#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h>
#include <time.h> #include <time.h>


#include <espeak-ng/espeak_ng.h> #include <espeak-ng/espeak_ng.h>
"\t List the available voices for the specified language.\n" "\t List the available voices for the specified language.\n"
"\t If <language> is omitted, then list all voices.\n" "\t If <language> is omitted, then list all voices.\n"
"--load Load voice from a file in current directory by name.\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"; "-h, --help Show this help.\n";


int samplerate; int samplerate;
{ "compile-intonations", no_argument, 0, 0x10f }, { "compile-intonations", no_argument, 0, 0x10f },
{ "compile-phonemes", optional_argument, 0, 0x110 }, { "compile-phonemes", optional_argument, 0, 0x110 },
{ "load", no_argument, 0, 0x111 }, { "load", no_argument, 0, 0x111 },
{ "dump", required_argument, 0, 0x112 },
{ 0, 0, 0, 0 } { 0, 0, 0, 0 }
}; };


int option_waveout = 0; int option_waveout = 0;
espeak_VOICE voice_select; espeak_VOICE voice_select;
char dumpfile[200];
char filename[200]; char filename[200];
char voicename[40]; char voicename[40];
char devicename[200]; char devicename[200];
case 0x111: // --load case 0x111: // --load
flag_load = 1; flag_load = 1;
break; break;
case 0x112: // --dump
strncpy(dumpfile, optarg2, sizeof(dumpfile) - 1);
break;
default: default:
exit(0); exit(0);
} }

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

ESPEAK_NG_API espeak_ng_STATUS ESPEAK_NG_API espeak_ng_STATUS
espeak_ng_SetVoiceByName(const char *name); 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_API espeak_ng_STATUS
espeak_ng_SetVoiceByProperties(espeak_VOICE *voice_selector); espeak_ng_SetVoiceByProperties(espeak_VOICE *voice_selector);



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



#pragma GCC visibility push(default) #pragma GCC visibility push(default)



ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetVoiceByFile(const char *filename) ESPEAK_NG_API espeak_ng_STATUS espeak_ng_SetVoiceByFile(const char *filename)
{ {
espeak_VOICE *v; espeak_VOICE *v;

Loading…
Cancel
Save