mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-04 01:25:18 -07:00
Merge remote-tracking branch 'origin/main' into prep/pr-659
# Conflicts: # backend/database/models.py
This commit is contained in:
@@ -244,6 +244,7 @@ async def get_model_status():
|
||||
use_scan_cache = False
|
||||
|
||||
from ..backends import get_all_model_configs, check_model_loaded
|
||||
from ..backends.base import has_in_progress_download
|
||||
|
||||
registry_configs = get_all_model_configs()
|
||||
model_configs = [
|
||||
@@ -293,8 +294,7 @@ async def get_model_status():
|
||||
try:
|
||||
cache_dir = hf_constants.HF_HUB_CACHE
|
||||
blobs_dir = Path(cache_dir) / ("models--" + repo_id.replace("/", "--")) / "blobs"
|
||||
if blobs_dir.exists():
|
||||
has_incomplete = any(blobs_dir.glob("*.incomplete"))
|
||||
has_incomplete = has_in_progress_download(blobs_dir)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -314,7 +314,7 @@ async def get_model_status():
|
||||
|
||||
if repo_cache.exists():
|
||||
blobs_dir = repo_cache / "blobs"
|
||||
has_incomplete = blobs_dir.exists() and any(blobs_dir.glob("*.incomplete"))
|
||||
has_incomplete = has_in_progress_download(blobs_dir)
|
||||
|
||||
if not has_incomplete:
|
||||
snapshots_dir = repo_cache / "snapshots"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""POST /speak — REST wrapper around voicebox.speak for non-MCP callers.
|
||||
"""POST /speak — REST wrapper around voicebox_speak for non-MCP callers.
|
||||
|
||||
Shell scripts, ACP, A2A, or any agent that doesn't speak MCP can hit this
|
||||
endpoint to play text through a cloned voice. Uses the same profile
|
||||
@@ -30,7 +30,7 @@ async def speak(
|
||||
request: Request,
|
||||
db: Session = Depends(get_db),
|
||||
):
|
||||
"""Speak text in a voice profile. Mirrors voicebox.speak (MCP).
|
||||
"""Speak text in a voice profile. Mirrors voicebox_speak (MCP).
|
||||
|
||||
Response shape matches POST /generate — a ``GenerationResponse`` with
|
||||
``status="generating"`` and an ``id`` the caller polls at
|
||||
@@ -75,7 +75,7 @@ async def speak(
|
||||
models.GenerationRequest(
|
||||
profile_id=profile.id,
|
||||
text=data.text,
|
||||
language=data.language or "en",
|
||||
language=data.language or profile.language or "en",
|
||||
engine=engine,
|
||||
personality=bool(personality_flag),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user