Spark TTS 语音合成
A Qwen-backed voice cloner that runs locally — made for Chinese and code-switching
- ref_audio
- audio
TTS in ComfyUI is bolted on, not built in - every voice model arrives as its own custom node with its own dependency stack, and SparkTTS is one of those. It wraps Spark-TTS, the 0.5B text-to-speech model from iFlytek, and it does one thing the more famous open models don't do well: Chinese. English-first is the default in this corner of the ecosystem (Kokoro, Chatterbox, F5), so when your script is 中文, or worse, code-switches mid-sentence between Chinese and English, this is the node to reach for. Community ranking in 2025 put it solidly mid-tier - nobody calls it the king, but it reliably lands in the "actually tested it" lists alongside Zonos and CosyVoice2.
How it works
Spark-TTS is an LLM-based TTS, which is a different architecture from the diffusion-style generators you may know from F5 or Chatterbox. The whole model is built on a Qwen2.5 backbone: it predicts audio codec tokens directly, and a detokenizer reconstructs the waveform from those predicted codes. No flow matching, no vocoder dance - that's the "simple and efficient" claim in the README, and it's real. Voice cloning works by encoding your reference clip into speaker tokens (an ECAPA-TDNN speaker encoder plus a perceiver), feeding those alongside the target text, and having the LLM generate the audio tokens conditioned on both. A few seconds of clean reference audio is enough; no fine-tuning required.
The model runs entirely on your machine - no API key, no cloud. First run downloads the weights to ComfyUI/models/sparktts/Spark-TTS-0.5B automatically (or you can clone the HF repo there yourself), and outputs come back at 16 kHz.
The inputs that matter
The node keeps its surface small, and that's mostly fine:
- ref_audio (AUDIO, required) - your voice reference. Feed it from a load-audio node (the example workflow uses VHS_LoadAudioUpload).
- text (STRING) - what gets spoken. Defaults to a Chinese test string, so change it before you hit Run.
- prompt_text (STRING) - the transcript of your reference audio. And here's the first trap: in the current version it's wired up in the UI but hardcoded to
""in the node code, so whatever you type gets ignored. The README's advice to "ensure accurate reference text matching" doesn't apply to this wrapper yet. Clean, clear reference audio matters more. - model_path and device - pick
cuda(default) unless you're on a CPU-only box; the 0.5B model runs on CPU, just slowly.
Output is a single audio (AUDIO) socket. Wire it into PreviewAudio to listen, or SaveAudio to keep the file - the node's output/audio folder is used for temp files along the way.
Installing it
Easiest route is ComfyUI Manager: search for ComfyUI_SparkTTS and install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/civen-cn/ComfyUI_SparkTTS.git
cd ComfyUI_SparkTTS
pip install -r requirements.txt
Then restart ComfyUI. The model itself pulls down on first run if it's missing.
Common issues
- Import errors on first load. The shipped
requirements.txtonly lists four packages, but the model code actually needstransformers,torchaudio, andsoxr- ComfyUI ships torch and huggingface_hub, not always the rest. If you hit a missing-module error,pip install transformers torchaudio soxrfixes it. - Slow generation. You're on CPU, or the model is still loading. The load is one-time; actual synthesis on a GPU is quick.
- Weak voice cloning. Short, noisy, or multi-speaker reference clips give mush. Give it 3–10 seconds of clean audio with one voice - and remember the prompt_text field won't help you yet.
- The README promises a separate "Voice Control Node" with gender/pitch/speed sliders. It doesn't exist in the shipped code; those controls are stubbed out. Don't hunt for it.
License is Apache-2.0, which is friendly. And since this is zero-shot voice cloning: clone your own voice or get consent - that disclaimer in the README isn't just legal boilerplate.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| ref_audio | AUDIO | — | |
| text | STRING | 你好,这是一段测试文本。 | — |
| prompt_text | STRING | — | |
| model_path | COMBO | Spark-TTS-0.5B | 1 options: Spark-TTS-0.5B |
| device | COMBO | cuda | 2 options: cuda, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |