Read, slice, and write back audio files to disk (supported formats: .wav and .mp3). Used e.g. for streaming service to prepare audio chunks for greedy clients.
npm install:
$ npm install --save node-audio-slicer
This package relies on node-lame for mp3 encoding. Check the repository for requirements (no windows + lame installed at the moment).
Slice [.wav] to [.wav or .mp3]
load demo.wav, slice it into mp3 chunks saved in a myAudioFile
directory created beside the myAudioFile.wav
file.
const Slicer = require("node-audio-slicer").Slicer;
let slicer = new Slicer({compress:true});
slicer.slice('myAudioFile.wav', (chunkList) => {
console.log('done', chunkList);
});