SpectralAudit
Inspect unusual frequency patterns in music — offline, deterministically, without AI models.
SpectralAudit is an open-source Python library by Eduardo J. Barrios. It measures high-frequency energy, abrupt spectral cutoffs and narrow, periodically spaced peaks that persist across song excerpts. Research links some periodic spectral artifacts to music-generation architectures including ones evaluated on Suno and Udio [1]. SpectralAudit implements independent DSP heuristics, not a published detector or a verified Suno-specific signature.
Not proof of AI origin. A matching pattern does not establish that a song was generated by Suno, Udio or any other model. Instruments, synthesizers, EQ, compression and resampling can produce or obscure similar features. No AI-generation probability is returned.
Install
Python 3.11+:
pip install -U spectralaudit
Quick start
Analyze one WAV or FLAC file and export an HTML and JSON report:
spectralaudit analyze song.wav --html report.html --json report.json
Inspect only the persistent spectral fingerprint (5–16 kHz by default):
spectralaudit fingerprint song.wav --json fingerprint.json
Other available commands:
spectralaudit spectrum song.wav
spectralaudit batch ./songs --json batch.json
Python API:
from spectralaudit import analyze, analyze_fingerprint, load_audio
report = analyze("song.wav")
pattern = report.findings["synthetic_patterns"]
print(pattern["candidate_pattern"])
print(pattern["estimated_spacing_hz"])
print(pattern["persistence_fraction"])
print(pattern["interpretation"])
report.to_html("report.html")
audio = load_audio("song.wav")
custom = analyze_fingerprint(audio.mono, audio.rate, low_hz=5000, high_hz=16000)
What does it measure?
- Band power and cutoff: Welch PSD, high-frequency ratios and possible rolloffs, respecting Nyquist.
- Persistent peak patterns: spectral-envelope residuals, peak frequencies and spacing, autocorrelation in frequency, and support from consecutive time windows.
- Possible alternative causes: limited bandwidth, filtering, clipping, harmonics.
- Auditable output: deterministic JSON and standalone HTML with numerical measurements and limitations. No network connection, LLM, classifier or pretrained model.
candidate_pattern=true means only that the recording satisfies experimental DSP thresholds. It does not certify AI authorship. No real-world Suno-versus-human sensitivity/specificity benchmark has yet been established for SpectralAudit. See methods, limitations, and validation.
Scientific references
These works motivated development. SpectralAudit does not claim to reproduce their detectors or reported accuracy.
- Afchar, D., Meseguer-Brocal, G., Akesbi, K., & Hennequin, R. (2025). A Fourier Explanation of AI-music Artifacts. ISMIR 2025, 739–746. DOI: 10.5281/zenodo.17811475. Architectural periodicity and empirical examples using Suno and Udio.
- Cros Vila, L., Sturm, B. L. T., Casini, L., & Dalmazzo, D. (2025). The AI Music Arms Race: On the Detection of AI-Generated Music. Transactions of the International Society for Music Information Retrieval, 8(1). DOI: 10.5334/tismir.254. Robustness and technical confounders.
- Dugelay, E., Barand, T., Campeas, B., Laouar, A., Afchar, D., & Hennequin, R. (2026). Improved Robustness in AI-Generated Music Detection. arXiv:2607.27454. Spectral sensitivity to speed and pitch transformations.
- Welch, P. D. (1967). The Use of Fast Fourier Transform for the Estimation of Power Spectra. IEEE Transactions on Audio and Electroacoustics, 15(2), 70–73. DOI: 10.1109/TAU.1967.1161901. PSD estimation.
- Harris, F. J. (1978). On the use of windows for harmonic analysis with the discrete Fourier transform. Proceedings of the IEEE, 66(1), 51–83. DOI: 10.1109/PROC.1978.10837. Spectral windows.
Full bibliography, implementation independence and licensing caveats: REFERENCES.md.
Author, citation and license
Copyright © 2026 Eduardo J. Barrios. Licensed under the open-source Apache License 2.0; see NOTICE.
Research users: please cite Eduardo J. Barrios and the exact software version. GitHub provides citation metadata in CITATION.cff; see CITING.md. Academic citation is requested, not an additional Apache-2.0 restriction.
Metadata
Release files for spectralaudit 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spectralaudit-0.2.0.tar.gz | 30.4 kB | With provenance | Details for spectralaudit-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spectralaudit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for spectralaudit-0.2.0-py3-none-any.whl |
Total release size: 52.8 kB
Release files / spectralaudit-0.2.0.tar.gz
| Download URL | spectralaudit-0.2.0.tar.gz |
|---|---|
| Size | 30.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90a0b4c85eead7a47327ad3f0261250dd7464ce27363213d300ea4cecb6f31a7
|
|
BLAKE2b-256 checksum How to use checksums |
762711e41cc0d2534cf6445bdca7704e9da0e9b352d384ad1101941749eedd0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / spectralaudit-0.2.0-py3-none-any.whl
| Download URL | spectralaudit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5870c8d2ba5f6a5aa6f945cfeaba18a5e670af4c0b74ed9d60b01291b09c1bb9
|
|
BLAKE2b-256 checksum How to use checksums |
de8bcbf7fdfad6cdfa40045cece72fde67024df39f8af1cb3bef8e4708435bd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logSecurity for spectralaudit 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for spectralaudit-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.