Browse Source

bugfix: force bitrate to 16 for SSML <audio>.

Espeak-ng uses bitrate 16 internally. If the input inside <audio> has a
different bitrate the audio will not play correctly unless converted to
16 bits.

Closes #885.
master
Juho Hiltunen 4 years ago
parent
commit
326b63132f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libespeak-ng/readclause.c

+ 1
- 1
src/libespeak-ng/readclause.c View File

strcpy(fname_temp, tmpnam(NULL)); strcpy(fname_temp, tmpnam(NULL));
#endif #endif


sprintf(command, "sox \"%s\" -r %d -c1 -t wav %s\n", fname, samplerate, fname_temp);
sprintf(command, "sox \"%s\" -r %d -c1 -b 16 -t wav %s\n", fname, samplerate, fname_temp);
if (system(command) == 0) if (system(command) == 0)
fname = fname_temp; fname = fname_temp;
} }

Loading…
Cancel
Save