Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Comparing audio files

Reply
Thread Tools

Comparing audio files

 
 
kieran
Guest
Posts: n/a
 
      10-08-2008
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
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      10-08-2008
kieran <(E-Mail Removed)> wrote:

>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.


You could try the ESP:SI module.

jue
 
Reply With Quote
 
 
 
 
kieran
Guest
Posts: n/a
 
      10-15-2008
On Oct 8, 5:12 pm, Jürgen Exner <(E-Mail Removed)> wrote:
> kieran <(E-Mail Removed)> wrote:
> >I am trying tocompare twosimilar 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.

>
> You could try the ESP:SI module.
>
> jue


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
 
Reply With Quote
 
greymaus
Guest
Posts: n/a
 
      10-15-2008
On 2008-10-15, kieran <(E-Mail Removed)> wrote:
> On Oct 8, 5:12 pm, Jürgen Exner <(E-Mail Removed)> wrote:
>> kieran <(E-Mail Removed)> wrote:
>> >I am trying tocompare twosimilar 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.

>>
>> You could try the ESP:SI module.
>>
>> jue

>
> 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


The reply may, just may, be his attempt at humour. You can try the NSA!.

--
Greymaus
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      10-15-2008

greymaus wrote:
> On 2008-10-15, kieran <(E-Mail Removed)> wrote:
>> On Oct 8, 5:12 pm, Jürgen Exner <(E-Mail Removed)> wrote:
>>> kieran <(E-Mail Removed)> wrote:
>>>> I am trying tocompare twosimilar 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.
>>> You could try the ESP:SI module.
>>>
>>> jue

>> 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

>
> The reply may, just may, be his attempt at humour. You can try the NSA!.
>


Surely there's an Acme::ESP and Acme:SI in CPAN?

--
RGB

* ***
*** *
*
 
Reply With Quote
 
Ted Zlatanov
Guest
Posts: n/a
 
      10-15-2008
On Wed, 15 Oct 2008 12:15:47 +0100 RedGrittyBrick <(E-Mail Removed)> wrote:

R> Surely there's an Acme::ESP and Acme:SI in CPAN?

I put PSI::ESP in this article but IBM screwed up the link (made it
lowercase):
http://www.ibm.com/developerworks/li...brary/l-perl1/

The real link is:
http://www.ibm.com/developerworks/li...l-perl1/ESP.pm

Ted
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      10-15-2008

Ted Zlatanov wrote:
> On Wed, 15 Oct 2008 12:15:47 +0100 RedGrittyBrick <(E-Mail Removed)> wrote:
>
> R> Surely there's an Acme::ESP and Acme:SI in CPAN?
>
> I put PSI::ESP in this article but IBM screwed up the link (made it
> lowercase):
> http://www.ibm.com/developerworks/li...brary/l-perl1/
>
> The real link is:
> http://www.ibm.com/developerworks/li...l-perl1/ESP.pm
>


Nice article!

I admit I was thinking of things like this:
http://search.cpan.org/~tyemq/Acme-ESP-1.002007/ESP.pm

--
RGB
 
Reply With Quote
 
kieran
Guest
Posts: n/a
 
      10-22-2008
On Oct 16, 9:56 pm, rc <(E-Mail Removed)> wrote:
> On Oct 8, 4:39 pm, kieran <(E-Mail Removed)> wrote:
>
> > Hello,
> > I am trying to compare two similar audio files (WAV). From what i have
> > read i need tosampleboth 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.

>
> While this can certainly be done in Perl, a nice environment for
> prototyping this kind of applications is GNU Octave or Matlab (given
> you are rich or a student). Reading some files from wav,down/
> upsampling them, applying filters and perform an fft is just a few
> lines of code in both of these tools.
>
> Once you have a working solution, you can still collect all modules
> you need to do it in Perl from CPAN or just continue to use Octave via
> Inline::Octave.
>
> Now for what to do exactly, this heavily depends on what your input
> and your goals are. To get help with this, maybe asking in a group
> about audio processing or algorithms would be better.
>
> Good luck
>
> Christian
>
> --
> rc at networkz dot ch


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
 
Reply With Quote
 
kieran
Guest
Posts: n/a
 
      11-11-2008
On Oct 22, 3:58 pm, kieran <(E-Mail Removed)> wrote:
> On Oct 16, 9:56 pm, rc <(E-Mail Removed)> wrote:
>
>
>
> > On Oct 8, 4:39 pm, kieran <(E-Mail Removed)> wrote:

>
> > > Hello,
> > > I am trying to compare two similar audio files (WAV). From what i have
> > > read i need tosampleboth 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.

>
> > While this can certainly be done in Perl, a nice environment for
> > prototyping this kind of applications is GNU Octave or Matlab (given
> > you are rich or a student). Reading some files from wav,down/
> > upsampling them, applying filters and perform an fft is just a few
> > lines of code in both of these tools.

>
> > Once you have a working solution, you can still collect all modules
> > you need to do it in Perl from CPAN or just continue to use Octave via
> > Inline::Octave.

>
> > Now for what to do exactly, this heavily depends on what your input
> > and your goals are. To get help with this, maybe asking in a group
> > about audio processing or algorithms would be better.

>
> > Good luck

>
> > Christian

>
> > --
> > rc at networkz dot ch

>
> 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


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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing files in a zip to files on drive kj7ny Python 2 12-29-2006 03:45 AM
cannot playback audio strem, audio not available or hardware not responding chieyenne Computer Support 2 05-19-2005 07:01 PM
Any way to take the audio from a concert DVD to make audio files? NOT TO BE USED FOR PIRACY. Ant DVD Video 8 06-24-2004 05:52 AM
Comparing audio (wav) files aten C++ 4 10-04-2003 08:34 PM
Comparing audio (wav) files aten Java 1 10-04-2003 08:18 PM



Advertisments