Skip to content

Read, slice, and write back to disk audio files in NodeJS

License

Notifications You must be signed in to change notification settings

PyrApple/node-audio-slicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-audio-slicer

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.

Installation

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).

Supported Formats

Slice [.wav] to [.wav or .mp3]

Examples

Slice wav file into .mp3 chunks

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);
});

About

Read, slice, and write back to disk audio files in NodeJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published