mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 13:38:47 +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:
+15
-11
@@ -1831,17 +1831,24 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, int suppress_null
|
||||
}
|
||||
else
|
||||
{
|
||||
if((!found) && (tensunits == 0))
|
||||
if((hundreds==1) && (tr->langopts.numbers2 & NUM2_OMIT_1_HUNDRED_ONLY) && ((control & 1)==0))
|
||||
{
|
||||
// is there a special pronunciation for exactly n00 ?
|
||||
sprintf(string,"_%dC0",hundreds);
|
||||
found = Lookup(tr, string, ph_digits);
|
||||
// only look for special 100 if there are previous thousands
|
||||
}
|
||||
|
||||
if(!found)
|
||||
else
|
||||
{
|
||||
sprintf(string,"_%dC",hundreds);
|
||||
found = Lookup(tr, string, ph_digits); // is there a specific pronunciation for n-hundred ?
|
||||
if((!found) && (tensunits == 0))
|
||||
{
|
||||
// is there a special pronunciation for exactly n00 ?
|
||||
sprintf(string,"_%dC0",hundreds);
|
||||
found = Lookup(tr, string, ph_digits);
|
||||
}
|
||||
|
||||
if(!found)
|
||||
{
|
||||
sprintf(string,"_%dC",hundreds);
|
||||
found = Lookup(tr, string, ph_digits); // is there a specific pronunciation for n-hundred ?
|
||||
}
|
||||
}
|
||||
|
||||
if(found)
|
||||
@@ -1855,9 +1862,6 @@ static int LookupNum3(Translator *tr, int value, char *ph_out, int suppress_null
|
||||
{
|
||||
if((tr->langopts.numbers & NUM_OMIT_1_HUNDRED) != 0)
|
||||
say_one_hundred = 0;
|
||||
|
||||
if(((tr->langopts.numbers2 & NUM2_OMIT_1_HUNDRED_ONLY) != 0) && ((control & 1)==0))
|
||||
say_one_hundred = 0;
|
||||
}
|
||||
|
||||
if(say_one_hundred != 0)
|
||||
|
||||
Reference in New Issue
Block a user