* fix(engines): let users delete an engine VoiceStudio installed (#4490) Nothing in the UI called the sidecar uninstall route, so a one-click engine (MOSS-SoundEffect and its ~11 GB of weights, IndexTTS, CosyVoice, ...) could never be removed, though the engine docs promised an Uninstall button. - The shared install control offers Delete, with a confirmation, for an app-managed install (never a user's own clone); Settings > Models shows it on each installed one-click engine and Tools > Sound effects at the top. - Uninstall stops the engine's running sidecar first, refuses while it is mid-request (409), and reports files it could not delete (500 with the folder) instead of a silent partial delete. - Engine docs name the Delete button. * fix(mobile): never leave a model download stuck at Waiting for Wi-Fi Wi-Fi-only downloads parked on the network policy (metered or hotspot Wi-Fi, cellular with Mobile data off) had no way forward and a generic label. Say why they wait, offer Download on this connection, apply the Mobile data switch to waiting transfers, and retry policy/constraint disagreements sooner. Same on Android and iOS. (#4494) * feat(dictation): optional compact level-meter overlay for press-and-hold dictation (#4493) * chore(changelog): name the batch fragments after #4496 and credit reporters * fix(engines): delete read-only files when removing an engine Windows marks git pack files read-only, so rmtree(ignore_errors=True) left .git behind and every engine delete there would have been reported as incomplete. Uninstall now clears the read-only bit and retries, and only files another process holds open are reported. * fix(engines): keep every request away from an engine while it is deleted A request holds the engine's op lock while it resolves its environment, before its process exists, so the old live-process check missed it and a spawn could rebuild part of the install mid-delete. The delete route now marks the engine removing (new spawns refuse it), takes every instance's op lock without waiting (busy → 409) and stops its sidecar before removing files. Leftovers of an incomplete delete stay 'managed' so Delete is still offered. Moves the stop out of sidecar_install, which also removes an import cycle. * fix(engines): Delete stays available for leftovers, sends one request, and promises only what it removes - Delete is offered for any managed folder, not only a healthy install, so an incomplete delete can be retried. - A ref guard and a disabled confirm button stop a second DELETE. - The confirmation no longer claims to remove models in the shared download cache, which uninstall leaves in place. * fix(mobile): relabel restored waiting downloads; harden iOS download replacement Android: a queued waiting entry now takes the freshly computed waiting reason on restore while active progress is kept. iOS: the Mobile data setting restarts waiting transfers, downloadNow persists the intent before replacing the task and keeps the model paused with a reason when saving fails, and task ownership uses a per-model generation so a cancelled task never clears or finalises a replacement's entries. (#4494) * fix(dictation): show the full recorder after an empty result and report compact-overlay save failures * fix(engines): retry only removals when a read-only file blocks an engine delete rmtree also reports os.open/os.scandir failures to the callback, and calling those with one argument raised TypeError and aborted the delete before its leftover check. Other failures now reach that check. * test(android): name freeBytes in the new ModelDownloads test calls Five positional lambdas matched both the primary constructor and the bundled-assets one, so the unit tests failed to compile. * fix(engines): reference-count delete marks, refuse installs during a delete, never chmod a symlink target - engine_removal holds counted 'being deleted' marks shared by the delete route, the sidecar spawner and the installer: an overlapping delete that gives up no longer clears the mark of one still removing files. - start_install refuses (409) while the engine is being deleted, and the install/repair button is disabled while a delete is pending. - The read-only retry makes the parent folder writable and never chmods a symlink, which would follow it to a shared interpreter. - iOS test: drop an assertion that could only pass after the gate opened. * docs(structure): 146 services * fix(engines): keep POSIX file modes on delete; make the iOS replacement test observe the cancelled transfer
7.2 KiB
VoiceStudio: CosyVoice Engine
CosyVoice is an optional multilingual TTS backend for zero-shot voice cloning and instructed speech. A one-click install runs it in its own environment and process; an existing source installation keeps running in-process.
Downloaded weights and an available engine are different states
The Model Catalogue tracks model weights separately from engine runtime
availability. A downloaded
FunAudioLLM/Fun-CosyVoice3-0.5B-2512 cache means the model files reached the
machine. It does not prove that the VoiceStudio backend can import and run
CosyVoice. The catalogue download and managed engine install select the same
reviewed CosyVoice 3 revision and runtime files (about 5.4 GB), including the
BlankEN model and tokenizer. Preflight totals and the transfer omit the unused
RL checkpoint, alternate flow ONNX export and batch speech tokenizer that share
the upstream repository; previously the catalogue fetched about 9.8 GB. Existing
cached files and user-managed model directories are not removed or rewritten.
This download reduction does not diagnose or fix speech-quality problems.
For an existing source installation, the same Python interpreter that runs the VoiceStudio backend must import:
from cosyvoice.cli.cosyvoice import AutoModel
It then loads the directory named by OMNIVOICE_COSYVOICE_MODEL, or defaults
to pretrained_models/Fun-CosyVoice3-0.5B. That path must resolve to the usable
model directory, not only the parent Hugging Face cache directory.
One-click install
Click Install in Model Catalogue → Engines → CosyVoice. VoiceStudio gives CosyVoice its own folder under the data directory and its own Python 3.10 environment, and runs it there in a separate process. The install:
- clones a reviewed CosyVoice commit and the Matcha-TTS code it depends on;
- downloads the CosyVoice 3 weights (about 5.4 GB).
It differs from upstream's own setup:
- PyTorch 2.7.0. The CUDA 12.8 build on an NVIDIA GPU, the CPU build on
Linux ROCm build on a ROCm host, the CPU build on other Windows and Linux
machines, and the regular build on Apple Silicon.
Upstream's 2.3.1 exists only for CUDA 12.1 and cannot run on RTX 50-series
GPUs. On Linux ARM64 (for example DGX Spark) only torch takes that build
and torchaudio installs the plain 2.7.0 wheel, because PyTorch publishes
its ARM64 torchaudio 2.7.0 without a
+cu128or+cpulabel. - Leaner dependencies. No TensorRT, DeepSpeed or GPU onnxruntime, and no third-party package index. Upstream uses them for extra speed on Linux; synthesis works without them. PyWORLD requires a C++ compiler: Xcode Command Line Tools on macOS, Visual Studio Build Tools with C++ on Windows, or the distribution’s C++ build tools on Linux. Without one, the install stops with "no C++ compiler found" and names the tools for your system; install them and click Install again to resume. SoX is not needed.
- Patched dependencies. Where upstream pins a release with a published security advisory (diffusers, hydra-core, lightning, modelscope, onnx, protobuf, transformers), the install uses the fixed release. That set was installed on Windows and passes the install's import check.
- No text normaliser. Upstream's (wetext) downloads its data from ModelScope on every model load, and ModelScope rate-limits those downloads, so a normaliser could half-download and fail silently. The one-click install leaves it out, and CosyVoice reads text as written: spell out numbers, dates and symbols where the pronunciation matters.
- Only the weights CosyVoice 3 loads. Not the RL and TensorRT variants that share its repository.
Nothing it installs touches VoiceStudio itself or any other engine, and Delete in the same row removes only that folder. An existing source installation keeps working as it is. The button is not offered on Intel Macs, where PyTorch 2.7.0 has no build.
CosyVoice 3 has no built-in voices. With no reference clip, it speaks in the voice of upstream's own sample prompt.
Source builds and existing installations
The upstream CosyVoice project recommends its own Python 3.10 Conda environment and SoX. The one-click install above gives CosyVoice that separate environment. Installing upstream dependency pins into VoiceStudio's shared backend environment can also conflict with other engines.
Existing source installations remain usable when the VoiceStudio backend's
interpreter can already import cosyvoice.cli.cosyvoice.AutoModel. Keep a
working installation in place. Before starting VoiceStudio, set
OMNIVOICE_COSYVOICE_MODEL to its usable model directory through the source
checkout's environment or project .env file.
For upstream setup details, read the official CosyVoice installation guide. Those steps create a standalone CosyVoice environment. Prefer the managed one-click installer above for the Electron app.
Diagnose an unavailable engine
Include these facts in a support question or bug report:
- The exact VoiceStudio version.
- The full reason under Model Catalogue > Engines > CosyVoice after selecting Re-check.
- The CosyVoice lines from Settings > Logs > Backend immediately after that check.
- On Windows, the output of
where.exe soxin PowerShell.
These facts distinguish a downloaded-model state from a missing Python runtime, missing SoX executable, or incorrect model directory. Do not delete a model cache or reinstall dependencies until the log identifies which state failed.
The public report that exposed the misleading installed state is Discussion 1631.
On hosts without CUDA, the managed sidecar normalizes the LLM, flow and vocoder weights to float32 to match upstream CPU inputs. CUDA keeps its selected precision. This prevents the CPU Float/BFloat16 matrix mismatch; it does not establish that every reported installation or speech-quality problem is fixed.
Repairing missing runtime imports
The managed recipe includes gdown, wget and pyarrow, and builds pinned PyWORLD
source that no longer needs pkg_resources. Its final check imports the dataset
processor and Matcha utilities as well as AutoModel. Older completion markers
are treated as needing repair; retry Install to reuse the existing model weights.
User-managed environments are not rewritten. Do not downgrade setuptools merely
to restore pkg_resources.
Speech context with newer Transformers
The managed sidecar loads Qwen in float32 before applying the trained checkpoint, then preserves upstream's explicit precision choices. It also includes cached prompt tokens in incremental attention masks: a one-token mask in newer Transformers otherwise hides the text and voice context and produces unrelated or garbled speech. Existing Transformers 4 environments and legacy cache tuples remain supported; full masks are left intact.
A real CosyVoice 3 CPU check with Transformers 5.10.1 now reproduces the complete 89-word English input, verified with an independent local speech recognizer. A tiny randomly initialized Qwen regression checks cached versus full-context decoding without downloading any model in CI. This does not certify every language, voice reference, or GPU configuration.