mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-16 10:12:39 +00:00
Don't speak leading zero in times (eg. 02:30)
git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@2 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
+8
-1
@@ -525,7 +525,14 @@ int Translator::TranslateNumber_1(char *word, char *ph_out, unsigned int *flags,
|
|||||||
|
|
||||||
if((word[0] == '0') && (prev_thousands == 0) && (word[1] != langopts.decimal_sep))
|
if((word[0] == '0') && (prev_thousands == 0) && (word[1] != langopts.decimal_sep))
|
||||||
{
|
{
|
||||||
return(0); // number string with leading zero, speak as individual digits
|
if((n_digits == 2) && (word[3] == ':') && isdigit(word[5]) && isspace(word[7]))
|
||||||
|
{
|
||||||
|
// looks like a time 02:30, omit the leading zero
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return(0); // number string with leading zero, speak as individual digits
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((langopts.numbers & 0x1000) && (word[n_digits] == ' '))
|
if((langopts.numbers & 0x1000) && (word[n_digits] == ' '))
|
||||||
|
|||||||
Reference in New Issue
Block a user