const speaker = new Speaker({
channels: 2,
bitDepth: 16,
sampleRate: 44100,
device: null,
});
stream.pipe(speaker);
I need it for break playing sound. Stream is instance of Readable.
const speaker = new Speaker({
channels: 2,
bitDepth: 16,
sampleRate: 44100,
device: null,
});
stream.pipe(speaker);
I need it for break playing sound. Stream is instance of Readable.
stream.pipeline
which claims to handle “forwarding errors and properly cleaning up and provide a callback when the pipeline is complete.”
Syntax
stream.pipeline(...streams, callback)
Here is a link to documentation.