Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ metadata and the backend fallback mirror it.

### Fixed

- Local speech-recognition model paths beginning with a slash work on Windows without a model-licence error (#2930) — thanks @DeryFerd!

- "Text-to-speech is not ready" → Fix now downloads the model chosen for the selected engine instead of doing nothing and leaving the warning up (#2918)
- Integrations show official logos for Cursor, Claude Code, Codex CLI, OpenAI Agents, Docker and the VoiceStudio API instead of a generic placeholder or a GitHub avatar (#2918)
- Tools → Convert includes saved Voice Design profiles and clones with locked reference audio in the target voice picker (#2899)
Expand Down
6 changes: 3 additions & 3 deletions backend/services/asr_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3109,16 +3109,16 @@ def _licence_repo(name: str | None, *, faster_whisper: bool = False) -> str | No

A local directory outside the HF cache has no registry identity (it is a
user-provided asset) and yields None. Local paths are recognised by syntax
(absolute, ``./``, ``../``, ``~``, drive letters), never by probing the
filesystem with a user-provided name.
(absolute, a leading separator, ``./``, ``../``, ``~``, drive letters),
never by probing the filesystem with a user-provided name.
"""
name = str(name or "").strip()
if not name:
return None
cached = _HF_CACHE_DIR.search(name)
if cached:
return f"{cached.group(1)}/{cached.group(2)}"
if os.path.isabs(name) or name.startswith((".", "~")) or "\\" in name or _DRIVE_PATH.match(name):
if os.path.isabs(name) or name.startswith(("/", ".", "~")) or "\\" in name or _DRIVE_PATH.match(name):
return None
if name.lower() in _MOONSHINE_REPOS:
return _MOONSHINE_REPOS[name.lower()]
Expand Down
11 changes: 11 additions & 0 deletions tests/test_model_acceptance_asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,14 @@ def test_local_model_paths_are_recognised_by_syntax_not_the_filesystem(name):

def test_org_name_is_a_registry_identity():
assert ab._licence_repo("someone/unreviewed-ct2") == "someone/unreviewed-ct2"


@pytest.mark.parametrize("faster_whisper", [False, True])
def test_rooted_windows_path_is_local_independent_of_host(monkeypatch, faster_whisper):
from types import SimpleNamespace

# Python 3.13 Windows rejects a single leading slash as an absolute path.
# Isolate the backend's view rather than patching process-wide os.path.
monkeypatch.setattr(ab, "os", SimpleNamespace(path=SimpleNamespace(isabs=lambda name: False)))
assert ab._licence_repo("/models/whisper", faster_whisper=faster_whisper) is None
assert ab._licence_repo("Systran/faster-whisper-small", faster_whisper=faster_whisper) == "Systran/faster-whisper-small"
Loading