[marytts] Fix incorrect wav header (#12571)
With this simple fix, MaryTTS creates the correct wav header for the audio inputstream (audioformat is now assigned before we use it) Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
This commit is contained in:
parent
94301eee8c
commit
f1a1bd5f1d
|
@ -57,8 +57,8 @@ class MaryTTSAudioStream extends FixedLengthAudioStream {
|
|||
// The length of an AudioInputStream is expressed in sample frames, not bytes so readAllBytes() cannot be used.
|
||||
rawAudio = inputStreamToBytes(inputStream);
|
||||
this.length = rawAudio.length + 36;
|
||||
this.inputStream = new SequenceInputStream(getWavHeaderInputStream(length), new ByteArrayInputStream(rawAudio));
|
||||
this.audioFormat = audioFormat;
|
||||
this.inputStream = new SequenceInputStream(getWavHeaderInputStream(length), new ByteArrayInputStream(rawAudio));
|
||||
}
|
||||
|
||||
private byte[] inputStreamToBytes(InputStream inputStream) throws IOException {
|
||||
|
|
Loading…
Reference in New Issue