mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
[1.31.14]
SSML: <voice>, if a language is specified, forget previously selected voice name. Voice selection, convert language name to lower-case. espeak-data/mbrola_ph files, allow use by both little and big-endian processors. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@149 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -804,6 +804,7 @@ static const char *VoiceFromStack()
|
||||
int ix;
|
||||
SSML_STACK *sp;
|
||||
const char *v_id;
|
||||
int voice_name_specified;
|
||||
espeak_VOICE voice_select;
|
||||
char voice_name[40];
|
||||
char language[40];
|
||||
@@ -818,9 +819,11 @@ static const char *VoiceFromStack()
|
||||
for(ix=0; ix<n_ssml_stack; ix++)
|
||||
{
|
||||
sp = &ssml_stack[ix];
|
||||
voice_name_specified = 0;
|
||||
|
||||
if((sp->voice_name[0] != 0) && (SelectVoiceByName(NULL,sp->voice_name) != NULL))
|
||||
{
|
||||
voice_name_specified = 1;
|
||||
strcpy(voice_name, sp->voice_name);
|
||||
language[0] = 0;
|
||||
voice_select.gender = 0;
|
||||
@@ -828,7 +831,11 @@ static const char *VoiceFromStack()
|
||||
voice_select.variant = 0;
|
||||
}
|
||||
if(sp->language[0] != 0)
|
||||
{
|
||||
strcpy(language, sp->language);
|
||||
if(voice_name_specified == 0)
|
||||
voice_name[0] = 0; // forget a previous voice name if a language is specified
|
||||
}
|
||||
if(sp->voice_gender != 0)
|
||||
voice_select.gender = sp->voice_gender;
|
||||
if(sp->voice_age != 0)
|
||||
|
||||
Reference in New Issue
Block a user