Analysis of files


I am trying to analyse audio files which were recorded from a hydrophone for my 3rd year project at university. I have added the plug in ‘Wave Stats’ and it is helpful however there is a couple of things I was wondering can Audacity do (or will do). The first, could the mean dB and Hz be calculated from an audio file? and can a spectrogram be plotted and/or edit the default spectrogram (the one with the track) to change its levels / colours etc and add labels so can export it at a later stage?

Any help would be most useful because I think Audacity will solve my problems if I can just find out about these two things.

Thanks in advance,


You can find the Hz from “Analyze > Plot Spectrum”.
This also has an Export feature that allows the numerical data to be exported as a text file.

I thought the ‘Wave Stats’ plug-in already provided the mean dB (RMS) value.

In Audacity 1.3.12 there is a certain amount of customisation of the spectrogram available through:
“Edit menu > Preferences > Spectrograms”
There is currently no way to export the spectrogram data (you may want to post a “feature request” for that here: ) but the image may be exported using the “screenshot tools” in the “Help” menu (Audacity 1.3.12).

Thank you!
Silly me didn’t realise there was the ‘“Edit menu > Preferences > Spectrograms” even though I must have glanced over it 1000 times’. And I overlooked the RMS meaning its the Root mean Square in dB relative to Full scale. The only thing is the RMS is only in dB and I want it in Hz aswell… do you know how this can be changed?

I’m not sure what you mean. dB relates to amplitude and Hz relates to frequency. What exactly is it that you want? Is it the average amplitude at different frequencies? If so, use “Plot Spectrum” and Export the results. The maximum length that "Plot Spectrum can analyse is 237.8 seconds @ 44100 Hz sample rate, but if you need to analyse longer audio, analyse it in sections, then take an average of the results.

If you want to do fancier things regarding signal analysis you may also consider using other matlab-like kind of software.
If you’re looking for a free/open alternative to matlab have a look at Octave:

You can import audio files, such as WAVs and handle it as numerical values and do all sort of mathematical operations on it.

If you’re not familiar with matlab or similar apps or working with vectors/matrices it might have a slow learning curve in the beginning… But I think there are many tutorials available on the web.

Thanks everyone. I have no idea but nothing was making sense and for some reason you guys made it click together… there is one thing I am very unclear about. It the minus sign with the dB. All the literature I have found do not have the minus sign in front of the dB, does this matter? what I mean is can I just delete the minus sign to make it positive and it will still mean the same thing?

I hope I am clear


dB is not a “unit” it is a “ratio”.
dB measurements are always made with reference to some absolute level.
In audio recording, the reference level (0 dB) is taken as the “full scale” amplitude. This is known as 0 dBFS (dB Full Scale). By default this is shown on a track in Audacity as a waveform that reaches the top/bottom of the track. All valid audio signals are less than this, hence the negative sign.

When measuring “sound Pressure Levels” (how “loud” sounds are), the usual reference is a sound pressure level of .0002 microbar, which is about the threshold of human hearing. All audible sounds will be greater than this, hence the positive values, though of course there can be sounds that are too quiet to be audible to humans and these would have negative dB values.

So the important thing about dB measurements is “how much louder or quieter is it than something else”. A rise or fall of 6 dB is approximately equivalent to a doubling or halving of the peak amplitude.

See here for more information:

Ok… I think I got it now. Just looked in my book and it states
SPL (dB re 1uPa)= SPL (dB re 1ubar) + reference pressure. Correct me if I am wrong but to correct my data, I do the value produced by Auadcity + reference pressure which is stated in the audio’s name (example: PWRAveDb**113_**11_26_2010_00_37_07).

I understand the theory behind dB’s, it is just getting my head round how publications have positive values like 117dB for frequencies of 0.16 - 20kHz and all I seem to get is negative values but deleting the (-) gives me same results… I hope that clears up why getting slightly confused here.

removing the (-) doesn’t give the same thing…

-20dB is less than -10dB

On the other hand, +20dB is greater than +10dB

So not exactly the same thing…

There is no direct correlation between dBFS in Audacity and dB (SPL).
When you play a track in Audacity, how “loud” it is (the SPL) does not only depend on the “level” (dBFS) of the track, it also depends on how much your amplifier is turned up, how efficient your speakers are at turning that signal into sound, and how far you are away from the speakers. If the amplifier is turned off the SPL level will be -infinity (silence). If the amplifier is turned up so that the vibrations of the speakers are on the threshold of becoming audible (assuming a totally silent listening environment, then that is about 0 dB. If you then turn the amplifier up louder, the SPL will be +dB.

Where there is a relationship is that for a given amplification setting, with particular speakers and at a set distance from the speakers; for each dB increase in the level in Audacity, there will be an equivalent increase in the SPL (assuming a perfect, linear sound system).