Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Audio::Ofa::Util 0.04

    Download button

    No screenshots available
    Downloads: 365  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Christoph Bußenius | More programs
    GPL / FREE
    July 15th, 2009, 06:21 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Audio::Ofa::Util description

    Retrieve audio fingerprints and metadata for unknown audio files

    Audio::Ofa::Util is a Perl module that tries to make retrieving audio fingerprints and metadata for unknown audio files as easy as possible. It interfaces with the modules Audio::Ofa and WebService::MusicBrainz, provides a simple LWP based interface to the MusicDNS library, and can make use of Audio::Extract::PCM to read some popular music formats.

    SYNOPSIS

    The most comprehensive way to use this is to start with a (possibly untagged) file name and get full metadata:

     my $util = Audio::Ofa::Util->new(filename => 'song.ogg');
     my @tracks = $util->musicbrainz_lookup or die $util->error;
     for (@tracks) {
     print 'Artist: ', $_->artist, "
    ";
     print 'Title: ', $_->title, "
    ";
     print 'Track: ', $_->track, "
    ";
     print 'Album: ', $_->album, "

    ";
     }


    To create an audio fingerprint:

     my $util = Audio::Ofa::Util->new(filename => 'song.ogg');
     $util->analyze_file or die $util->error;
     print $util->fingerprint, "
    ";


    To create a fingerprint and look it up at MusicDNS:

     my $util = Audio::Ofa::Util->new(filename => 'song.ogg');
     $util->musicdns_lookup or die $util->error; # calls analyze_file implicitly
     print $util->artist, ' - ', $util->title, "
    ";


    To look up a known fingerprint at MusicDNS (you need the length of the song, too):

     my $util = Audio::Ofa::Util->new(fingerprint => $fp, duration => $millisecs);

    The overall process goes like this:

    * We create an audio fingerprint, which stores some characteristics of a recording in a rather small amount of data. This is what libofa (and the Perl binding in Audio::Ofa) does. This module (Audio::Ofa::Util) faciliates this with "analyze_file" by allowing to fingerprint some widely used music formats and storing the results so they can be used for the next steps:
    * The audio fingerprint is submitted to the MusicDNS web service. Using a proprietary fuzzy algorithm and their database, they determine which song we have at hand. MusicDNS returns some metadeta: The artist, the song title, and a PUID. This "portable unique identifier" is an arbitrary index into their database and is unique for every recording of a given song.

    Note that while libofa's audio fingerprints may change after transformations of a recording (such as lossy audio compression or radio transmission), the fuzzy algorithm will (ideally) still find the same PUID.
    * Because we usually want to know more than the artist and title, we look up the PUID in a second Web Database called MusicBrainz. It provides us with all desired metadata such as all the albums the song has appeared on in this particular version, and the respective track numbers.

    This module provides a basic MusicBrainz PUID lookup through "musicbrainz_lookup". If you want to know even more (such as members of the band and the previous bands of those members), you can use WebService::MusicBrainz, to which this module provides an easy frontend.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    audio fingerprints | audio metadata | Perl module | audio | fingerprints | metadata

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM