<p>I would use a simple python script and the package waveform_analysis if you plan to use standard A, B, or C weighting. A nice example is given here:</p>
<p><a href="https://stackoverflow.com/a/74446976/6591124">https://stackoverflow.com/a/74446976/6591124</a></p>
<p>You can load the audio file into python with librosa, opensoundscape, or even just <code>scipy.io.wavfile.read</code>.</p>
<p>For more subtle equal-loudness curves librosa's <code>perceptual_weighting</code> may be what you need:
<a href="https://librosa.org/doc/0.10.1/generated/librosa.perceptual_weighting.html" rel="nofollow noreferrer">https://librosa.org/doc/0.10.1/generated/librosa.perceptual_weighting.html</a></p>

CC BY-SA 4.0
2024-01-27T23:55:05.203Z
I've by now actually found a solution, albeit a somewhat cumbersome one, using a combination of Audacity macros and Nyquist code running in Audacity. For a stand-alone solution, independent of Audacity, the Python solution may be interesting though, so thank you for your suggestion!
Ulf Elman
CC BY-SA 4.0
2024-01-26T21:50:08.497Z
2024-01-26T21:50:08.497Z
Sam Lapp
<p>A way of assessing the quality of a sound recording in Audacity is to use 'ACX Check' found under Analyze to calculate an SNR value. 'ACX Check' is not intended for batch calculation of SNR for more than one file in a file folder.</p>
<p>A more optimal way of assessing perceived signal quality, the is as perceived by a human listener, is to first apply a weighting curve reflecting the frequency dependent sensitivity of the human ear. As the human ear is significantly less sensitive to the lowest pitched sounds, applying such a weighting a curve to a recording prior to assessing its SNR makes the SNR estimate less prone to being adversely affected to loud low pitched or even infrasonic components in a recording.</p>
<p>The weight curve that best emulates human hearing is the ISO 226 curve. Human hearing responds differently to wide-band noise than to single tone signals, so the weight curve that best emulates human perception of noise is the ITU-R 468 curve. A weighted SNR(226/468) value, where the peak signal is assessed after ISO 226 weighting and the noise is assessed after ITU-R 468 weighting, would be as close to an optimal assessment of perceived acoustic signal quality as is possible, at least as far as I know.</p>
<p>What I most optimally would like is a piece of software that can batch calculate such SNR(226/468) values for several files in a file folder.</p>
<p>An application for such software would be for recordists uploading recordings to a database such as Xeno Canto, where recordings are supposed to be provided by the recordists with an objective assessment of signal quality. See for example <a href="https://xeno-canto.org/article/273" rel="nofollow noreferrer">https://xeno-canto.org/article/273</a> (unweighted) and <a href="https://xeno-canto.org/article/275" rel="nofollow noreferrer">https://xeno-canto.org/article/275</a> (weighted).</p>

CC BY-SA 4.0
2022-12-19T06:54:54.267Z
I would be curious to know why one wanted to modify _animal_ sound with a _human_ weighting function. Human weighting is NOT objective assessment but subjective (i.e. human related)
WMXZ
CC BY-SA 4.0
2022-12-19T21:53:30.637Z
@WMXZ agreed with your point of discussion. @ Ulf does your question specifically require that human weighting function or does it not necessarily depend on the type of weighting function to be applied through a batch process?
selene
CC BY-SA 4.0
2022-12-20T10:34:54.453Z
The end result is intended to be a quantitative value representing sound quality as percived by a human listener. The sound recording is left unchanged by the quality assessment. The filtering process is used only during the quality calculation process.
Ulf Elman
<analysis>
Which software can batch calculate weighted SNR of recordings?
# Which software can batch calculate weighted SNR of recordings?

(Asked by: username_0 on 2022-12-18)

A way of assessing the quality of a sound recording in Audacity is to use 'ACX Check' found under Analyze to calculate an SNR value. 'ACX Check' is not intended for batch calculation of SNR for more than one file in a file folder.

A more optimal way of assessing perceived signal quality, the is as perceived by a human listener, is to first apply a weighting curve reflecting the frequency dependent sensitivity of the human ear. As the human ear is significantly less sensitive to the lowest pitched sounds, applying such a weighting a curve to a recording prior to assessing its SNR makes the SNR estimate less prone to being adversely affected to loud low pitched or even infrasonic components in a recording.

The weight curve that best emulates human hearing is the ISO 226 curve. Human hearing responds differently to wide-band noise than to single tone signals, so the weight curve that best emulates human perception of noise is the ITU-R 468 curve. A weighted SNR(226/468) value, where the peak signal is assessed after ISO 226 weighting and the noise is assessed after ITU-R 468 weighting, would be as close to an optimal assessment of perceived acoustic signal quality as is possible, at least as far as I know.

What I most optimally would like is a piece of software that can batch calculate such SNR(226/468) values for several files in a file folder.

An application for such software would be for recordists uploading recordings to a database such as Xeno Canto, where recordings are supposed to be provided by the recordists with an objective assessment of signal quality. See for example <https://xeno-canto.org/article/273> (unweighted) and <https://xeno-canto.org/article/275> (weighted).

**Tags:** analysis

> **Comments:**
> **username_1**: I would be curious to know why one wanted to modify _animal_ sound with a _human_ weighting function. Human weighting is NOT objective assessment but subjective (i.e. human related)  
> **username_2**: @username_1 agreed with your point of discussion. @ Ulf does your question specifically require that human weighting function or does it not necessarily depend on the type of weighting function to be applied through a batch process?  
> **username_0**: The end result is intended to be a quantitative value representing sound quality as percived by a human listener. The sound recording is left unchanged by the quality assessment. The filtering process is used only during the quality calculation process.  

---

## 1 answers

### Answer by username_3 on 2024-01-26. Score: 1

I would use a simple python script and the package waveform\_analysis if you plan to use standard A, B, or C weighting. A nice example is given here:

<https://stackoverflow.com/a/74446976/6591124>

You can load the audio file into python with librosa, opensoundscape, or even just `scipy.io.wavfile.read`.

For more subtle equal-loudness curves librosa's `perceptual_weighting` may be what you need:
<https://librosa.org/doc/0.10.1/generated/librosa.perceptual_weighting.html>

> **Comments:**
> **username_0**: I've by now actually found a solution, albeit a somewhat cumbersome one, using a combination of Audacity macros and Nyquist code running in Audacity. For a stand-alone solution, independent of Audacity, the Python solution may be interesting though, so thank you for your suggestion!  

---

