mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-17 02:30:24 +00:00
Fix crash: SSML when <voice name=""> has an unrecognised voice name.
SSML: Don't speak text within <metadata> </metadata> git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@145 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+9
-2
@@ -1221,8 +1221,8 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int
|
||||
|
||||
|
||||
|
||||
static espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
|
||||
{//============================================================================
|
||||
espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
|
||||
{//=====================================================================
|
||||
int ix;
|
||||
int match_fname = -1;
|
||||
int match_fname2 = -1;
|
||||
@@ -1231,6 +1231,13 @@ static espeak_VOICE *SelectVoiceByName(espeak_VOICE **voices, const char *name)
|
||||
int last_part_len;
|
||||
char last_part[41];
|
||||
|
||||
if(voices == NULL)
|
||||
{
|
||||
if(n_voices_list == 0)
|
||||
espeak_ListVoices(NULL); // create the voices list
|
||||
voices = voices_list;
|
||||
}
|
||||
|
||||
sprintf(last_part,"%c%s",PATHSEP,name);
|
||||
last_part_len = strlen(last_part);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user