mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-03 06:12:55 +00:00
Start reading audio data after 44 bytes of WAV
https://github.com/espeak-ng/espeak-ng/issues/832
This commit is contained in:
@@ -19,6 +19,7 @@ class AudioStream {
|
||||
this.channelDataLength = 440;
|
||||
this.sampleRate = 22050;
|
||||
this.numberOfChannels = 1;
|
||||
this.init = false;
|
||||
this.src =
|
||||
'chrome-extension://<id>/nativeTransferableStream.html';
|
||||
this.ac = new AudioContext({
|
||||
@@ -152,8 +153,12 @@ class AudioStream {
|
||||
this.stdout.pipeTo(
|
||||
new WritableStream({
|
||||
write: async (value, c) => {
|
||||
for (
|
||||
let i = 0;
|
||||
let i = 0;
|
||||
if (!this.init) {
|
||||
this.init = true;
|
||||
i = 44;
|
||||
}
|
||||
for (;
|
||||
i < value.buffer.byteLength;
|
||||
i++, this.readOffset++
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user