mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 22:07:12 +00:00
[1.39.29]
Allow combining accent characters inside a word (don't cause the word to be spelled). Add command line options: --path --phonout git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@204 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+22
-4
@@ -62,6 +62,10 @@ static const char *help_text =
|
||||
"--compile=<voice name>\n"
|
||||
"\t Compile the pronunciation rules and dictionary in the current\n"
|
||||
"\t directory. =<voice name> is optional and specifies which language\n"
|
||||
"--path=\"<path>\"\n"
|
||||
"\t Specifies the directory containing the espeak-data directory\n"
|
||||
"--phonout=\"<filename>\"\n"
|
||||
"\t Write output from -x -X commands and mbrola phoneme data to this file\n"
|
||||
"--punct=\"<characters>\"\n"
|
||||
"\t Speak the names of punctuation characters during speaking. If\n"
|
||||
"\t =<characters> is omitted, all punctuation is spoken.\n"
|
||||
@@ -310,6 +314,8 @@ int main (int argc, char **argv)
|
||||
{"voices", optional_argument, 0, 0x104},
|
||||
{"stdout", no_argument, 0, 0x105},
|
||||
{"split", optional_argument, 0, 0x106},
|
||||
{"path", required_argument, 0, 0x107},
|
||||
{"phonout", required_argument, 0, 0x108},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
@@ -318,6 +324,8 @@ int main (int argc, char **argv)
|
||||
|
||||
FILE *f_text=NULL;
|
||||
char *p_text=NULL;
|
||||
FILE *f_phonemes_out = stderr;
|
||||
char *data_path = NULL; // use default path for espeak-data
|
||||
|
||||
int option_index = 0;
|
||||
int c;
|
||||
@@ -468,6 +476,17 @@ int main (int argc, char **argv)
|
||||
samples_split = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 0x107: // --path
|
||||
data_path = optarg;
|
||||
break;
|
||||
|
||||
case 0x108: // --phonout
|
||||
if((f_phonemes_out = fopen(optarg,"w")) == NULL)
|
||||
{
|
||||
fprintf(stderr,"Can't write to: %s\n",optarg);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
exit(0);
|
||||
}
|
||||
@@ -477,7 +496,7 @@ int main (int argc, char **argv)
|
||||
if(option_waveout || quiet)
|
||||
{
|
||||
// writing to a file (or no output), we can use synchronous mode
|
||||
samplerate = espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,0,NULL,0);
|
||||
samplerate = espeak_Initialize(AUDIO_OUTPUT_SYNCHRONOUS,0,data_path,0);
|
||||
samples_split = (samplerate * samples_split) * 60;
|
||||
|
||||
espeak_SetSynthCallback(SynthCallback);
|
||||
@@ -501,7 +520,7 @@ int main (int argc, char **argv)
|
||||
else
|
||||
{
|
||||
// play the sound output
|
||||
samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK,0,NULL,0);
|
||||
samplerate = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK,0,data_path,0);
|
||||
}
|
||||
|
||||
|
||||
@@ -538,8 +557,7 @@ int main (int argc, char **argv)
|
||||
espeak_SetParameter(espeakLINELENGTH,option_linelength,0);
|
||||
if(option_punctuation == 2)
|
||||
espeak_SetPunctuationList(option_punctlist);
|
||||
if(option_phonemes >= 0)
|
||||
espeak_SetPhonemeTrace(option_phonemes,stderr);
|
||||
espeak_SetPhonemeTrace(option_phonemes,f_phonemes_out);
|
||||
|
||||
if(filename[0]==0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user