Comparing audio files

Discussion in 'Perl Misc' started by kieran, Oct 8, 2008.

  1. kieran

    kieran Guest

    Hello,
    I am trying to compare two similar audio files (WAV). From what i have
    read i need to sample both audio files at certain frequencies and run
    these through a FFT and then compare the results. Can anyone advise me
    if this is the correct approach and also describe the steps i need to
    take to get to the stage where I can compare the files.
    TIA,
    Kieran
     
    kieran, Oct 8, 2008
    #1
    1. Advertisements

  2. You could try the ESP::pSI module.

    jue
     
    Jürgen Exner, Oct 8, 2008
    #2
    1. Advertisements

  3. kieran

    kieran Guest

    Hi Jue,
    thanks for your reply, i have searched for the module you mentiones in
    CPAN and Google but could not find it.
    Can you please send me a link.
    Best Regards,
    Kieran
     
    kieran, Oct 15, 2008
    #3
  4. kieran

    greymaus Guest

    The reply may, just may, be his attempt at humour. You can try the NSA!.
     
    greymaus, Oct 15, 2008
    #4
  5. Surely there's an Acme::ESP and Acme::pSI in CPAN?

    --
    RGB

    * ***
    *** *
    *
     
    RedGrittyBrick, Oct 15, 2008
    #5
  6. kieran

    Ted Zlatanov Guest

    Ted Zlatanov, Oct 15, 2008
    #6
  7. RedGrittyBrick, Oct 15, 2008
    #7
  8. kieran

    kieran Guest

    Hi Christian,
    Thanks for your reply, the approach you describe will certainly help,
    I have requested a trial version of Octave so I will begin using that
    for protoyyping once I get access.

    A couple of things you might be able to help me with, I have been
    looking for some modules to use for downsampling, filtering etc... The
    module I found for resampling audio called Audio::Mad::Resample would
    not install on my machine, i got some errors that i could not resolve.
    Are there any modules you can recomend for down/up sampling?
    Also for creating a low-pass filter i have been looking at PDL::Audio,
    there are many types of filter available in this module, I am not sure
    which is best for low-pass filters.
    Thanks,
    Kieran
     
    kieran, Oct 22, 2008
    #8
  9. kieran

    kieran Guest

    Hello,
    I have done some of the work in prototyping the wav file comparison in
    MATLAB and I have begun translating this into perl. I am experiencing
    some problems when I read the data from the wave file in perl, the
    values I am getting seem very large and seem to be 3,000(aprox.) times
    larger than the values i get when i imported the wav file data into
    Matlab. When I graph both sets of values the resulting graphs look the
    same as the wave form.
    In matlab i am using the wavread function to read the samples from my
    wav file. I get 49617 samples of very low numbers, lots of zero values
    and plenty of very low and negative values. I have followed a few
    tutorials in Matlab and these reading look correct.
    However when i attempt to do the same in perl i get the smae ammount
    of samples but the numbers are very large and with few if any zero
    readings. I have been uing the Audio::Analyzer Audio::Wav::Read
    modules.
    Can you explain why I am getting such a large difference between
    Matlab nad perl? I would expect the results to match.
    If you require any more information please let me know.
    Regards,
    Kieran
     
    kieran, Nov 11, 2008
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.