osteele / osteele/audio2anki

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

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug compatibility
Dominant language
Python
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The compatibility constraint is in pyproject.toml; start there, then review issue #1 and the linked audioread issue while checking the existing pydub and soundfile dependencies. Done is a chosen, implemented path that lets the application run on Python 3.13 without the removed-module failure, but the issue does not specify which strategy or tests confirm it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.