Generate peak audio data from a local filepath or remote file URL in a Node.js environment - without the browser.
Try this out on stackblitz - (run the command node index.js in the terminal)
Use your favorite package manager / npm to install.
npm install node-audio-peaks --save
Version 3.0.1 Is an ES6 module, and uses RxJS to return the audio peak data as an observable.
import { getAudioPeaks } from "node-audio-peaks";
// Generate peaks for a local audio file
let filepath = 'sampleaudio.mp3';
let audioPeaksFromFile$ = getAudioPeaks(filepath);
audioPeaksFromFile$.subscribe(console.log);
// Generate peaks for a remote audio file
let audioFileURL = 'https://www.kennethcaple.com/api/mp3/richinlovemutedguitarechoing.mp3';
let audioPeaksFromURL$ = getAudioPeaks(audioFileURL);
audioPeaksFromURL$.subscribe(console.log);
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This work is licensed under a GNU General Public User License.
Kenneth Caple