CosyVoice.cpp — AiTable Windows Vulkan community build

下載 / Downloads

This is an inference runtime, not a voice/model release. 本倉庫提供我們目前使用的 CosyVoice.cpp Vulkan 後端,以及可套用修正的腳本;不含模型、私人參考音色、角色資料或 LoRA 權重。

Version Binary runtime Fix script bundle Notes Checksums
20261021-01 Runtime ZIP Fixes ZIP Version notes SHA256

舊版本保留:每版 ZIP、腳本、patch、manifest、說明與校驗碼使用固定版本名稱,後續新增版本,不覆蓋、不刪除舊版;首頁 README 僅作可更新索引。

Upstream and provenance

  • Upstream: Lourdle/cosyvoice.cpp, based on v0.2.0 / 67d45feb2f654bbc66cca25bff78464b3ec08fa1 plus local native changes. This package is not a claim to contain current upstream main.
  • This is an unofficial community build, not an official CosyVoice, Lourdle or AMD release.
  • The binary payload is copied from the installed AiTable build, not rebuilt for publication. The release manifest records each included binary's SHA256.
  • Backend: Vulkan and CPU. No ROCm/HIP backend is included. Windows x64; existing local deployment uses Radeon RX 9070. Other GPU/platform compatibility is not validated here.
  • Models can be obtained separately from the upstream GGUF model repository. Follow the upstream model/frontend instructions and their separate licenses. Our private fine-tuned voices are not included.

Our native changes / 解決辦法

  1. Streaming cumulative mel and quiet handoff: retain the same job's mel history within existing context capacity, generate the cumulative HiFT prefix, and emit only samples after the committed cursor. Select a low-energy handoff within the available tail (20ms energy window, normally 20–250ms held tail); finalization emits remaining samples. Short prefixes do not invent silence. Cleanup resets per-job state. This reduces some join artifacts; it does not guarantee artifact-free speech.
  2. Silent-token resampling guard: a rejected sampled silent token has not advanced the logits/KV state. Check cancellation before sampling, bound consecutive rejected draws to uint64_t(limit)+2, reset that count on acceptance, and use the existing failure cleanup when exhausted. This is not a timeout/cancellation mechanism for an already blocked native graph, and does not prove the cause of earlier live timeouts.
  3. Text buffer reset: clear the per-request emoji/text output buffer before appending, avoiding stale text across requests.
  4. Bounded stage diagnostics: observe processing stages without including request text. A stage marker is not proof of completion or a stack trace.
  5. Optional dynamic LoRA interface: retains the experimental rank-4 Q/V adapter API and HTTP integration used by AiTable. No trained adapter or private voice is distributed, and normal TTS does not become ASMR merely by downloading this runtime. A compatible model, validated factors and integration are still required.

The source patch contains these changes and their necessary native API/server wiring, not just the two algorithm snippets. It excludes local dependency path rewrites, build caches, full source snapshots and model weights. Rebuilding these sources is not promised to reproduce the published binary bit-for-bit.

Use the binary runtime

Extract the complete ZIP. Keep all DLLs beside the EXEs in runtime/; do not replace these GGML DLLs with an unrelated llama.cpp build. Python and the compiler toolchain are not needed to run the binary package. A current compatible Vulkan driver and Microsoft Visual C++ x64 runtime may be required.

With your own compatible CosyVoice3-2512 GGUF and pre-encoded prompt_speech:

runtime\cosyvoice-cli.exe --model "D:\Models\CosyVoice3-2512_F16.gguf" --prompt-speech "D:\Voices\prompt_speech.gguf" --mode cross-lingual --text "This is a short test." --output "test.wav" --backend vulkan0

For a localhost API example (not started automatically):

runtime\cosyvoice-server.exe --api --model "D:\Models\CosyVoice3-2512_F16.gguf" --voice-prompt "demo=D:\Voices\prompt_speech.gguf" --backend vulkan0 --host 127.0.0.1 --port 9880 --chunk-tokens 125 --inference-buffer-policy dedicated --simd-level auto

Use --backend cpu for CPU execution. --help lists this binary's supported options. With no pre-encoded prompt, obtain the frontend ONNX assets separately and follow upstream's --frontend-only flow. ONNX Runtime DLLs are included; tokenizer/campplus model files are not. Audio output is produced by the model; the runtime does not upscale its training sample rate into higher-fidelity speech.

Apply the fix script / 套用修正腳本

Download and extract the Fixes ZIP, or download these three versioned files into one folder:

Requires Python 3.9+ and Git. Obtain a separate upstream checkout at the exact commit, preserving LF line endings:

git -c core.autocrlf=false clone https://github.com/Lourdle/cosyvoice.cpp.git cosyvoice-patch-work
git -C cosyvoice-patch-work -c core.autocrlf=false checkout 67d45feb2f654bbc66cca25bff78464b3ec08fa1
python apply-cosyvoice-fixes-20261021-01.py --source cosyvoice-patch-work
python apply-cosyvoice-fixes-20261021-01.py --source cosyvoice-patch-work --apply

Default is check-only. The script verifies the patch and every affected original file, rejects a different/already-patched source, preserves backups and a restore manifest beside the checkout, then checks every output hash. It explicitly disables Git automatic newline conversion for the patch operation. Do not point it at an installed runtime or a working tree with your own modifications to affected files. This does not compile, download models, replace installed binaries, restart services or repair arbitrary upstream versions.

To restore, consult the backup's restore-manifest.json: restore originals and remove only listed newly added files, after checking no later edits would be overwritten. After patching, use upstream build instructions with your own compatible GGML/ONNX/ICU/FFmpeg dependencies. This release's script application was tested; a fresh complete source rebuild was not performed for this publication.

Validation and remaining limits

  • This publication: packaged CLI/server/quantizer --help checks passed with PATH restricted to the packaged runtime and Windows System32. No model/server was launched and all checks exited. ZIP integrity and source-patch application/output hashes are checked separately.
  • Prior validation of the same silent-resampling DLL: CPU fault injection returned failure with zero KV/PCM on a forced-silent case, cancellation completed, and a subsequent synthesis on the same context succeeded. Normal CPU PCM matched the previous core in the tested case. These are limited tests, not full GPU/live validation.
  • Earlier streaming seam and loudness investigations remain unresolved in some listening cases. The package retains our local cumulative-mel/quiet-handoff approach, not an assertion that every pop, loudness jump or strange utterance is fixed. Changing chunk length reduces seam frequency but is not by itself proof of correctness.
  • Cumulative mel/HiFT work may increase time/memory versus upstream overlap-only behavior. This release adds no new RTF, first-audio latency or VRAM benchmark; performance depends on model, reference, chunking and hardware.
  • Large F32 models may exceed a single Vulkan allocation on AMD. This release does not include a multi-buffer loader fix or override that hardware limit.

Licensing

CosyVoice.cpp and our native changes use the preserved MIT terms; bundled dependencies retain their own licenses. FFmpeg components in this package identify as LGPL-3.0-or-later, not the upstream notice's generic LGPL-2.1 default. See THIRD_PARTY_NOTICES.md and licenses/ for included texts, provenance and source links. MIT repository metadata describes the core and does not relicense FFmpeg, model weights or every dependency.

Index clarification

On Windows, explicitly disable core.autocrlf during both clone and checkout, as shown above. The frozen release notes omit the second override; use this corrected checkout command if your global Git setting enables CRLF conversion. Versioned artifacts remain unchanged. Release checksums describe commit b71b7d42941254777cebf10c2f3c5de00a1e08c8; the mutable root README may receive later usage clarifications.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support