Get frequency spectrum from WAV / RIFF using linux command line

How to generate a file, including the frequency spectrum of the wav / riff sound file? I would like to use the linux command line.

I know a cool sox function to create png spectral diagrams

sox sound.wav -n spectrogram

But I do not need a visual representation of the frequency spectrum. I just want to get the frequency spectrum in the data file so that I can work on them. I believe there should be an option using sox. Sox needs to generate this data before its graphics. How to get it?

Not sure, maybe the second solution exports the wav file to a dat file. Each sample from the dat file is a measure of the position of the membrane at a time. So this is not a frequency spectrum.

sox sound.wav file.dat

How to convert these membrane positions to the spectrum that I need?

Thank.

+4
3

, , (FFT). , (.. , , ), WAV , - . Google FFT, , , Linux. . WAV FFT? .

+4

stat sox.

play track.wav stat -freq
+3

What about

sox sound.wav -n stat -freq >& file.dat
0
source

All Articles