DSPRelated.com
Forums

fourier analysis/MP3 to WAV format conversion

Started by Unknown April 14, 2007
 hi,
~
 I need to do fourier analysis on speech files.
~
 is it possible to do it right from MP3 files?
~
 if not, is it possible to do convert MP3 files to WAV ones?
~
 Thanks
 lbrtchx

On 14 Apr, 08:28, lbrt...@hotmail.com wrote:
> hi, > ~ > I need to do fourier analysis on speech files. > ~ > is it possible to do it right from MP3 files? > ~ > if not, is it possible to do convert MP3 files to WAV ones? > ~
Neither speech processing or MP3 is something I am very familiar with, but you would need to decode MP3 files to a wave-like format befoe continuing. The next question is what you want to achieve by analyzing these speech signals. The MP3 format does, as far as I know, extract certain features in the audio signal, while throwing away a lot of other stuff. So if you go on analyzing data extracted from MP3 files, you might end up discussing features of the MP3 format and not speech. Rune
lbrtchx wrote...
> I need to do fourier analysis on speech files. > ~ > is it possible to do it right from MP3 files? > ~ > if not, is it possible to do convert MP3 files to WAV ones?
Have a look at Wavesurfer from www.speech.kth.se/wavesurfer it's a sound analysis package that can open a range of filetypes - including wav and mp3. You can also download the Snack sound toolkit with which Wavesurfer was developed from the same site: www.speech.kth.se/snack. An excellent free sound file format converter is Switch from NCH Swift Sound www.nch.com.au/switch. Go for the basic download - the Plus version has more features but is a time-limited demo. HTH David
Hello ibrtchx,

> I need to do fourier analysis on speech files. > ~ > is it possible to do it right from MP3 files? > ~ > if not, is it possible to do convert MP3 files to WAV ones?
I am not sure why you need the analysis, but I have to warn you about how mp3 got compressed. audio is first converted with DCT (which is similar to a fourier, but without the complex numbers) into the frequency domain. Then they remove all the frequencies that you are not supposed to hear, like a frequency with a low amplitude right next to a frequency with a high amplitude. As there are now a lot of zeros in the frequency domain they use run-length-counting to compress and than encode the result with something huffman. The kicker for you is when they started removing the frequencies. Which means you will not get an accurate fourier of the voice. Cheers, Take
"Take Vos" <Take.Vos@vosgames.nl> wrote in message 
news:1176535717.790344.271430@p77g2000hsh.googlegroups.com...
> Hello ibrtchx, > >> I need to do fourier analysis on speech files. >> ~ >> is it possible to do it right from MP3 files? >> ~ >> if not, is it possible to do convert MP3 files to WAV ones? > > I am not sure why you need the analysis, but I have to warn you about > how mp3 got compressed. > audio is first converted with DCT (which is similar to a fourier, but > without the complex numbers) into the frequency domain. Then they > remove all the frequencies that you are not supposed to hear, like a > frequency with a low amplitude right next to a frequency with a high > amplitude. As there are now a lot of zeros in the frequency domain > they use run-length-counting to compress and than encode the result > with something huffman. > > The kicker for you is when they started removing the frequencies. > Which means you will not get an accurate fourier of the voice. > > Cheers, > Take
Interesting info there, but I would be very surprised if your speech data would suffer from first being mp3's. There are many factors involved and you won't get results with empty bins next to peaks for instance. In the old days they had 8KHz 8 bit files for speech analysis and it didn't do them any harm..... possibly. : ) If you're doing the coding then definitely convert to wav first though, it will just make it all simpler. Just search for "mp3 to wav converter" into google and you'll pick a share/freeware package that does batch processing, there's a lot out there... Dave
 <lbrtchx@hotmail.com> wrote:
> hi, >~ > I need to do fourier analysis on speech files.
That's good.
> is it possible to do it right from MP3 files?
No, but it's fascinating to watch the spectra of MP3 files, because you see these huge blocks of missing data. The perceptual encoding system totally screws with the spectrum.
> if not, is it possible to do convert MP3 files to WAV ones?
Sure, but the data is already long gone before then. The MP3 encoding system removes data, and once data is lost, you cannot ever get it back. --scott -- "C'est un Nagra. C'est suisse, et tres, tres precis."
lbrtchx@hotmail.com wrote:
> is it possible to do it right from MP3 files?
Should be possible, but you would have to dig into the specs of the mp3 file format. Converting mp3s to wavs is easy, you can do it very conveniently for many files by using Winamp with the Disc Writer output plugin, which is provided with the standard installation. Boris -- http://www.borislau.de - computer science, music, photos
It is possible to convert MP3 to waves - however - whatever "damage" has 
been done by the MP3 is still there.


<lbrtchx@hotmail.com> wrote in message 
news:1176532085.531344.173200@b75g2000hsg.googlegroups.com...
> hi, > ~ > I need to do fourier analysis on speech files. > ~ > is it possible to do it right from MP3 files? > ~ > if not, is it possible to do convert MP3 files to WAV ones? > ~ > Thanks > lbrtchx >
"news to me" <strawstud@worldnet.att.net> wrote in message 
news:3f4Uh.299380$5j1.279077@bgtnsc04-news.ops.worldnet.att.net...
> It is possible to convert MP3 to waves - however - whatever "damage" has > been done by the MP3 is still there.
But isn't this 'damage' negligable for speech? Looking at the raw maths, mp3's are just all wrong hey, but has anybody here compared formant data retrieved from an mp3 and the original wav? Dave H
> > <lbrtchx@hotmail.com> wrote in message > news:1176532085.531344.173200@b75g2000hsg.googlegroups.com... >> hi, >> ~ >> I need to do fourier analysis on speech files. >> ~ >> is it possible to do it right from MP3 files? >> ~ >> if not, is it possible to do convert MP3 files to WAV ones? >> ~ >> Thanks >> lbrtchx >> > >
<lbrtchx@hotmail.com> wrote ...
> I need to do fourier analysis on speech files. > > is it possible to do it right from MP3 files?
Unlikely. The MP3 must be decoded before you can do Fourier or most any other kind of analysis.
> if not, is it possible to do convert MP3 files to WAV ones?
Sure. But since MP3 is "lossy", you won't recover the original WAV file, and your Fourier analysis may show you more about MP3 than it does about the original speech. If you are really serious about Fourier analysis of speech, recommend strongly avoding MP3 or any other lossy compression.