• Stefy Lanza (nextime / spora )'s avatar
    voice: cache the F5-TTS engine and trim over-long references · 45cc7306
    Stefy Lanza (nextime / spora ) authored
    Two costs on every cloned line.
    
    F5TTS(device=…) was constructed per request, so the model and its vocoder were
    loaded from scratch for each line of dialogue — seconds of latency and a fresh VRAM
    allocation every time. seed-vc next door already keeps a singleton; F5 now does
    too, rebuilt only if the device changes, and registered with
    register_external_vram_releaser so the manager can reclaim it like the LoRA base
    cache and the OCR engines.
    
    And nothing capped the reference. F5-TTS prompts on the clip and gains nothing past
    roughly 15 s, while a saved profile can hold minutes — the character studio uploads
    90 s. Both the /v1/audio/clone path and the dialog path now trim to
    MAX_REF_SECONDS (15, override with CODERAI_F5_MAX_REF_SECONDS), leaving anything
    already short untouched.
    Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
    45cc7306
Name
Last commit
Last update
..
admin Loading commit data...
api Loading commit data...
backends Loading commit data...
broker Loading commit data...
frontproxy Loading commit data...
models Loading commit data...
ocr Loading commit data...
openai Loading commit data...
pydantic Loading commit data...
queue Loading commit data...
tasks Loading commit data...
__init__.py Loading commit data...
cli.py Loading commit data...
config.py Loading commit data...
main.py Loading commit data...
platform_paths.py Loading commit data...
system_app.py Loading commit data...