There are various definitions of sound quality that could be calculated or displayed including:
- Bit Rate - How high definition the file format is - this is easily extracted from the majority of audio formats but some do use variable bit rate.
- Bit depth - How many distinct sound levels can be represented - if your sounds can only be one of 256 levels then obviously it will tend to be poorer than if it can be 65536 levels, etc., also easily extracted from the majority of audio formats.
- Spectral Width - How wide a range of frequencies are available - this is a function of the bit rate and encoding but just because the file is encoded in a manner that it can have a wide spectrum doesn't necessarily mean that it is present I have seen people using settings for a wide spectral width while (re-)recording from a source that was very narrow bandwidth. - Need to process the recording to determine the actual spectrum using something such as Fourier Transforms.
- Fidelity - How accurate a recording is - this is a function of the above including the history of the file but can only be measured by comparison with the original source and will often include consideration frequencies that are completely inaudible to the majority of people. Very hard to check as you would need the original to compare with the recording and a mechanism that was sure not to introduce errors itself.
- Hiss & Noise - What you often hear when playing an old record on a real record player - some people love it many hate it. Hiss can usually be measured by looking for high frequency noise that is present throughout the recording and is present in otherwise quiet periods. Clicks, Pops, etc., can also be measured by using tools such as Fourier Transforms.
- Background Noise - some recordings contain sounds that were not intended to be recorded - much harder to spot automatically.
- How pleasant the recording is - purely subjective and personal you could possibly train an Neural Net by giving it 1000s of recordings and a rating for each but it would probably have a low accuracy.
There are a number of tools that can perform those parts of audio quality assessment that are quantifiable I would suggest taking a look at Aubio which is a Free & Open Source library with some command line tools which can give you measures of frequency range, noise & hiss levels, etc.
I would also suggest taking a look on https://dsp.stackexchange.com/ for other insights & tools.