1.0.2 • Published 3 years ago

icecast-song-recognition v1.0.2

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

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.

GitHub issues Travis CI Build

Installation

npm i icecast-song-recognition --save

Usage

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

NameDefaultTypeDescription
acrConfignullObjectAPI key from ACRCloud
streamURLnullStringDirect URL to Icecast audio
recordingDuration3000NumberTime (in ms) to record Icecast stream before recognizing music
tempPath"./temp"StringPath to store temporary audio files