1.0.2 • Published 5 years ago
icecast-song-recognition v1.0.2
icecast-song-recognition
An npm module for getting song metadata from Icecast streams with sound recognition.
Perfect for Icecast streams that don't already contain song metadata.
Installation
npm i icecast-song-recognition --saveUsage
const { identifySong } = require("icecast-song-recognition");
const acrConfig = {
host: '*****.acrcloud.com',
access_key: '*****',
access_secret: '*****'
};
identifySong({
acrConfig,
streamURL: 'http://stream2.datacenter.by:8002/energy'
})
.catch(err => { console.log(new Error(err)) })
.then(metadata => console.log(metadata));API
| Name | Default | Type | Description |
|---|---|---|---|
| acrConfig | null | Object | API key from ACRCloud |
| streamURL | null | String | Direct URL to Icecast audio |
| recordingDuration | 3000 | Number | Time (in ms) to record Icecast stream before recognizing music |
| tempPath | "./temp" | String | Path to store temporary audio files |