Skip to content

Python 3.13 Compatibility: aifc and sunau modules removal affects librosa dependency #2

@osteele

Description

@osteele

Issue Description

Python 3.13 removes the aifc and sunau modules that librosa depends on through audioread. This causes the application to fail with errors like the one reported in issue #1 (ModuleNotFoundError: No module named 'audioop').

Related Issues

Current Status

The pyproject.toml file already includes a Python version constraint (requires-python = ">=3.11,<3.13") to prevent installation on Python 3.13+, but we should develop a more forward-compatible solution.

Proposed Strategies

  1. Wait for upstream fix: Monitor the audioread/librosa projects for updates that address Python 3.13 compatibility.

  2. Fork and patch: Create a temporary fork of audioread with patches to work around the missing modules until the upstream is fixed.

  3. Alternative audio processing: Investigate alternative libraries that don't rely on the removed modules:

  4. Conditional imports: Modify the code to conditionally use different audio processing libraries based on the Python version.

Next Steps

I suggest investigating option 3 first, as we already have pydub and soundfile as dependencies. We could potentially refactor our audio processing code to use these libraries directly instead of relying on librosa for the affected functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions