mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-08 07:32:32 +00:00
ssml: handle invalid break strength (#1587)
Workaround for NVDA's broken SSML. https://github.com/nvaccess/nvda/blob/7c08cf52fe1fa8357eac31bf7fb32644dad97978/source/synthDrivers/espeak.py#L336-L339
This commit is contained in:
@@ -870,6 +870,7 @@ int ProcessSsmlTag(wchar_t *xml_buf, char *outbuf, int *outix, int n_outbuf, con
|
||||
if ((attr1 = GetSsmlAttribute(px, "strength")) != NULL) {
|
||||
static const int break_value[6] = { 0, 7, 14, 21, 40, 80 }; // *10mS
|
||||
value = attrlookup(attr1, mnem_break);
|
||||
if (value < 0) value = 2;
|
||||
if (value < 3) {
|
||||
// adjust prepause on the following word
|
||||
sprintf(&outbuf[*outix], "%c%dB", CTRL_EMBEDDED, value);
|
||||
|
||||
Reference in New Issue
Block a user