Skip to content

LocalSoundsAPI v1.2 - Concurrent Engines & Live Progress

Latest

Choose a tag to compare

@aivrar aivrar released this 16 Nov 19:07

LocalSoundsAPI v1.2 - Concurrent Engines & Live Progress

This release makes one LocalSoundsAPI instance safe to call from the web UI and from remote scripts at the same time, and adds a live progress bar to every Generate panel. It covers feature requests #2 (progress bar) and #3 (lock UI controls while generating).

What's New

Engines run side by side

  • Different engines can generate at the same time on one instance (for example a Stable Audio track while Kokoro reads a script), as long as your GPU(s) have the VRAM.
  • Jobs on the same engine run one at a time. A request for an engine that is already generating, loading or unloading gets an immediate 503 with a Retry-After: 5 header and a JSON body ("error": "busy", "busy_with", the running job's progress). Nothing is queued. The caller decides whether to wait and retry, use another engine, or use another instance.
  • Strict mode: set JOB_CONCURRENCY = "single" in config.py (or the environment variable LSAPI_JOB_CONCURRENCY=single) for one job at a time across all engines on smaller GPUs.
  • Shared models are protected: Whisper can't be unloaded or moved to another device while a job verifies with it (/whisper_load and /whisper_unload answer 503 meanwhile). CLAP stays loaded while either Stable Audio or ACE-Step uses it, and CLAP scoring is serialized.
  • Two engines' jobs can't write into the same save_path folder at the same time; the second gets 409.

Live progress

  • New GET /job_status endpoint lists the running jobs with engine, stage (preparing / generating / finalizing), chunk or diffusion-step progress, percent, elapsed time and ETA.
  • Every Generate panel (XTTS, Fish Speech, Kokoro, Stable Audio, ACE-Step) shows a Bootstrap progress bar with stage, elapsed time and ETA.

Locked controls while generating

  • A panel's controls (except Stop) are locked while its engine is busy. This prevents double-click duplicate jobs and changing settings mid-job.
  • Jobs started elsewhere (another tab, a remote API call, before a page refresh) are picked up and shown as "started elsewhere".

Reliable Stop

  • Cancel is scoped to your own job via an optional X-Job-Client-Id header, so Stop can never cancel someone else's job on the same engine.
  • Stop pressed during model load or the last chunk is honoured. Cancelled jobs return 499.
  • Fixed the Stable Audio Stop button, which previously had no effect.

Docs & client

  • README, API reference (new "Concurrency, Busy Responses & Progress" section), troubleshooting and the PDF manual are updated.
  • The example [stand-alone-app]-API_client.py waits and retries on 503 for load, unload and inference.

Updating an Existing Checkout

git pull origin main

No new dependencies. Restart LocalSoundsAPI after updating.

Fresh Install

Download and extract the Source code (zip) below, or clone this tag, then double-click install.bat:

git clone --branch v1.2 --depth 1 https://github.com/aivrar/LocalSoundsAPI.git

The required portable-python-env-v1.7z and bin.zip assets remain in the v1.0 dependency bundle; the installer selects and verifies them automatically.