Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1.32 KB

README.md

File metadata and controls

36 lines (29 loc) · 1.32 KB

Node Audio Peaks

Generate peak audio data from a local filepath or remote file URL in a Node.js environment - without the browser.

Demo

Try this out on stackblitz - (run the command node index.js in the terminal)

Installation

Use your favorite package manager / npm to install.

npm install node-audio-peaks --save

Usage

Version 3.0.1 Is an ES6 module, and uses RxJS to return the audio peak data as an observable.

getAudioPeaks(url, samples)

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

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This work is licensed under a GNU General Public User License.

Author

Kenneth Caple