fix(backend): pin miniaudio for mlx-audio STT (#505)#506
Conversation
mlx-audio's STT path imports miniaudio, but we install mlx-audio --no-deps to dodge its transformers>=5.x pin. Nothing else pulls miniaudio transitively, so fresh Apple Silicon installs fail to transcribe with ModuleNotFoundError: miniaudio. Listed explicitly and updated the stale comments in requirements-mlx.txt and release.yml that claimed it came from other engines. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR adds the missing Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@backend/requirements-mlx.txt`:
- Around line 19-22: Update the comment text that currently reads "(see
.github/workflows/release.yml)." to use the preferred wording "GitHub workflow"
with a capital H for consistency; locate the comment containing
".github/workflows/release.yml" in backend/requirements-mlx.txt (the block
mentioning mlx-audio runtime deps) and change "github workflow" to "GitHub
workflow".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9b71aeb8-e9ef-4c10-8858-67e829f41672
📒 Files selected for processing (2)
.github/workflows/release.ymlbackend/requirements-mlx.txt
| # (see .github/workflows/release.yml). Most other mlx-audio runtime deps | ||
| # (huggingface_hub, librosa, mlx-lm, numba, numpy, protobuf, pyloudnorm, | ||
| # sounddevice, tqdm) are already in requirements.txt or pulled in by | ||
| # other engines. |
There was a problem hiding this comment.
Minor wording polish in comment block.
At Line 19, consider “GitHub workflow” wording (capital H) for consistency in docs/comments.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~19-~19: The official name of this software platform is spelled with a capital “H”.
Context: ...x-audio==0.4.1` after this file # (see .github/workflows/release.yml). Most other mlx-...
(GITHUB)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@backend/requirements-mlx.txt` around lines 19 - 22, Update the comment text
that currently reads "(see .github/workflows/release.yml)." to use the preferred
wording "GitHub workflow" with a capital H for consistency; locate the comment
containing ".github/workflows/release.yml" in backend/requirements-mlx.txt (the
block mentioning mlx-audio runtime deps) and change "github workflow" to "GitHub
workflow".
Summary
ModuleNotFoundError: miniaudio(miniaudio is missing #505)mlx-audiois installed--no-depsto avoid itstransformers>=5.xpin, so its transitive deps have to be declared elsewhereminiaudio(imported bymlx_audio.stt) was not listed in eitherrequirements.txtorrequirements-mlx.txt— the comments in both files wrongly claimed it came from another enginerequirements-mlx.txt(Apple Silicon only — PyTorch STT uses HFtransformersand doesn't need it) and correct the stale commentsFixes #505
Test plan
mlx_audio.tts) still loads — unchanged path, but same--no-depsinstallrequirements-mlx.txt)🤖 Generated with Claude Code
Note
Low Risk
Low risk: only adjusts Apple-Silicon MLX dependency installation to include a missing runtime package and updates related CI comments; no application logic changes.
Overview
Fixes fresh Apple Silicon installs failing to transcribe by explicitly adding
miniaudio>=1.59tobackend/requirements-mlx.txt(sincemlx-audiois installed with--no-deps).Updates the release workflow comments in
.github/workflows/release.ymlandrequirements-mlx.txtto reflect thatminiaudiois not pulled transitively and must be installed separately formlx_audio.stt.Reviewed by Cursor Bugbot for commit 791c050. Configure here.
Summary by CodeRabbit
Bug Fixes
Chores