Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleander/echoprint-rb
Echoprint server written in Ruby
https://github.com/oleander/echoprint-rb
Last synced: 4 days ago
JSON representation
Echoprint server written in Ruby
- Host: GitHub
- URL: https://github.com/oleander/echoprint-rb
- Owner: oleander
- License: mit
- Created: 2015-04-02T22:39:30.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-05T13:54:56.000Z (almost 10 years ago)
- Last Synced: 2024-11-20T20:12:05.061Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 1.89 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Echoprint server written in Ruby
A Ruby music identification server that is compatible with the
[Echoprint](http://echoprint.me/) music fingerprinting client. This server is based on the original [echoprint-server](https://github.com/echonest/echoprint-server) and [node-echoprint-server](https://github.com/jhurliman/node-echoprint-server).## Dependencies
- Ruby 2+
- PostgreSQLTo generate audio fingerprints you will need the [echoprint-codegen](https://github.com/echonest/echoprint-codegen) client.
## Installation
- Clone the project and enter the `echoprint-rb` folder.
- Install dependencies using `bundle install`.
- Set up the database.
- Copy `config/database-temp.yml` to `config/database.yml`.
- Change the credentials.
- Migrate the database using `rake db:create db:migrate`.
- Start the server using `rails s` on port 3000.Take a look at the [example requests](#example-requests) section below for code examples.
## Endpoints
### POST /fingerprint/ingest
Adds a new music fingerprint to the database if the given fingerprint is unique, otherwise the existing track is returned.
- `code` - The code string output by echoprint-codegen.
- `version` - Field output by echoprint-codegen, currently `4.12`.
- `duration` - Track duration output by echoprint-codegen.
- `external_id` - A UUID value representing the tracks.
### GET /fingerprint/queryQueries for a track matching the given fingerprint.
- `code` - The code string output by echoprint-codegen.
- `version` - `metadata.version` field output by echoprint-codegen.## Example requests
Take a look at the `examples` folder for complete examples of how to create a fingerprint.
## Tests
Invoke `rspec .` to run the test suite.
## TODO
- Optimize PostgreSQL indexes.
- Move fingerprint logic into a low level language like Rust or C.
- More tests.