Pin Applio 3.6.5 and verified basis assets, migrate private voice provenance, and coordinate conversion/live/training with Deck GPU leases. Prepare an inactive voice profile and a restricted studio container. Move CUDA and Torch caches out of the small temporary filesystem to prevent OmniVoice reference failures. Package app updates from the explicit allowlist in one Docker layer.
22 lines
558 B
Python
22 lines
558 B
Python
"""Preset endpoints."""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from ..services.presets import get_preset, get_presets
|
|
|
|
router = APIRouter(tags=["presets"])
|
|
|
|
|
|
@router.get("/presets")
|
|
def list_presets():
|
|
return {"presets": get_presets(), "count": len(get_presets())}
|
|
|
|
|
|
@router.get("/presets/{preset_id}")
|
|
def get_preset_detail(preset_id: str):
|
|
preset = get_preset(preset_id)
|
|
if preset is None:
|
|
from fastapi import HTTPException
|
|
raise HTTPException(status_code=404, detail=f"Preset '{preset_id}' nicht gefunden")
|
|
return preset.__dict__
|