Description
During the execution of the Python analysis engine (specifically in tests and CI), several warnings and deprecation messages are emitted that pollute logs and indicate potential future breakages or performance issues.
Root Causes to Investigate & Fix:
librosa/core/spectrum.py: UserWarning: n_fft=1024 is too large for input signal of length=690 and length=345.
- Occurs during chord recognition or pitch tracking when the input audio segment is too short for the default
n_fft size.
- Action: Dynamically adjust
n_fft based on the input signal length to prevent this warning.
audioread/rawread.py: DeprecationWarning: 'aifc', 'audioop', 'sunau' is deprecated and slated for removal in Python 3.13.
- Occurs because
librosa falls back to audioread which uses standard library modules deprecated in Python 3.13.
- Action: Switch to a more modern audio loading backend like
soundfile exclusively, or handle the fallback cleanly so that isn't triggered unnecessarily.
librosa/core/audio.py: FutureWarning: librosa.core.audio.__audioread_load Deprecated as of librosa version 0.10.0.
- Occurs due to
audioread usage.
- Action: Ensure
soundfile handles all supported formats or suppress the fallback warning properly if intentional.
bandscope_analysis/temporal/analyzer.py:42: UserWarning: PySoundFile failed. Trying audioread instead.
- Occurs when testing
test_temporal_analyzer_file_not_found or similar edge cases.
- Action: Fix the test logic or the loading logic to throw a proper
FileNotFoundError or custom error without falling through to audioread.
Definition of Done
All the above warnings and deprecation messages are resolved at their root cause so that pytest runs with zero warnings.
Description
During the execution of the Python analysis engine (specifically in tests and CI), several warnings and deprecation messages are emitted that pollute logs and indicate potential future breakages or performance issues.
Root Causes to Investigate & Fix:
librosa/core/spectrum.py:UserWarning: n_fft=1024 is too large for input signal of length=690andlength=345.n_fftsize.n_fftbased on the input signal length to prevent this warning.audioread/rawread.py:DeprecationWarning: 'aifc', 'audioop', 'sunau' is deprecated and slated for removal in Python 3.13.librosafalls back toaudioreadwhich uses standard library modules deprecated in Python 3.13.soundfileexclusively, or handle the fallback cleanly so that isn't triggered unnecessarily.librosa/core/audio.py:FutureWarning: librosa.core.audio.__audioread_load Deprecated as of librosa version 0.10.0.audioreadusage.soundfilehandles all supported formats or suppress the fallback warning properly if intentional.bandscope_analysis/temporal/analyzer.py:42:UserWarning: PySoundFile failed. Trying audioread instead.test_temporal_analyzer_file_not_foundor similar edge cases.FileNotFoundErroror custom error without falling through toaudioread.Definition of Done
All the above warnings and deprecation messages are resolved at their root cause so that
pytestruns with zero warnings.