Skip to content

califken/node-audio-peaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Generate peak audio data from an audio file URL in a Node.js environment - without the browser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published