CosyVoice is a family of open speech-generation models plus the code to run, train and serve them. The current release, Fun-CosyVoice 3.0, is a 0.5B-parameter model covering Chinese, English, Japanese, Korean, German, Spanish, French, Italian and Russian, and more than 18 Chinese dialects. It reads numbers and symbols without a separate text-normalisation step, follows instructions for language, dialect, emotion, speed and volume, and can stream audio with latency as low as 150 ms.
On the project's own benchmark table the 0.5B model holds its own against much larger open models, and some closed ones, on accuracy and speaker similarity. The repository ships a Gradio web demo, FastAPI and gRPC servers with a Dockerfile, vLLM support for faster inference, and training recipes. Models download from Hugging Face or ModelScope. It is Apache-2.0 with about 24,000 stars.
It is a research codebase rather than an app: you need Python 3.10, Conda and, in practice, an NVIDIA GPU, there are no tagged releases, and the last push was in May 2026. Like most modern TTS models it can imitate a voice from a short sample, so only use voices you have permission to use.
- Repository: github.com/QwenAudio/CosyVoice
- Licence: Apache-2.0 (Apache License 2.0)
- Language: Python. Stars: 24.1K. Forks: 2,758. Last push: May 25, 2026.
- Scan: safe, Oct 26, 2026, commit 074ca6d
Who it is for
Developers building voice features such as narration, assistants or accessibility tools who want a model they can host themselves, and researchers working on speech synthesis.
Getting started
1. Clone with its submodules
git clone --recursive https://github.com/FunAudioLLM/CosyVoice.git && cd CosyVoice2. Create the Conda environment and install the requirements
conda create -n cosyvoice -y python=3.10 && conda activate cosyvoice && pip install -r requirements.txt3. After downloading the models (see the note), run the examples
python example.pyDownload the pretrained models first with the snapshot_download snippet in the README, from Hugging Face or ModelScope; the project recommends Fun-CosyVoice3-0.5B. The README's own pip line adds Alibaba's Aliyun mirror with --trusted-host, which turns off certificate checks for that mirror; the plain command above uses PyPI. The web demo is python3 webui.py --port 50000 --model_dir pretrained_models/CosyVoice-300M.
Safety scan
We cloned QwenAudio/CosyVoice at commit 074ca6d on Oct 26, 2026 and ran the checks described on the GitHub Tools page: credential patterns, decode-and-execute code, install-time scripts, committed binaries, risky CI workflows, every host the code talks to, known vulnerabilities in pinned dependencies, and project hygiene. A person read every hit. This is what we found.
- No secrets, no suspicious code patterns, no committed binaries and no bare-IP URLs across about 22,000 lines of Python.
- The 3 scripts flagged as installers are all in runtime/triton_trtllm: NVIDIA Triton and TensorRT-LLM deployment recipes that clone repositories from GitHub and fetch models from Hugging Face. No sudo, no shell-profile edits and nothing piped into a shell; you only run them to deploy a server.
- 78 known advisories, and these do reach you, because requirements.txt pins the versions you install. 77 are in that file, 6 of them critical: PyTorch 2.3.1 (torch.load code execution even with weights_only), PyTorch Lightning 2.2.4 and Gradio 5.4.0. The PyTorch and Lightning issues concern loading untrusted checkpoints, so only load models from the official FunAudioLLM pages. The rest are in the examples/grpo training recipe.
- webui.py launches Gradio with server_name 0.0.0.0, so the demo is reachable from other machines on your network. With an older Gradio underneath, keep it on a trusted network or behind a firewall.
- 2 workflows, no pull_request_target and no third-party actions. Licence and code of conduct present; no security policy, contributing guide or Dependabot.
What the scanner counted
| Check | Result |
|---|---|
| Secrets | None found. |
| Suspicious code | None found. |
| Install-time code | 3 installer scripts |
| Committed binaries | None. |
| CI workflows | 2 workflows. None use pull_request_target. No third-party actions. |
| Network hosts | 13 distinct hosts referenced from source; most often www.apache.org, github.com, arxiv.org, discuss.pytorch.org. No URLs to bare IP addresses. |
| Known vulnerabilities | 78 advisories across 44 pinned packages: 6 critical, 44 high, 18 moderate, 10 low. examples/grpo/cosyvoice2/requirements.txt: 23 packages, 25 advisories; requirements.txt: 40 packages, 77 advisories. |
| Project hygiene | Has licence file. Missing security policy, automated dependency updates, CodeQL, contributing guide. |
| OpenSSF Scorecard | Not scored: the project is not in Scorecard's weekly index. |
The raw findings
Every hit the scanner wrote out, with a link to the exact line at the scanned commit. Secrets candidates are redacted.
Installer scripts (3)
- runtime/triton_trtllm/run.sh, 143 lines; talks to github.com, raw.githubusercontent.com
- runtime/triton_trtllm/run_cosyvoice3.sh, 140 lines; talks to github.com
- runtime/triton_trtllm/run_stepaudio2_dit_token2wav.sh, 225 lines; talks to github.com, huggingface.co
Worst known vulnerabilities (24 of 78)
| Advisory | Severity | Package | Summary |
|---|---|---|---|
| GHSA-cgwc-qvrx-rf7f | critical | lightning@2.2.4 | Remote code execution in pytorch lightning |
| GHSA-mr7h-w2qc-ffc2 | critical | lightning@2.2.4 | pytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpoint |
| GHSA-4cv3-v7pv-rfhf | critical | lightning@2.2.4 | PyTorch Lightning path traversal vulnerability |
| GHSA-j2jg-fq62-7c3h | critical | gradio@5.4.0 | Gradio Blocked Path ACL Bypass Vulnerability |
| GHSA-53q9-r3pm-6pq6 | critical | torch@2.3.1 | PyTorch: `torch.load` with `weights_only=True` leads to remote code execution |
| CVE-2024-48063 | critical | torch@2.3.1 | |
| GHSA-7wx4-6vff-v64p | high | diffusers@0.29.0 | Diffusers: TOCTOU Trust Remote Code Bypass |
| GHSA-98h9-4798-4q5v | high | diffusers@0.29.0 | Diffusers has a `trust_remote_code` bypass via `custom_pipeline` and local custom components |
| GHSA-j7w6-vpvq-j3gm | high | diffusers@0.29.0 | |
| GHSA-2cp2-2r3c-7p7r | high | hydra-core@1.3.2 | Hydra: hydra.utils.instantiate with untrusted config can lead to code execution |
| GHSA-c3wx-c55w-pxjq | high | hydra-core@1.3.2 | Hydra logging configuration permits unsafe callable resolution |
| GHSA-qqmf-gpg7-g8gw | high | lightning@2.2.4 | PyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameters |
| GHSA-98fp-7v67-4v3q | high | lightning@2.2.4 | PyTorch Lightning denial of service vulnerability |
| GHSA-75m9-98v2-hjpm | high | lightning@2.2.4 | PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization |
| GHSA-fhhq-h4hg-549x | high | modelscope@1.15.0 | ModelScope is vulnerable to arbitrary code injection via a crafted module |
| GHSA-3r9x-f23j-gc73 | high | onnx@1.16.0 | onnx Vulnerable to Path Traversal via Symlink |
| GHSA-538c-55jv-c5g9 | high | onnx@1.16.0 | ONNX: Malicious ONNX models can crash servers by exploiting unprotected object settings. |
| GHSA-6rq9-53c3-f7vj | high | onnx@1.16.0 | onnx allows Arbitrary File Overwrite in download_model_with_test_data |
| GHSA-h36j-8vv3-cj52 | high | onnx@1.16.0 | Open Neural Network Exchange (ONNX) Path Traversal Vulnerability |
| GHSA-hqmj-h5c6-369m | high | onnx@1.16.0 | ONNX Untrusted Model Repository Warnings Suppressed by silent=True in onnx.hub.load() - Silent Supply-Chain Attack |
| GHSA-q56x-g2fj-4rj6 | high | onnx@1.16.0 | ONNX: TOCTOU arbitrary file read/write in save_external_dat |
| GHSA-7gcm-g887-7qv7 | high | protobuf@4.25 | protobuf affected by a JSON recursion depth bypass |
| GHSA-8qvm-5x2c-j2w7 | high | protobuf@4.25 | protobuf-python has a potential Denial of Service issue |
| GHSA-39mp-8hj3-5c49 | high | gradio@5.4.0 | Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+ |
By the numbers
| Stars | 24.1K |
|---|---|
| Forks | 2,758 |
| Contributors | 51 |
| Commits | 552 |
| Open issues | 618 |
| Open pull requests | 37 |
| Releases | 0 |
| Latest release | none tagged |
| Licence | Apache-2.0 |
| Main language | Python |
| Project age | 2 years |
| Last push | May 25, 2026 |
| Tracked files | 156 |
| Lines of code | 25.5K |
| Checkout size | 3 MB |
Lines by language: Python 22K, Shell 1,467, Markdown 971, YAML 861, JSON 149, Protobuf 43.
Questions
Is CosyVoice free?
The code is free and open source under Apache-2.0. The model weights are downloaded separately from Hugging Face or ModelScope, so check each model card for its own terms before commercial use.
Does CosyVoice need a GPU?
The deployment instructions and Docker commands assume an NVIDIA GPU, and the optional ttsfrd text-normalisation package ships only as a Linux x86-64 wheel, so a Linux machine with an NVIDIA card is the smooth path.
Can CosyVoice clone a voice?
Yes. Its zero-shot and cross-lingual modes speak in the voice of a short reference recording. The README calls its demos academic, and you should only use a person's voice with their consent.
Which CosyVoice model should I use?
The README recommends Fun-CosyVoice3-0.5B, the newest model, for the best results. The older CosyVoice2-0.5B and CosyVoice-300M models (including SFT and Instruct variants) are still available for the web demo and the server examples.
This post is part of GitHub Tools, where every repository is cloned and scanned before it is written up. The scan is a snapshot of one commit on one day; the repository has moved on since, so check it before you install.
