The containment fix (#1143) makes a CLI-shaped dependency's sys.exit survivable; this removes the reason it fired at all. mlx-audio's Kokoro phonemizer (misaki) auto-downloads en_core_web_sm via spacy.cli.download, which shells out to `python -m pip install <url>` — and uv-managed venvs ship no pip, so the download always failed. Why a real dependency instead of installing pip (or the model) ad-hoc at engine load: the updater's drift sync reconciles the venv against the lockfile (#1029/#1030, --inexact), so anything outside the lock is stripped on the next update — the failure would quietly return after every release. pip in pyproject/uv.lock survives sync by construction. Validated against all lock consumers: uv sync --frozen clean; Docker's `uv pip install --system .` reads pyproject; version-lockstep test reads only the version field. Regression test asserts pip is importable in the managed env. Co-authored-by: mergetest <nizam4103@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
mergetest
Claude Opus 4.8
parent
5302170688
commit
db12b94145
@@ -14,6 +14,8 @@ The bundled TTS model package (`pyproject.toml`) is versioned independently.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The MLX-Audio engine's first English generation no longer trips over a missing installer.** Its phonemizer auto-downloads a small language model on first use by shelling out to `pip` — which the app's managed Python environment didn't include, so the download always failed (and before the recent containment fix, took the whole backend down with it, #1133). `pip` now ships as a real dependency of the managed environment, so it survives app updates too — anything installed ad-hoc would have been stripped by the updater's environment sync, quietly re-breaking this after every release. (#1144)
|
||||
|
||||
- **A voice engine's helper library can no longer shut down the whole backend.** One user's backend died 21 seconds after starting (#1133): the MLX-Audio engine's phonemizer tries to auto-download a language model on first use, the downloader is written as a command-line tool, and on failure it calls "exit the program" — which, running inside the backend, exited *the backend*. Any engine dependency written that way could do this. Exits are now contained at the engine-dispatch boundary and turned into a normal, explained error ("an engine dependency failed to auto-install something — see the log"), for TTS and transcription alike. The app keeps running; the failed request tells you what actually happened. (#1143)
|
||||
|
||||
- **Vietnamese years read like Vietnamese again.** A recent release started spelling out numbers before synthesis, and its Vietnamese number library turns out to be wrong for exactly the numbers people say most — years ("2024" became *"hai nghìn lẻ hai mươi bốn"*, which no Vietnamese speaker says). The voice model has always pronounced Vietnamese digits correctly on its own, so Vietnamese text now keeps its digits — the same conservative rule that already protected Vietnamese decimals. Also closes the loophole that made this depend on spelling: picking "Vietnamese" from the language list behaved differently from the code "vi". (#1139)
|
||||
|
||||
@@ -171,6 +171,7 @@ dependencies = [
|
||||
# (services/text_normalization.py). Was already installed transitively;
|
||||
# promoted to a direct dependency because we now import it ourselves.
|
||||
"num2words>=0.5.14",
|
||||
"pip>=26.1.2",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
@@ -248,3 +248,17 @@ def test_transcribe_guard_contains_system_exit():
|
||||
|
||||
with pytest.raises(RuntimeError, match="SystemExit 2"):
|
||||
asyncio.run(run_transcribe_guarded(ex, _asr_code_that_exits, what="ASR"))
|
||||
|
||||
|
||||
def test_managed_venv_ships_pip():
|
||||
"""#1133 root trigger: uv-managed venvs ship no pip, but engine
|
||||
dependencies written as CLIs (spaCy's model downloader, invoked in-process
|
||||
by mlx-audio's phonemizer via misaki) shell out to `python -m pip`. pip is
|
||||
now a real project dependency so it survives the update drift-sync
|
||||
(anything installed ad-hoc would be stripped by `uv sync` on update,
|
||||
resurrecting the crash after every release)."""
|
||||
import importlib.util
|
||||
assert importlib.util.find_spec("pip") is not None, (
|
||||
"pip missing from the managed venv — spaCy-style in-process "
|
||||
"downloaders will fail (and pre-#1143, kill the backend)"
|
||||
)
|
||||
|
||||
@@ -3239,6 +3239,7 @@ dependencies = [
|
||||
{ name = "numpy" },
|
||||
{ name = "openai" },
|
||||
{ name = "pedalboard" },
|
||||
{ name = "pip" },
|
||||
{ name = "posthog" },
|
||||
{ name = "psutil" },
|
||||
{ name = "pyannote-audio" },
|
||||
@@ -3320,6 +3321,7 @@ requires-dist = [
|
||||
{ name = "numpy" },
|
||||
{ name = "openai", specifier = ">=1.40" },
|
||||
{ name = "pedalboard", specifier = ">=0.9.14" },
|
||||
{ name = "pip", specifier = ">=26.1.2" },
|
||||
{ name = "posthog", specifier = ">=3.7" },
|
||||
{ name = "psutil", specifier = ">=7.2.2" },
|
||||
{ name = "pyannote-audio", specifier = ">=3.3.2,<4.0" },
|
||||
@@ -3755,6 +3757,15 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/bc/60/5382c03e1970de634027cee8e1b7d39776b778b81812aaf45b694dfe9e28/pillow-12.2.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:bfa9c230d2fe991bed5318a5f119bd6780cda2915cca595393649fc118ab895e", size = 7080946, upload-time = "2026-04-01T14:46:11.734Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pip"
|
||||
version = "26.1.2"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/01/91/47e7d486260f618783899587af63ccf7980fb60245c3e63dd4571c6b57ad/pip-26.1.2.tar.gz", hash = "sha256:f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605", size = 1840799, upload-time = "2026-05-31T17:33:58.56Z" }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/5d/95/6b5cb3461ea5673ba0995989746db58eb18b91b54dbf331e72f569540946/pip-26.1.2-py3-none-any.whl", hash = "sha256:382ff9f685ee3bc25864f820aa50505825f10f5458ffff07e30a6d96e5715cab", size = 1813144, upload-time = "2026-05-31T17:33:56.772Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "platformdirs"
|
||||
version = "4.9.4"
|
||||
|
||||
Reference in New Issue
Block a user