mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 06:01:53 +00:00
[1.47.11c]
Change API function: espeak_TextToPhonemes(). Fix bug: number following a non-ascii character could cause crash. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@361 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+4
-3
@@ -1865,6 +1865,7 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
|
||||
char *voice_change;
|
||||
static FILE *f_text=NULL;
|
||||
static const void *p_text=NULL;
|
||||
const char *phon_out;
|
||||
|
||||
if(control == 4)
|
||||
{
|
||||
@@ -1957,14 +1958,14 @@ int SpeakNextClause(FILE *f_in, const void *text_in, int control)
|
||||
if(option_phonemes >= 3)
|
||||
phoneme_mode = 0x10 + option_phonemes-3; // 0x10=ipa, 0x11=ipa with tie, 0x12=ipa with ZWJ, 0x13=ipa with separators
|
||||
|
||||
GetTranslatedPhonemeString(translator->phon_out, sizeof(translator->phon_out), phoneme_mode);
|
||||
phon_out = GetTranslatedPhonemeString(phoneme_mode);
|
||||
if(option_phonemes > 0)
|
||||
{
|
||||
fprintf(f_trans,"%s\n",translator->phon_out);
|
||||
fprintf(f_trans,"%s\n",phon_out);
|
||||
}
|
||||
if(phoneme_callback != NULL)
|
||||
{
|
||||
phoneme_callback(translator->phon_out);
|
||||
phoneme_callback(phon_out);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user