mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-31 05:35:35 +00:00
[1.40.07]
*_list files. Ad feature for ordinal numbers (for some languages). *_list files. Allow hyphenated word groups to start with a number. *_list files. Allow "words" of symbols to contain brackets (move check for bracket characters to after the *_list lookup). --punct option. Fix some unnecessary pauses when speaking punctuation names. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@215 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+6
-4
@@ -862,8 +862,10 @@ static int AnnouncePunctuation(Translator *tr, int c1, int c2, char *buf, int bu
|
||||
|
||||
if(c1 == '-')
|
||||
return(CLAUSE_NONE); // no pause
|
||||
if(bufix > 0)
|
||||
return(CLAUSE_SHORTCOMMA);
|
||||
if((strchr_w(punct_close,c1) != NULL) && !iswalnum(c2))
|
||||
return(CLAUSE_COLON);
|
||||
return(CLAUSE_SHORTFALL+4);
|
||||
if(iswspace(c2) && strchr_w(punct_stop,c1)!=NULL)
|
||||
return(punct_attributes[lookupwchar(punct_chars,c1)]);
|
||||
|
||||
@@ -2029,7 +2031,7 @@ f_input = f_in; // for GetC etc
|
||||
}
|
||||
}
|
||||
else
|
||||
if((c1 == '<') && (ssml_ignore_l_angle != '<'))
|
||||
if((c1 == '<') && (ssml_ignore_l_angle != '<') && ((c2 == '/') || iswalpha(c2)))
|
||||
{
|
||||
// SSML Tag
|
||||
n_xml_buf = 0;
|
||||
@@ -2300,10 +2302,10 @@ if(option_ssml) parag=1;
|
||||
|
||||
if((nl_count==0) && (c1 == '.'))
|
||||
{
|
||||
if(iswdigit(cprev) && (tr->langopts.numbers & 0x10000))
|
||||
if(iswdigit(cprev) && (tr->langopts.numbers & 0x10000) && islower(c2))
|
||||
{
|
||||
// dot after a number indicates an ordinal number
|
||||
c2 = ' ';
|
||||
c2 = '.';
|
||||
continue;
|
||||
}
|
||||
if(iswlower(c2))
|
||||
|
||||
Reference in New Issue
Block a user