Listens to song over microphone and identifies using audio fingerprint on ACRCloud.
npm install identify-song
identify-song
uses ACRCloud for audio fingerprinting technology API. Sign up for a free developer account to get the required API access keys.
identify-song
requires the use of SoX to read audio from the microphone.
brew install sox
sudo apt-get install sox libsox-fmt-all
identify-song
is a function that when invoked creates a Promise
delivering the JSON result from the ACRCloud API on success.
const identifySong = require('identify-song');
identifySong({
host: '<ACRCloud host>', // i.e. 'us-west-2.api.acrcloud.com'
access_key: '<ACRCloud access key>',
access_secret: '<ACRCloud access secret'
})
.then(response => console.log(response))
.catch(error => console.error(error));
If you keep getting 'No result' code 1001 in the response, make sure your microphone volume is set appropriately (not too quiet, but not so loud that audio is cut off).