chromaprint-fixed
A JavaScript implementation of AcoustID Chromaprint
Last updated 2 years ago by anoa .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install chromaprint-fixed 
SYNC missed versions from official npm registry.

chromaprint.js

A JavaScript implementation of AcoustID Chromaprint. Provides a web library for calculating chromatic fingerprints of audio data in a Javascript runtime (such as the browser or Node), and a command-line implementation of fpcalc, which gets fingerprints of local files.

Installation and usage

NodeJS

npm install -g chromaprint
fpcalc -h

or

npm install chromaprint
./node_modules/.bin/fpcalc -h

Browser

    <!-- attaches a chromaprint object to window -->
    <script src="path/to/chromaprint.js"><script>
    <script>
        // Assuming loadAudio gets a decoded audio stream.
        loadAudio(url, function(stream) {
            chromaprint.calculateFingerprint(stream, console.log);
        });
    </script>

API

The top-level chromaprint object has a number of factory functions, which it exposes purely for testing. The public API is pretty thin, though.

  • chromaprint.calculateFingerprint(stream, [options], callback) Calls callback with the compressed and Base64 encoded fingerprint (a String).
  • chromaprint.calculateRawFingerprint(stream, [options], callback) Calls callback with the uncompressed fingerprint (a Buffer).
  • chromaprint.compress(buffer) Compresses a buffer, returning a compressed Buffer.
  • chromaprint.base64encode(buffer) Encodes the bytes in the buffer into a Base64 String.

Testing and development

    git clone https://github.com/bjjb/chromaprint.js
    cd chromaprint.js
    npm install
    npm test
    npm test:server # starts a mocha test server

Report issues to the issue tracker.

Further reading

There may be something of intrest in the wiki

License, copyright, thanks, etc

chromaprint.js is licenced under the LGPL (same as chromaprint). See the included LICENSE file.

It was written by bjjb, as a port of Lukáš Lalinský's original C++ library. You can read more in the README.md of the lib/] directory.

Current Tags

  • 0.1.0                                ...           latest (2 years ago)

1 Versions

  • 0.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (3)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |