analyzeAudio 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. analyzeaudio-0.2.0/PKG-INFO +607 -0
  2. analyzeaudio-0.2.0/README.md +556 -0
  3. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/__init__.py +6 -2
  4. analyzeaudio-0.2.0/analyzeAudio/_beDRY.py +24 -0
  5. analyzeaudio-0.2.0/analyzeAudio/analyzersUseFilename.py +2121 -0
  6. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/analyzersUseSpectrogram.py +2 -1
  7. analyzeaudio-0.2.0/analyzeAudio/analyzersUseTensor.py +1287 -0
  8. analyzeaudio-0.2.0/analyzeAudio/analyzersUseTensorSpectrogram.py +189 -0
  9. analyzeaudio-0.2.0/analyzeAudio/audioAspectsRegistry.py +125 -0
  10. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/pythonator.py +11 -12
  11. analyzeaudio-0.2.0/analyzeAudio.egg-info/PKG-INFO +607 -0
  12. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio.egg-info/SOURCES.txt +7 -1
  13. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio.egg-info/requires.txt +8 -2
  14. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/pyproject.toml +9 -10
  15. analyzeaudio-0.2.0/tests/conftest.py +54 -0
  16. analyzeaudio-0.2.0/tests/test_analyzersUseFilename.py +379 -0
  17. analyzeaudio-0.2.0/tests/test_analyzersUseSpectrogram.py +87 -0
  18. analyzeaudio-0.2.0/tests/test_analyzersUseTensor.py +192 -0
  19. analyzeaudio-0.2.0/tests/test_analyzersUseTensorSpectrogram.py +59 -0
  20. analyzeaudio-0.2.0/tests/test_analyzersUseWaveform.py +84 -0
  21. analyzeaudio-0.1.0/PKG-INFO +0 -211
  22. analyzeaudio-0.1.0/README.md +0 -165
  23. analyzeaudio-0.1.0/analyzeAudio/analyzersUseFilename.py +0 -1050
  24. analyzeaudio-0.1.0/analyzeAudio/analyzersUseTensor.py +0 -110
  25. analyzeaudio-0.1.0/analyzeAudio/audioAspectsRegistry.py +0 -60
  26. analyzeaudio-0.1.0/analyzeAudio.egg-info/PKG-INFO +0 -211
  27. analyzeaudio-0.1.0/tests/conftest.py +0 -18
  28. analyzeaudio-0.1.0/tests/test_bs.py +0 -4
  29. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/LICENSE +0 -0
  30. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/_misfit.py +0 -0
  31. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/_theTypes.py +0 -0
  32. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/analyze.py +0 -0
  33. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/analyzersUseWaveform.py +0 -0
  34. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/ffmpeg.py +0 -0
  35. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio/py.typed +0 -0
  36. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio.egg-info/dependency_links.txt +0 -0
  37. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio.egg-info/entry_points.txt +0 -0
  38. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/analyzeAudio.egg-info/top_level.txt +0 -0
  39. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/setup.cfg +0 -0
  40. {analyzeaudio-0.1.0 → analyzeaudio-0.2.0}/tests/__init__.py +0 -0
@@ -0,0 +1,607 @@
1
+ Metadata-Version: 2.4
2
+ Name: analyzeAudio
3
+ Version: 0.2.0
4
+ Summary: Measure one or more aspects of one or more audio files.
5
+ Author-email: Hunter Hogan <HunterHogan@pm.me>
6
+ License-Expression: CC-BY-NC-4.0
7
+ Project-URL: Context7, https://context7.com/hunterhogan/analyzeaudio
8
+ Project-URL: Donate, https://www.patreon.com/integrated
9
+ Project-URL: Download, https://pypi.org/project/analyzeAudio
10
+ Project-URL: Homepage, https://github.com/hunterhogan/analyzeAudio
11
+ Project-URL: Issues, https://github.com/hunterhogan/analyzeAudio/issues
12
+ Project-URL: Repository, https://github.com/hunterhogan/analyzeAudio.git
13
+ Keywords: FFmpeg,FFprobe,LUFS,RMS,SRMR,analysis,audio,audio-analysis,loudness,measurement,metrics,signal-processing,spectral,spectrum,torch,waveform
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: Intended Audience :: Information Technology
19
+ Classifier: Intended Audience :: Other Audience
20
+ Classifier: Intended Audience :: Science/Research
21
+ Classifier: Natural Language :: English
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Programming Language :: Python
24
+ Classifier: Programming Language :: Python :: 3
25
+ Classifier: Programming Language :: Python :: 3.10
26
+ Classifier: Programming Language :: Python :: 3.14
27
+ Classifier: Topic :: Multimedia :: Sound/Audio
28
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
29
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Conversion
30
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
31
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
32
+ Classifier: Typing :: Typed
33
+ Requires-Python: >=3.10
34
+ Description-Content-Type: text/markdown
35
+ License-File: LICENSE
36
+ Requires-Dist: auraloss
37
+ Requires-Dist: librosa
38
+ Requires-Dist: numpy
39
+ Requires-Dist: scipy
40
+ Requires-Dist: torch
41
+ Requires-Dist: torch_l1_snr
42
+ Requires-Dist: torch_log_wmse
43
+ Requires-Dist: torchmetrics[audio]
44
+ Requires-Dist: tqdm
45
+ Provides-Extra: development
46
+ Requires-Dist: pytest-cov; extra == "development"
47
+ Requires-Dist: scipy-stubs; extra == "development"
48
+ Provides-Extra: testing
49
+ Requires-Dist: pytest; extra == "testing"
50
+ Dynamic: license-file
51
+
52
+ # analyzeAudio
53
+
54
+ Measure one or more aspects of one or more audio files.
55
+
56
+ ## Note well: FFmpeg & FFprobe binaries must be in PATH
57
+
58
+ Some options to [download FFmpeg and FFprobe](https://www.ffmpeg.org/download.html) at ffmpeg.org.
59
+
60
+ [![pip install analyzeAudio](https://img.shields.io/badge/pip_install-analyzeAudio-gray.svg?labelColor=blue)](https://pypi.org/project/analyzeAudio/)
61
+ [![uv add analyzeAudio](https://img.shields.io/badge/uv_add-analyzeAudio-gray.svg?labelColor=blue)](https://pypi.org/project/analyzeAudio/)
62
+
63
+ ## Some ways to use this package
64
+
65
+ `analyzeAudio` works at five practical levels: audio path, waveform array, spectrogram array,
66
+ waveform tensor, and magnitude-spectrogram tensor. The top-level API is the quickest way to ask
67
+ for named measurements from audio paths. The lower-level modules are there when you already have
68
+ decoded audio in memory, want the full array or tensor instead of one summary float, or want to
69
+ call direct comparison and loss analyzers yourself.
70
+
71
+ ### Top-level exports you will probably reach for first
72
+
73
+ | Export | Purpose |
74
+ | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
75
+ | `analyzeAudioFile(pathFilename, listAspectNames)` | Analyze one audio path and return one result per requested registered aspect name. |
76
+ | `analyzeAudioListPathFilenames(listPathFilenames, listAspectNames, CPUlimit=None)` | Analyze many audio paths in parallel and return one completed row per audio path. |
77
+ | `getListAvailableAudioAspects()` | Return the sorted list of registered aspect names. |
78
+ | `audioAspects` | Registry of `aspect name -> analyzer callable + required parameter names`. |
79
+ | `truncateTensors(listTensors)` | Trim multiple tensors to the same trailing length before direct comparison. |
80
+ | `dataTabularTOpathFilenameDelimited(...)` | Write batch results to a delimited text file. |
81
+
82
+ The package also re-exports the type aliases `Audio`, `Spectrogram`, `SpectrogramMagnitude`, and
83
+ `SpectrogramPower` so downstream code can annotate the same representations the analyzers expect.
84
+
85
+ ### Choose the module that matches the representation you already have
86
+
87
+ | If you already have... | Reach for... | What you get |
88
+ | ------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------ |
89
+ | one or more audio paths | top-level API or `analyzersUseFilename` | named single-path measurements, paired-path comparisons, FFprobe/FFmpeg-derived arrays, loudness |
90
+ | waveform `numpy.ndarray` + `sampleRate` | `analyzersUseWaveform` | tempogram, RMS, tempo, and zero-crossing arrays or their mean summaries |
91
+ | spectrogram magnitude/power `numpy.ndarray` | `analyzersUseSpectrogram` | chroma and spectral-descriptor arrays or their mean summaries |
92
+ | waveform `torch.Tensor` | `analyzersUseTensor` | SRMR, logWMSE, source-separation scores, and waveform/STFT-domain loss analyzers |
93
+ | magnitude spectrogram `torch.Tensor` | `analyzersUseTensorSpectrogram` | spectrogram-magnitude comparison losses such as spectral convergence and STFT-magnitude distance |
94
+
95
+ The registry spans more than single-path measurements. Some registered names are convenient
96
+ single-audio measurements, some are paired-path comparisons, some expect waveform tensors, and some
97
+ expect magnitude spectrogram tensors.
98
+
99
+ ### Use `analyzeAudioFile` to measure registered single-audio aspects from one path
100
+
101
+ ```python
102
+ from analyzeAudio import analyzeAudioFile
103
+
104
+ listAspectNames = [
105
+ 'LUFS integrated',
106
+ 'RMS peak',
107
+ 'SRMR mean',
108
+ 'Spectral Flatness mean',
109
+ ]
110
+
111
+ listMeasurements = analyzeAudioFile(pathFilename, listAspectNames)
112
+ dictionaryMeasurements = dict(zip(listAspectNames, listMeasurements, strict=True))
113
+ ```
114
+
115
+ `analyzeAudioFile` reads one audio path, prepares shared intermediate representations, and lets
116
+ registered analyzers reuse those representations. Under the hood that means one call can support
117
+ measurements that need the raw waveform, `sampleRate`, a `torch.Tensor` waveform, a complex STFT,
118
+ spectrogram magnitude, or spectrogram power.
119
+
120
+ `analyzeAudioFile` preserves the order of `listAspectNames`. If a requested aspect name is not
121
+ registered, the matching return entry is `'not found'`.
122
+
123
+ Registered names are case-sensitive, and some intentionally similar names come from different
124
+ analysis routes. For example, `Spectral Flatness mean` and `Spectral flatness mean` are different
125
+ registered names, and so are `Zero-crossing rate mean` and `Zero-crossings rate`.
126
+
127
+ Some registered names require inputs that cannot come from a single audio path alone. Examples
128
+ include `SI-SDR mean`, `LogWMSE`, `L1SNRDB`, and `SpectralConvergenceLoss`. For those, inspect the
129
+ registry and call the analyzer directly.
130
+
131
+ ### Use `analyzeAudioListPathFilenames` to batch single-audio measurements across many paths
132
+
133
+ ```python
134
+ from analyzeAudio import analyzeAudioListPathFilenames, dataTabularTOpathFilenameDelimited
135
+
136
+ listAspectNames = ['LUFS integrated', 'Spectral Flatness mean']
137
+ rowsListFilenameAspectValues = analyzeAudioListPathFilenames(listPathFilenames, listAspectNames)
138
+
139
+ dataTabularTOpathFilenameDelimited(
140
+ pathFilenameOutput,
141
+ rowsListFilenameAspectValues,
142
+ ['pathFilename', *listAspectNames],
143
+ )
144
+ ```
145
+
146
+ Each returned row starts with the audio path converted to POSIX text, followed by the requested
147
+ values. The rows are returned in worker-completion order rather than the original input order.
148
+ Use `CPUlimit` when you want to cap the worker count explicitly.
149
+
150
+ ### Use `getListAvailableAudioAspects` and `audioAspects` to inspect the registry or call an analyzer directly
151
+
152
+ ```python
153
+ from analyzeAudio import audioAspects, getListAvailableAudioAspects
154
+
155
+ print(getListAvailableAudioAspects())
156
+ print(audioAspects['Chromagram mean']['analyzerParameters'])
157
+ print(audioAspects['SI-SDR mean']['analyzerParameters'])
158
+ print(audioAspects['LogWMSE']['analyzerParameters'])
159
+
160
+ SI_SDR_channelsMean = audioAspects['SI-SDR mean']['analyzer'](
161
+ pathFilenameAudioFile,
162
+ pathFilenameDifferentAudioFile,
163
+ )
164
+ ```
165
+
166
+ Use `audioAspects[name]['analyzerParameters']` first. It tells you whether the registered name
167
+ expects one audio path, two audio paths, waveform tensors, a reference-estimate-mixture triple, or
168
+ spectrogram magnitudes.
169
+
170
+ That is the quickest way to discover whether a name is meant for the high-level single-audio API or
171
+ for direct invocation.
172
+
173
+ ### Use the lower-level modules when you want the actual analyzer instead of one registry float
174
+
175
+ These are the actual analyzers, organized by the representation they consume.
176
+
177
+ - `analyzeAudio.analyzersUseFilename`
178
+ - paired-path comparison metrics: `getPSNRmean`, `getSDRmean`, `getSI_SDRmean`
179
+ - framewise spectral arrays with matching mean wrappers: `analyzeSpectralCentroid`,
180
+ `analyzeSpectralCrest`, `analyzeSpectralDecrease`, `analyzeSpectralEntropy`,
181
+ `analyzeSpectralFlatness`, `analyzeSpectralFlux`, `analyzeSpectralKurtosis`,
182
+ `analyzeSpectralMean`, `analyzeSpectralRolloff`, `analyzeSpectralSkewness`,
183
+ `analyzeSpectralSlope`, `analyzeSpectralSpread`, `analyzeSpectralVariance`
184
+ - file-level FFprobe `astats` scalars: `analyzeZero_crossings`, `analyzeZero_crossings_rate`,
185
+ `analyzeDCoffset`, `analyzeDynamicRange`, `analyzeSignalEntropy`, `analyzeNumber_of_samples`,
186
+ `analyzePeak_level`, `analyzeRMS_level`, `analyzeCrest_factor`, `analyzeRMS_peak`,
187
+ `analyzeAbs_Peak_count`, `analyzeBit_depth`, `analyzeFlat_factor`, `analyzeMax_difference`,
188
+ `analyzeMax_level`, `analyzeMean_difference`, `analyzeMin_difference`, `analyzeMin_level`,
189
+ `analyzeNoise_floor`, `analyzeNoise_floor_count`, `analyzePeak_count`,
190
+ `analyzeRMS_difference`, `analyzeRMS_trough`
191
+ - loudness and true-peak arrays plus scalar summaries: `analyzeTruePeak`,
192
+ `analyzeLUFSMomentary`, `analyzeLUFSShortTerm`, `analyzeLUFSIntegrated`, `analyzeLRA`,
193
+ `analyzeLUFSlow`, `analyzeLUFShigh`, plus the matching `...Overall` scalar functions
194
+ - `analyzeAudio.analyzersUseWaveform`
195
+ - raw arrays: `analyzeTempogram`, `analyzeRMS`, `analyzeTempo`, `analyzeZeroCrossingRate`
196
+ - mean summaries: `analyzeTempogramMean`, `analyzeRMSMean`, `analyzeTempoMean`,
197
+ `analyzeZeroCrossingRateMean`
198
+ - `analyzeAudio.analyzersUseSpectrogram`
199
+ - raw arrays: `analyzeChromagram`, `analyzeSpectralContrast`, `analyzeSpectralBandwidth`,
200
+ `analyzeSpectralCentroid`, `analyzeSpectralFlatness`
201
+ - mean summaries: `analyzeChromagramMean`, `analyzeSpectralContrastMean`,
202
+ `analyzeSpectralBandwidthMean`, `analyzeSpectralCentroidMean`,
203
+ `analyzeSpectralFlatnessMean`
204
+ - `analyzeAudio.analyzersUseTensor`
205
+ - reverberation and intelligibility: `analyzeSRMR`, `analyzeSRMRMean`
206
+ - reference-estimate-mixture scoring: `analyzeLogWMSEMean`
207
+ - source-separation scores: `analyzeL1SNRMean`, `analyzeL1SNRDBMean`,
208
+ `analyzeMultiL1SNRDBMean`, `analyzeSTFTL1SNRDBMean`
209
+ - waveform-domain and STFT-domain loss analyzers: `analyzeDCLoss`, `analyzeESRLoss`,
210
+ `analyzeLogCoshLoss`, `analyzeSNRLoss`, `analyzeSISDRLoss`, `analyzeSDSDRLoss`,
211
+ `analyzeSTFTLoss`, `analyzeMelSTFTLoss`, `analyzeChromaSTFTLoss`,
212
+ `analyzeMultiResolutionSTFTLoss`, `analyzeRandomResolutionSTFTLoss`,
213
+ `analyzeSumAndDifferenceSTFTLoss`
214
+ - `analyzeAudio.analyzersUseTensorSpectrogram`
215
+ - magnitude-spectrogram comparison analyzers: `analyzeSpectralConvergenceLoss`,
216
+ `analyzeSTFTMagnitudeLoss`, `analyzeL1FrequencyLoss`
217
+ - `analyzeAudio.ffmpeg`
218
+ - environment check for Colab-style sessions: `verifyFFmpegColab`
219
+
220
+ Several concept names exist in more than one module. That is intentional. For example,
221
+ `Spectral flatness mean` comes from the filename-based FFprobe route, while `Spectral Flatness mean`
222
+ comes from the spectrogram route. Similar names do not necessarily mean duplicate implementations.
223
+
224
+ ```python
225
+ import numpy
226
+ import soundfile
227
+
228
+ from analyzeAudio.analyzersUseWaveform import analyzeTempogram
229
+
230
+ with soundfile.SoundFile(pathFilename) as readSoundFile:
231
+ sampleRate = readSoundFile.samplerate
232
+ waveform = readSoundFile.read(dtype='float32').astype(numpy.float32).T
233
+
234
+ tempogram = analyzeTempogram(waveform, sampleRate)
235
+ ```
236
+
237
+ ```python
238
+ from analyzeAudio.analyzersUseTensor import analyzeL1SNRDBMean
239
+ from analyzeAudio.analyzersUseTensorSpectrogram import analyzeSpectralConvergenceLoss
240
+
241
+ valueScore = analyzeL1SNRDBMean(tensorAudioReference, tensorAudioEstimate)
242
+ valueLoss = analyzeSpectralConvergenceLoss(tensorMagnitudeReference, tensorMagnitudeEstimate)
243
+ ```
244
+
245
+ ### Use `truncateTensors` when you want the aligned tensors yourself
246
+
247
+ Most tensor comparison analyzers already trim inputs internally. `truncateTensors` is there for the
248
+ times when you want the aligned tensors yourself before reusing them across several metrics.
249
+
250
+ ```python
251
+ from analyzeAudio import truncateTensors
252
+
253
+ tensorAudioReference, tensorAudioEstimate = truncateTensors([
254
+ tensorAudioReference,
255
+ tensorAudioEstimate,
256
+ ])
257
+ ```
258
+
259
+ ### Use `whatMeasurements` to list registered measurements from the command line
260
+
261
+ ```sh
262
+ whatMeasurements
263
+ ```
264
+
265
+ This prints the same sorted registry names returned by `getListAvailableAudioAspects()`.
266
+
267
+ ## Reference materials
268
+
269
+ ### A Spectral-Flatness Measure for Studying the Autocorrelation Method of Linear Prediction of Speech Analysis
270
+
271
+ - Common name: spectral flatness
272
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/gray1974spectralflatness.bib)
273
+ - DOI: [10.1109/TASSP.1974.1162572](https://doi.org/10.1109/TASSP.1974.1162572)
274
+ - IEEE Xplore: [document 1162647](https://ieeexplore.ieee.org/document/1162647)
275
+ - Implementation:
276
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.spectral_flatness
277
+
278
+ ### Perceptual Effects of Spectral Modifications on Musical Timbres
279
+
280
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/grey1978perceptual.bib)
281
+ - DOI: [10.1121/1.381843](https://doi.org/10.1121/1.381843)
282
+
283
+ ### Robust Entropy-Based Endpoint Detection for Speech Recognition in Noisy Environments
284
+
285
+ - Common name: spectral entropy
286
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/shen1998entropy.bib)
287
+ - DOI: [10.21437/ICSLP.1998-527](https://doi.org/10.21437/ICSLP.1998-527)
288
+ - Proceedings: [ISCA Archive](https://www.isca-archive.org/icslp_1998/shen98b_icslp.html)
289
+ - Free author PDF: [Columbia University](https://www.ee.columbia.edu/~dpwe/papers/ShenHL98-endpoint.pdf)
290
+
291
+ ### Realtime Chord Recognition of Musical Sound: A System Using Common Lisp Music
292
+
293
+ - Common name: chroma features
294
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/fujishima1999realtime.bib)
295
+ - Proceedings: [University of Michigan ICMC archive](https://quod.lib.umich.edu/i/icmc/bbp2372.1999.446)
296
+ - CCRMA HTML copy: [Stanford CCRMA](https://ccrma.stanford.edu/~jos/mus423h/Real_Time_Chord_Recognition_Musical.html)
297
+ - Implementation:
298
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.chroma_stft
299
+
300
+ ### A Robust Audio Classification and Segmentation Method
301
+
302
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/lu2001robust.bib)
303
+ - Technical report: [Microsoft Research](https://www.microsoft.com/en-us/research/publication/a-robust-audio-classification-and-segmentation-method/)
304
+ - Free PDF: [Microsoft Research](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2001-79.pdf)
305
+ - Implementations:
306
+ - [FFprobe `astats` filter](https://ffmpeg.org/ffprobe-all.html#astats)
307
+ - [C file with implementation details for AI agents.](https://www.ffmpeg.org/doxygen/8.0/af__astats_8c_source.html)
308
+ - [FFprobe `aspectralstats` filter](https://ffmpeg.org/ffprobe-all.html#aspectralstats)
309
+ - [C file reference with implementation functions for AI agents.](https://www.ffmpeg.org/doxygen/8.0/af__aspectralstats_8c.html)
310
+ - [librosa/librosa](https://github.com/librosa/librosa)
311
+
312
+ ### Music Type Classification by Spectral Contrast Feature
313
+
314
+ - Common name: spectral contrast
315
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/jiang2002spectralcontrast.bib)
316
+ - DOI: [10.1109/ICME.2002.1035731](https://doi.org/10.1109/ICME.2002.1035731)
317
+ - Free PDF: [Tsinghua University](https://hcsi.cs.tsinghua.edu.cn/Paper/Paper02/200218.pdf)
318
+ - Implementation:
319
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.spectral_contrast
320
+
321
+ ### A Speech/Music Discriminator Based on RMS and Zero-Crossings
322
+
323
+ - Common names: RMS, zero-crossing rate
324
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/panagiotakis2005speechmusic.bib)
325
+ - DOI: [10.1109/TMM.2004.840604](https://doi.org/10.1109/TMM.2004.840604)
326
+ - Free author proof: [University of Crete](https://www.csd.uoc.gr/~tziritas/papers/07tmm01-panagiotakis-proof.pdf)
327
+ - Implementation:
328
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.rms
329
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.zero_crossing_rate
330
+
331
+ ### Zero-Crossing Rate
332
+
333
+ - Common name: zero-crossing rate
334
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/backstrom2026zerocrossingrate.bib)
335
+ - Online chapter: [Introduction to Speech Processing](https://speechprocessingbook.aalto.fi/Representations/Zero-crossing_rate.html)
336
+ - Implementation:
337
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.zero_crossing_rate
338
+
339
+ ### Performance Measurement in Blind Audio Source Separation
340
+
341
+ - Common name: BSS Eval SDR
342
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/vincent2006performance.bib)
343
+ - DOI: [10.1109/TSA.2005.858005](https://doi.org/10.1109/TSA.2005.858005)
344
+ - Free author PDF: [IRISA](https://www.irit.fr/~Cedric.Fevotte/publications/journals/ieee_asl_bsseval.pdf)
345
+ - Implementations:
346
+ - [sigsep/sigsep-mus-eval](https://github.com/sigsep/sigsep-mus-eval)
347
+ - [mir-evaluation/mir_eval](https://github.com/mir-evaluation/mir_eval)
348
+ - [FFprobe `asdr` filter](https://ffmpeg.org/ffprobe-all.html#asdr)
349
+ - [C source with implementation formulas for AI agents.](https://www.ffmpeg.org/doxygen/8.0/af__asdr_8c_source.html)
350
+
351
+ ### Automatic Chord Recognition from Audio Using a HMM with Supervised Learning
352
+
353
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/lee2006automaticchord.bib)
354
+ - Proceedings: [ISMIR 2006](https://ismir.net/conferences/ismir-2006/)
355
+ - Free PDF: [Stanford CCRMA](https://ccrma.stanford.edu/~kglee/pubs/klee-ismir06.pdf)
356
+ - Implementation:
357
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.chroma_stft
358
+
359
+ ### Cyclic Tempogram: A Mid-Level Tempo Representation for Music Signals
360
+
361
+ - Common name: tempogram
362
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/grosche2010cyclic.bib)
363
+ - DOI: [10.1109/ICASSP.2010.5495219](https://doi.org/10.1109/ICASSP.2010.5495219)
364
+ - Free author PDF: [AudioLabs Erlangen](https://www.audiolabs-erlangen.de/content/resources/MIR/tempogramtoolbox/2010_GroscheMuellerKurth_TempogramCyclic_ICASSP.pdf)
365
+ - Implementations:
366
+ - [librosa/librosa](https://github.com/librosa/librosa).feature.tempogram
367
+ - [Vamp Tempogram Plugin](https://code.soundsoftware.ac.uk/projects/tempogram)
368
+
369
+ ### A Non-Intrusive Quality and Intelligibility Measure of Reverberant and Dereverberated Speech
370
+
371
+ - Common name: SRMR
372
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/falk2010srmr.bib)
373
+ - DOI: [10.1109/TASL.2010.2052247](https://doi.org/10.1109/TASL.2010.2052247)
374
+ - Free author PDF: [MUSEA Lab](https://musaelab.ca/pdfs/J19.pdf)
375
+ - Implementation:
376
+ - [Lightning-AI/torchmetrics](https://github.com/Lightning-AI/torchmetrics)
377
+ - [SRMR official documentation.](https://lightning.ai/docs/torchmetrics/stable/audio/speech_reverberation_modulation_energy_ratio.html)
378
+ - [Python source with implementation details for AI agents.](https://github.com/Lightning-AI/torchmetrics/blob/master/src/torchmetrics/functional/audio/srmr.py)
379
+
380
+ ### Signal Processing for Music Analysis
381
+
382
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/muller2011signal.bib)
383
+ - DOI: [10.1109/JSTSP.2011.2112333](https://doi.org/10.1109/JSTSP.2011.2112333)
384
+ - Free author PDF: [Columbia University](https://www.ee.columbia.edu/~dpwe/pubs/MuEKR11-spmus.pdf)
385
+ - Implementation:
386
+ - [librosa/librosa](https://github.com/librosa/librosa)
387
+
388
+ ### The Timbre Toolbox: Extracting Audio Descriptors from Musical Signals
389
+
390
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/peeters2011timbre.bib)
391
+ - DOI: [10.1121/1.3642604](https://doi.org/10.1121/1.3642604)
392
+ - Free PDF: [McGill University](https://www.mcgill.ca/mpcl/files/mpcl/peeters_2011_jasa.pdf)
393
+ - Implementations:
394
+ - [MPCL-McGill/TimbreToolbox-R2021a](https://github.com/MPCL-McGill/TimbreToolbox-R2021a)
395
+ - [librosa/librosa](https://github.com/librosa/librosa)
396
+
397
+ ### Blind Audio Watermarking Technique Based on Two Dimensional Cellular Automata
398
+
399
+ - Common name: APSNR reference
400
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/hiary2016blind.bib)
401
+ - DOI: [10.14257/ijsia.2016.10.9.18](https://doi.org/10.14257/ijsia.2016.10.9.18)
402
+ - Free repository copy: [Universidad Autonoma de Madrid](https://repositorio.uam.es/handle/10486/676356)
403
+ - Implementation:
404
+ - [FFprobe `apsnr` filter](https://ffmpeg.org/ffprobe-all.html#apsnr)
405
+ - [C source with implementation formulas for AI agents.](https://www.ffmpeg.org/doxygen/8.0/af__asdr_8c_source.html)
406
+
407
+ ### SDR - Half-Baked or Well Done?
408
+
409
+ - Common name: SI-SDR
410
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/leroux2019sdr.bib) [TeX Source with precise formulas for AI agents.](https://arxiv.org/src/1811.02508)
411
+ - DOI: [10.1109/ICASSP.2019.8683855](https://doi.org/10.1109/ICASSP.2019.8683855)
412
+ - Free author PDF: [Jonathan Le Roux](https://www.jonathanleroux.org/pdf/LeRoux2019ICASSP05sdr.pdf)
413
+ - Implementations:
414
+ - [Lightning-AI/torchmetrics](https://github.com/Lightning-AI/torchmetrics)
415
+ - [FFprobe `asisdr` filter](https://ffmpeg.org/ffprobe-all.html#asisdr)
416
+
417
+ ### Loudness Metering: EBU Mode Metering to Supplement Loudness Normalisation
418
+
419
+ - Common name: momentary LUFS
420
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/ebu2023tech3341.bib)
421
+ - Standard: [EBU Tech 3341](https://tech.ebu.ch/publications/tech3341)
422
+ - Free PDF: [EBU](https://tech.ebu.ch/docs/tech/tech3341.pdf)
423
+ - Implementation:
424
+ - [FFprobe `ebur128` filter](https://ffmpeg.org/ffprobe-all.html#ebur128)
425
+ - [C source with implementation details for AI agents.](https://ffmpeg.org/doxygen/8.0/f__ebur128_8c_source.html)
426
+ - [C source with loudness calculations for AI agents.](https://www.ffmpeg.org/doxygen/8.0/ebur128_8c_source.html)
427
+
428
+ ### Loudness Range: A Measure to Supplement EBU R 128 Loudness Normalisation
429
+
430
+ - Common name: LUFS
431
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/ebu2023tech3342.bib)
432
+ - Standard: [EBU Tech 3342](https://tech.ebu.ch/publications/tech3342)
433
+ - Free PDF: [EBU](https://tech.ebu.ch/docs/tech/tech3342.pdf)
434
+ - Implementation:
435
+ - [FFprobe `ebur128` filter](https://ffmpeg.org/ffprobe-all.html#ebur128)
436
+ - [C source with implementation details for AI agents.](https://ffmpeg.org/doxygen/8.0/f__ebur128_8c_source.html)
437
+ - [C source with loudness calculations for AI agents.](https://www.ffmpeg.org/doxygen/8.0/ebur128_8c_source.html)
438
+
439
+ ### Algorithms to Measure Audio Programme Loudness and True-Peak Audio Level
440
+
441
+ - Common name: True peak
442
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/itu2023bs1770.bib)
443
+ - Standard: [ITU-R BS.1770-5](https://www.itu.int/rec/R-REC-BS.1770-5-202311-I)
444
+ - Free PDF: [ITU](https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.1770-5-202311-I!!PDF-E.pdf)
445
+ - Implementation:
446
+ - [FFprobe `ebur128` filter](https://ffmpeg.org/ffprobe-all.html#ebur128)
447
+ - [C source with implementation details for AI agents.](https://ffmpeg.org/doxygen/8.0/f__ebur128_8c_source.html)
448
+ - [C source with loudness calculations for AI agents.](https://www.ffmpeg.org/doxygen/8.0/ebur128_8c_source.html)
449
+
450
+ ### An Overview on Sound Features in Time and Frequency Domain
451
+
452
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/constantinescu2023overview.bib)
453
+ - DOI: [10.2478/ijasitels-2023-0006](https://doi.org/10.2478/ijasitels-2023-0006)
454
+ - Open access article: [Reference Global](https://reference-global.com/fr/article/10.2478/ijasitels-2023-0006)
455
+ - PDF: [Reference Global](https://reference-global.com/download/article/10.2478/ijasitels-2023-0006.pdf)
456
+
457
+ ### Perceptual Loss Function for Neural Modelling of Audio Systems
458
+
459
+ - Common names: ESR loss, DC loss
460
+ - Used by: `analyzeESRLoss`, `analyzeDCLoss`
461
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/wright2019perceptualloss.bib)
462
+ - arXiv abstract: [1911.08922](https://arxiv.org/abs/1911.08922)
463
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/1911.08922)
464
+ - PDF: [arXiv PDF](https://arxiv.org/pdf/1911.08922)
465
+
466
+ ### Log Hyperbolic Cosine Loss Improves Variational Auto-Encoder
467
+
468
+ - Common name: log-cosh loss
469
+ - Used by: `analyzeLogCoshLoss`
470
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/chen2019logcosh.bib)
471
+ - OpenReview page: [rkglvsC9Ym](https://openreview.net/forum?id=rkglvsC9Ym)
472
+ - PDF: [OpenReview PDF](https://openreview.net/pdf?id=rkglvsC9Ym)
473
+
474
+ ### logWMSE Audio Quality Metric and PyTorch Loss Implementation
475
+
476
+ - Common name: logWMSE
477
+ - Used by: `analyzeLogWMSEMean`
478
+ - Original implementation:
479
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/jordal2026logwmse.bib)
480
+ - [nomonosound/log-wmse-audio-quality](https://github.com/nomonosound/log-wmse-audio-quality)
481
+ - PyTorch implementation:
482
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/landschoot2026torchlogwmse.bib)
483
+ - [crlandsc/torch-log-wmse](https://github.com/crlandsc/torch-log-wmse)
484
+
485
+ ### Fast Spectrogram Inversion using Multi-head Convolutional Neural Networks
486
+
487
+ - Common names: spectral convergence, STFT magnitude loss terms
488
+ - Used by: `analyzeSpectralConvergenceLoss`, `analyzeSTFTMagnitudeLoss`, `analyzeSTFTLoss`
489
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/arik2018fastspectrogram.bib)
490
+ - DOI: [10.48550/arXiv.1808.06719](https://doi.org/10.48550/arXiv.1808.06719)
491
+ - arXiv abstract: [1808.06719](https://arxiv.org/abs/1808.06719)
492
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/1808.06719)
493
+
494
+ ### Probability density distillation with generative adversarial networks for high-quality parallel waveform generation
495
+
496
+ - Used by: `analyzeSTFTLoss`
497
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/yamamoto2019pdd.bib)
498
+ - DOI: [10.48550/arXiv.1904.04472](https://doi.org/10.48550/arXiv.1904.04472)
499
+ - arXiv abstract: [1904.04472](https://arxiv.org/abs/1904.04472)
500
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/1904.04472)
501
+
502
+ ### Parallel WaveGAN: A fast waveform generation model based on generative adversarial networks with multi-resolution spectrogram
503
+
504
+ - Common name: multi-resolution STFT
505
+ - Used by: `analyzeMultiResolutionSTFTLoss`
506
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/yamamoto2019parallelwavegan.bib)
507
+ - DOI: [10.48550/arXiv.1910.11480](https://doi.org/10.48550/arXiv.1910.11480)
508
+ - arXiv abstract: [1910.11480](https://arxiv.org/abs/1910.11480)
509
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/1910.11480)
510
+
511
+ ### auraloss: Audio focused loss functions in PyTorch
512
+
513
+ - Common names: random-resolution STFT loss implementation source
514
+ - Used by: `analyzeRandomResolutionSTFTLoss`
515
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/steinmetz2020auraloss.bib)
516
+ - Workshop paper PDF: [DMRN+15 PDF](https://www.christiansteinmetz.com/s/DMRN15__auraloss__Audio_focused_loss_functions_in_PyTorch.pdf)
517
+ - Source:
518
+ - [BibTeX citation for the source repository.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/steinmetz2020auralosssoftware.bib)
519
+ - [csteinmetz1/auraloss](https://github.com/csteinmetz1/auraloss)
520
+
521
+ ### Automatic multitrack mixing with a differentiable mixing console of neural audio effects
522
+
523
+ - Common names: sum-and-difference STFT loss in neural mixing
524
+ - Used by: `analyzeSumAndDifferenceSTFTLoss`
525
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/steinmetz2020multitrackmixing.bib)
526
+ - DOI: [10.48550/arXiv.2010.10291](https://doi.org/10.48550/arXiv.2010.10291)
527
+ - arXiv abstract: [2010.10291](https://arxiv.org/abs/2010.10291)
528
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/2010.10291)
529
+
530
+ ### Neural source-filter waveform models for statistical parametric speech synthesis
531
+
532
+ - Related in auraloss docs for multi-resolution spectral training context
533
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/wang2019neuralsourcefilter.bib)
534
+ - DOI: [10.48550/arXiv.1904.12088](https://doi.org/10.48550/arXiv.1904.12088)
535
+ - arXiv abstract: [1904.12088](https://arxiv.org/abs/1904.12088)
536
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/1904.12088)
537
+
538
+ ### DDSP: Differentiable Digital Signal Processing
539
+
540
+ - Related in auraloss docs for STFT-magnitude formulation context
541
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/engel2020ddsp.bib)
542
+ - DOI: [10.48550/arXiv.2001.04643](https://doi.org/10.48550/arXiv.2001.04643)
543
+ - arXiv abstract: [2001.04643](https://arxiv.org/abs/2001.04643)
544
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/2001.04643)
545
+
546
+ ### A Generalized Bandsplit Neural Network for Cinematic Audio Source Separation
547
+
548
+ - Common name: L1SNR reference
549
+ - Used by: `analyzeL1SNRMean`
550
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/watcharasupat2024generalizedbandsplit.bib)
551
+ - DOI: [10.1109/OJSP.2023.3339428](https://doi.org/10.1109/OJSP.2023.3339428)
552
+ - arXiv abstract: [2309.02539](https://arxiv.org/abs/2309.02539)
553
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/2309.02539)
554
+
555
+ ### A Stem-Agnostic Single-Decoder System for Music Source Separation Beyond Four Stems
556
+
557
+ - Common name: L1SNR reference
558
+ - Used by: `analyzeL1SNRMean`, `analyzeL1SNRDBMean`, `analyzeMultiL1SNRDBMean`, `analyzeSTFTL1SNRDBMean`
559
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/watcharasupat2024stemagnostic.bib)
560
+ - DOI: [10.48550/arXiv.2406.18747](https://doi.org/10.48550/arXiv.2406.18747)
561
+ - arXiv abstract: [2406.18747](https://arxiv.org/abs/2406.18747)
562
+ - arXiv HTML used by docstrings: [2406.18747v2](https://arxiv.org/html/2406.18747v2)
563
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/2406.18747)
564
+
565
+ ### Separate This, and All of these Things Around It: Music Source Separation via Hyperellipsoidal Queries
566
+
567
+ - Common name: L1SNRDB reference
568
+ - Used by: `analyzeL1SNRDBMean`, `analyzeMultiL1SNRDBMean`, `analyzeSTFTL1SNRDBMean`
569
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/watcharasupat2025hyperellipsoidal.bib)
570
+ - DOI: [10.48550/arXiv.2501.16171](https://doi.org/10.48550/arXiv.2501.16171)
571
+ - arXiv abstract: [2501.16171](https://arxiv.org/abs/2501.16171)
572
+ - arXiv HTML used by docstrings: [2501.16171v1](https://arxiv.org/html/2501.16171v1)
573
+ - TeX source with formulas for AI agents: [arXiv source](https://arxiv.org/src/2501.16171)
574
+
575
+ ### torch-l1-snr: L1 Signal-to-Noise Ratio Loss Functions for Audio Source Separation in PyTorch
576
+
577
+ - Common name: torch-l1-snr
578
+ - Used by: `analyzeL1SNRMean`, `analyzeL1SNRDBMean`, `analyzeMultiL1SNRDBMean`, `analyzeSTFTL1SNRDBMean`
579
+ - [BibTeX citation.](https://github.com/hunterhogan/analyzeAudio/blob/main/citations/landschoot2026torchl1snr.bib)
580
+ - Source: [crlandsc/torch-l1-snr](https://github.com/crlandsc/torch-l1-snr)
581
+
582
+ ### Packages and documentation
583
+
584
+ - [analyzeAudio](https://github.com/hunterhogan/analyzeAudio)
585
+ - [Context7 reference for AI agents](https://context7.com/hunterhogan/analyzeaudio)
586
+ - [FFmpeg documentation](https://ffmpeg.org/documentation.html)
587
+ - [FFprobe filter documentation](https://ffmpeg.org/ffprobe-all.html#Audio-Filters)
588
+ - [FFmpeg source tree](https://github.com/FFmpeg/FFmpeg)
589
+ - [FFmpeg Doxygen source browser](https://ffmpeg.org/doxygen/8.0/)
590
+ - [librosa/librosa](https://github.com/librosa/librosa)
591
+ - [official documentation](https://librosa.org/doc/latest/index.html)
592
+ - [Context7 documentation](https://context7.com/librosa/librosa)
593
+ - [Lightning-AI/torchmetrics](https://github.com/Lightning-AI/torchmetrics)
594
+ - [official documentation](https://lightning.ai/docs/torchmetrics/stable/)
595
+ - [Context7 documentation](https://context7.com/lightning-ai/torchmetrics)
596
+ - [PyTorch `torch.nn.Module`](https://pytorch.org/docs/stable/generated/torch.nn.Module.html)
597
+ - [Context7 documentation](https://context7.com/pytorch/pytorch)
598
+ - [Python source with implementation details for AI agents.](https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/module.py)
599
+ - [sigsep/sigsep-mus-eval](https://github.com/sigsep/sigsep-mus-eval)
600
+ - [mir-evaluation/mir_eval](https://github.com/mir-evaluation/mir_eval)
601
+
602
+ ## My recovery
603
+
604
+ [![Static Badge](https://img.shields.io/badge/2011_August-Homeless_since-blue?style=flat)](https://HunterThinks.com/support)
605
+ [![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC3Gx7kz61009NbhpRtPP7tw)](https://www.youtube.com/@HunterHogan)
606
+
607
+ [![CC-BY-NC-4.0](https://raw.githubusercontent.com/hunterhogan/analyzeAudio/refs/heads/main/.github/CC-BY-NC-4.0.png)](https://creativecommons.org/licenses/by-nc/4.0/)