fix(settings): speech model follow-ups from QA (#836)

* fix(settings): speech model follow-ups from #834

Keep the Unused downloads expander in sync with search, recommend Faster
Whisper .en weights for English, parse nvidia-smi MiB VRAM, stop simple
mode from clobbering Faster Whisper/Parakeet, and ceil RAM so ~7.4 GiB
counts as 8.

* fix(settings): keep FW .en picker ids and test unused search

Represent Faster Whisper English catalog variants in the Settings size
combo so tray-saved small.en is not rejected and overwritten. Add
behavioral unused-downloads search coverage for match/nonmatch/clear.
This commit is contained in:
Jatin K Malik
2026-09-29 01:06:08 -07:00
committed by GitHub
parent 06f049ac76
commit 9646011e77
10 changed files with 744 additions and 25 deletions
+32
View File
@@ -105,6 +105,38 @@ class TestRecommendedModelForEngine:
def test_remote_api_has_nothing_to_download(self, settings_dialog):
assert settings_dialog.recommended_model_for_engine("remote_api", "auto") is None
def test_faster_whisper_english_gets_the_english_only_variant(self, settings_dialog):
with patch.object(
settings_dialog,
"get_recommended_faster_whisper_model",
return_value=("small", "CUDA GPU"),
):
result = settings_dialog.recommended_model_for_engine("faster_whisper", "en-us")
assert result.model_id == "small.en"
assert "CUDA GPU" in result.reason
assert result.model_id in settings_dialog.ENGINE_MODELS["faster_whisper"]
def test_faster_whisper_non_english_keeps_the_multilingual_model(self, settings_dialog):
with patch.object(
settings_dialog,
"get_recommended_faster_whisper_model",
return_value=("tiny", "4GB RAM"),
):
result = settings_dialog.recommended_model_for_engine("faster_whisper", "de")
assert result.model_id == "tiny"
def test_faster_whisper_skips_english_variant_when_catalog_has_none(self, settings_dialog):
with patch.object(
settings_dialog,
"get_recommended_faster_whisper_model",
return_value=("large-v3", "lots of RAM"),
):
result = settings_dialog.recommended_model_for_engine("faster_whisper", "en-us")
assert result.model_id == "large-v3"
class TestOffer:
"""What the notification carries."""