Giter VIP home page Giter VIP logo

gimme-the-song's Introduction

Gimme-the-song

Gimme-the-song is a simple lib that recognize a music from a audio file. Its a Javascript implementation of AcoustId Chromaprint and their service. As it depends on a C library, Gimme-the-song needs to run on server side.

Installing

npm install gimme-the-song

Getting started

The "gimme" method receive an audio file, generates an audio fingerprint and search on MusicBrainz database using AcoustId Service.

const {gimme, setGimmeKey} = require('gimme-the-song')
const path = require('path')

// Remember to set a valid client key. Otherwise gimme will return null.
// If you don't have a client key, access https://acoustid.org/new-application to register your application and get a client key.
setGimmeKey('YOUR API KEY')

// get the full path to the file
const file_path = path.join(__dirname, './sample.mp3')
  
// call 'gimme' method, receive the results and console it
gimme(file_path, {}, (results) => {
	console.log(results)
})

Get audio fingerprint

If you just want to get the audio fingerprint, use the method "fpcalc". Similar to "gimme", it receives an audio file and generates an audio fingerprint. There is no need to set a cliente key if you are using just this method.

const {fpcalc} = require('gimme-the-song')

// get the full path to the file
const file_path = path.join(__dirname, './sample.mp3')

// call the method 'fpcalc', receive the results and console it
fpcalc(file_path, (results) => {
	console.log(results.fingerprint, results.duration)
})

Credits

I didn't needed to program the audio fingerprint proccess, I just did an implementation for Javascript. So, huge thanks and credits to Lukáš Lalinský and congratulations to his awesome project AcoustID and also to the guys from MusicBrainz who are storing all the fingerprinties. These were the only free open sources projects I found looking for hours on the internet. Thanks for the initiative!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.