Files
VoiceStudio/tests/test_nemo_parakeet_install_hint.py
637020b82b fix(engines): nemo-parakeet install hint stops recommending a shared-venv-breaking pip install (#974) (#991)
The Engines page told users to run `pip install nemo_toolkit[asr]` for
the NeMo Parakeet ASR engine. nemo_toolkit[asr]==2.7.3 hard-pins
transformers>=4.57,<4.58, which is unsatisfiable alongside OmniVoice's
own transformers>=5.3 requirement (needed by
omnivoice/models/omnivoice.py for HiggsAudioV2TokenizerModel). A user
who followed the hint ended up with a backend that wouldn't start
(ImportError: cannot import name 'HiggsAudioV2TokenizerModel').

_INSTALL_HINTS["nemo-parakeet"] in backend/services/asr_backend.py now
states plainly that installing into the shared venv will break the
backend, names the transformers conflict, and tells users to use a
separate/dedicated Python environment instead — without implying a
safe one-line fix or an isolated-venv env var exists (unlike
dots-tts/moss-tts-v15/confucius4-tts, nemo-parakeet has no isolated
venv option yet; that's a separate, larger follow-up).

Also adds one sentence to docs/install/troubleshooting.md's existing
"engine venv clash" section (#11) pointing at the same class of issue
on the ASR side, and a regression test asserting the hint never again
contains the literal bare `pip install nemo_toolkit[asr]` string.

Co-authored-by: mergetest <test@local>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 04:26:12 +05:30

48 lines
1.9 KiB
Python

"""Regression test for issue #974.
The nemo-parakeet install hint used to tell users to run
`pip install nemo_toolkit[asr]` directly into OmniVoice's shared venv.
nemo_toolkit[asr]==2.7.3 hard-pins transformers>=4.57,<4.58, which is
UNSATISFIABLE alongside the app's own transformers>=5.3 requirement (needed
by omnivoice/models/omnivoice.py for HiggsAudioV2TokenizerModel). A user who
followed the old hint ended up with a backend that wouldn't even start
(ImportError: cannot import name 'HiggsAudioV2TokenizerModel').
nemo-parakeet has no isolated-venv option yet (unlike dots-tts /
moss-tts-v15 / confucius4-tts, which do), so the hint must not imply a safe
one-line fix — it must say plainly that installing into the shared venv
will break the backend.
"""
from __future__ import annotations
from services.asr_backend import _INSTALL_HINTS, list_backends
def test_nemo_parakeet_hint_does_not_recommend_shared_venv_install():
hint = _INSTALL_HINTS["nemo-parakeet"]
# The literal old, destructive recommendation must never reappear.
assert "pip install nemo_toolkit[asr]" not in hint, (
f"nemo-parakeet install_hint regressed to the shared-venv-breaking "
f"bare pip install: {hint!r}"
)
def test_nemo_parakeet_hint_warns_about_transformers_conflict():
hint = _INSTALL_HINTS["nemo-parakeet"]
assert "transformers" in hint
lowered = hint.lower()
assert "conflict" in lowered or "break" in lowered
def test_nemo_parakeet_hint_does_not_imply_isolated_venv_exists():
"""Unlike dots-tts/moss-tts-v15/confucius4-tts, nemo-parakeet has no
isolated-venv env var yet — the hint must not invent one."""
hint = _INSTALL_HINTS["nemo-parakeet"]
assert "OMNIVOICE_NEMO_PARAKEET_DIR" not in hint
def test_nemo_parakeet_hint_surfaced_in_list_backends():
rows = list_backends()
row = next(r for r in rows if r["id"] == "nemo-parakeet")
assert row["install_hint"] == _INSTALL_HINTS["nemo-parakeet"]