Skip to content

tanob/ofa-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libofa for Ruby

This Ruby gem wraps the OFA library (libofa) that is an open-source audio fingerprint created and provided by MusicIP (now called AmpliFIND Music Services).

Install

gem install ofa -- --with-ofa-include=<libofa-dir>/include --with-ofa-lib=<libofa-dir>/lib

or if you're using Bundler:

bundle config build.ofa --with-ofa-include=<libofa-dir>/include --with-ofa-lib=<libofa-dir>/lib

If you're using OSX and Homebrew you can install libofa by using my tap:

brew tap tanob/custom
brew install libofa

How to use

require 'ofa'

sample_rate = 44100
stereo = true
data = File.read('music.wav')
puts "Using libofa version: #{Ofa::version.join('.')}"
puts 'Calculated PUID:', Ofa::create_fingerprint(data, data.size/2, sample_rate, stereo)

About

Ruby binding to libofa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages