Browse Source

ssml: handle invalid break strength (#1587)

Workaround for NVDA's broken SSML.


7c08cf52fe/source/synthDrivers/espeak.py (L336-L339)
master
Alexander Epaneshnikov 2 years ago
parent
commit
6d7101c03c
No account linked to committer's email address
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/libespeak-ng/ssml.c

+ 1
- 0
src/libespeak-ng/ssml.c View File

if ((attr1 = GetSsmlAttribute(px, "strength")) != NULL) { if ((attr1 = GetSsmlAttribute(px, "strength")) != NULL) {
static const int break_value[6] = { 0, 7, 14, 21, 40, 80 }; // *10mS static const int break_value[6] = { 0, 7, 14, 21, 40, 80 }; // *10mS
value = attrlookup(attr1, mnem_break); value = attrlookup(attr1, mnem_break);
if (value < 0) value = 2;
if (value < 3) { if (value < 3) {
// adjust prepause on the following word // adjust prepause on the following word
sprintf(&outbuf[*outix], "%c%dB", CTRL_EMBEDDED, value); sprintf(&outbuf[*outix], "%c%dB", CTRL_EMBEDDED, value);

Loading…
Cancel
Save