Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining the best audio quality

How can you determine the best audio quality in a list of audio files of the same audio clip, with out looking at the audio file's header. The tricky part is that all of the files came from different formats and bit rates and they where all transcoded to the same format and bit rate. How can this be done efficiently?

like image 626
rook Avatar asked May 31 '10 19:05

rook


4 Answers

If I understand correctly, you have a bunch of audio files that started in different formats with varying quality. They've all been converted to the same format, so you can't use the header to figure out which ones were originally high quality and which ones weren't.

This is a hard problem. There are potentially a few tricks that could catch some quality problems, but detecting, say, something that was converted from a low-bitrate compression algorithm like MP3 would be very hard.

Some easy tricks:

  • Check the maximum amplitude - if it's low, the quality won't be good.
  • Measure the highest frequency - if it's low, the original might have had a lower sample rate.
like image 195
dmazzoni Avatar answered Oct 13 '22 18:10

dmazzoni


First, I'm not an audio engineer, but I've been trying to keep in touch about audio compression in general because I have a big mp3 collection and I have some thoughts to share about the subject.

Is the best audio quality that you're looking for from an human perspective? If so, you can't measure by "objective means" like comparing spectograms and such.

If a spectogram is ugly, it doesn't necessarily mean the quality is terrible. What matters is if someone can distinguish an encoded file from an original source doing a blind test. Period. If you want to check the quality of an encoded audio track you have to conduct a blind ABX test.

LAME (and all other kinds of lossy MP3, AAC, AC3, DTS, ATRAC... compressors) is so called perceptual coder. It exploits certain facts about the nature of human audio perception. So, you cannot rely simply on spectrograms to evaluate its quality.

Source

Now, if your objectives are from objective manners/perspectives, you could use EAQUAL, which stands for Evaluation Of Audio Quality:

It's an objective measurement technique used to measure the quality of encoded/decoded audio files (very similiar to PEAQ)

(...)

The results, however when using objective testing methodologies are still inconclusive and mostly only used by codec developers and researchers.

...or Friedman statistical analysis tool.

(...) performs several statistical analysis on data sets, which is particularly suited for listening test data.

I'm not saying that spectrum analyzers are useless. That's why I posted some utilities. I'm just saying to be careful with all these statistical methods: as someone at the Hydrogenaudio community said once, You don't listen with your eyes. (check this thread I posted as well, it's a great resource). To really prove audio quality from an human perspective, you should test ears and not graphs.

This is a complicated subject, and IMHO I suggest you to look for a specialized audio community like Hydrogenaudio.

like image 37
GmonC Avatar answered Oct 16 '22 10:10

GmonC


Many of the answers outlined here refer to common audio measurements such as THD+N, SNR, etc. However, these do not always correlate well with human hearing of audio artifacts. Lossy audio compression techniques typically function by increasing THD+N and SNR, but aim to do so in ways that are difficult for the human ear to detect. A more traditional audio measurement technique may find decreased SNR in a certain frequency band, but does that matter if there's so much energy in adjacent bands that no one would ever notice the difference?

The research paper titled "A Perceptual Audio Quality Measure Based on a Psychoacoustic Sound Representation" outlines an algorithm for quantifying the ability of the human ear to detect audible differences, based on a model of how the ear hears. It takes into factors that do correlate with audio quality as perceived by humans. The paper includes a study comparing their algorithm's results to subjective double-blind testing, to give you an idea of how well their model works.

I could not find a free copy of this paper but a decent university library should have it on file.

Implementing the algorithm would require some knowledge of audio signal processing in the frequency domain. An undergraduate with DSP experience should be able to implement it. If you don't have the reference waveform, you could use information in this paper to quantify how objectionable artifacts may be.

The algorithm would work on PCM audio, preferably time-aligned, and certainly does not require knowledge of the file type or header.

like image 13
jbarlow Avatar answered Oct 16 '22 09:10

jbarlow


I'm not a software developer (I'm an audio engineer) and what you hear when you compress with mp3 algorithms is: - less high frequencies: so you can check a loss in the energy of the higher range - distorted stereo: so you can make a Mid/Side matrix, and check for the THD in the Side - less phase coherency: maybe you can check that with a correlation meter

Hope it helps, it's a difficult task for a computer!

like image 9
Luis Herranz Avatar answered Oct 16 '22 11:10

Luis Herranz