5 min read

CosyVoice: Open-Source Multilingual Text-to-Speech Models (GitHub, Scanned)

Open text-to-speech models that speak 9 languages and 18+ Chinese dialects, with streaming output.

CosyVoice logo
✅
Scan: safe. No malicious code. The notes: the Python versions it pins are old and carry known advisories, the web demo listens on every network interface, and a model that can copy a voice needs responsible use. Scanned Oct 26, 2026; the full report is below.

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 CosyVoice

2. Create the Conda environment and install the requirements

conda create -n cosyvoice -y python=3.10 && conda activate cosyvoice && pip install -r requirements.txt

3. After downloading the models (see the note), run the examples

python example.py

Download 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

CheckResult
SecretsNone found.
Suspicious codeNone found.
Install-time code3 installer scripts
Committed binariesNone.
CI workflows2 workflows. None use pull_request_target. No third-party actions.
Network hosts13 distinct hosts referenced from source; most often www.apache.org, github.com, arxiv.org, discuss.pytorch.org. No URLs to bare IP addresses.
Known vulnerabilities78 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 hygieneHas licence file. Missing security policy, automated dependency updates, CodeQL, contributing guide.
OpenSSF ScorecardNot 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)
Worst known vulnerabilities (24 of 78)
AdvisorySeverityPackageSummary
GHSA-cgwc-qvrx-rf7fcriticallightning@2.2.4Remote code execution in pytorch lightning
GHSA-mr7h-w2qc-ffc2criticallightning@2.2.4pytorch-lightning vulnerable to Arbitrary File Write via /v1/runs API endpoint
GHSA-4cv3-v7pv-rfhfcriticallightning@2.2.4PyTorch Lightning path traversal vulnerability
GHSA-j2jg-fq62-7c3hcriticalgradio@5.4.0Gradio Blocked Path ACL Bypass Vulnerability
GHSA-53q9-r3pm-6pq6criticaltorch@2.3.1PyTorch: `torch.load` with `weights_only=True` leads to remote code execution
CVE-2024-48063criticaltorch@2.3.1
GHSA-7wx4-6vff-v64phighdiffusers@0.29.0Diffusers: TOCTOU Trust Remote Code Bypass
GHSA-98h9-4798-4q5vhighdiffusers@0.29.0Diffusers has a `trust_remote_code` bypass via `custom_pipeline` and local custom components
GHSA-j7w6-vpvq-j3gmhighdiffusers@0.29.0
GHSA-2cp2-2r3c-7p7rhighhydra-core@1.3.2Hydra: hydra.utils.instantiate with untrusted config can lead to code execution
GHSA-c3wx-c55w-pxjqhighhydra-core@1.3.2Hydra logging configuration permits unsafe callable resolution
GHSA-qqmf-gpg7-g8gwhighlightning@2.2.4PyTorch Lightning allows arbitrary code execution through checkpoint _instantiator hyperparameters
GHSA-98fp-7v67-4v3qhighlightning@2.2.4PyTorch Lightning denial of service vulnerability
GHSA-75m9-98v2-hjpmhighlightning@2.2.4PyTorch Lightning load_from_checkpoint has an insecure checkpoint deserialization
GHSA-fhhq-h4hg-549xhighmodelscope@1.15.0ModelScope is vulnerable to arbitrary code injection via a crafted module
GHSA-3r9x-f23j-gc73highonnx@1.16.0onnx Vulnerable to Path Traversal via Symlink
GHSA-538c-55jv-c5g9highonnx@1.16.0ONNX: Malicious ONNX models can crash servers by exploiting unprotected object settings.
GHSA-6rq9-53c3-f7vjhighonnx@1.16.0onnx allows Arbitrary File Overwrite in download_model_with_test_data
GHSA-h36j-8vv3-cj52highonnx@1.16.0Open Neural Network Exchange (ONNX) Path Traversal Vulnerability
GHSA-hqmj-h5c6-369mhighonnx@1.16.0ONNX Untrusted Model Repository Warnings Suppressed by silent=True in onnx.hub.load() - Silent Supply-Chain Attack
GHSA-q56x-g2fj-4rj6highonnx@1.16.0ONNX: TOCTOU arbitrary file read/write in save_external_dat
GHSA-7gcm-g887-7qv7highprotobuf@4.25protobuf affected by a JSON recursion depth bypass
GHSA-8qvm-5x2c-j2w7highprotobuf@4.25protobuf-python has a potential Denial of Service issue
GHSA-39mp-8hj3-5c49highgradio@5.4.0Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+

By the numbers

Stars24.1K
Forks2,758
Contributors51
Commits552
Open issues618
Open pull requests37
Releases0
Latest releasenone tagged
LicenceApache-2.0
Main languagePython
Project age2 years
Last pushMay 25, 2026
Tracked files156
Lines of code25.5K
Checkout size3 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.