Diffusion-based text-to-speech with zero-shot voice cloning, built on LongCat-AudioDiT from Meituan.
| Setting | Default | Description |
|---|---|---|
| Model | 1B | Choose 1B (faster, less VRAM) or 3.5B (better quality) |
| Guidance Method | APG | apg (adaptive projection) or cfg (classifier-free) |
| Steps | 16 | Diffusion steps — more = better quality, slower |
| Guidance Strength | 4.0 | How strongly the model follows text conditioning |
| Seed | 1024 | Random seed for reproducibility |
Set GROQ_API_KEY as an environment variable for fast cloud-based transcription. Without it, the app falls back to local faster-whisper (slower but works offline).
import requests
# Voice cloning
with open("reference.wav", "rb") as f:
ref_audio = f.read()
response = requests.post("http://localhost:7860/api/generate", json={
"text": "The new line I want spoken",
"ref_audio": "<base64 encoded audio>",
"ref_transcript": "What the reference clip says",
"model_id": "meituan-longcat/LongCat-AudioDiT-1B",
"guidance_method": "apg",
"steps": 16,
"strength": 4.0,
"seed": 1024
})
const response = await fetch("http://localhost:7860/api/generate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: "The new line I want spoken",
model_id: "meituan-longcat/LongCat-AudioDiT-1B",
guidance_method: "apg",
steps: 16,
strength: 4.0,
seed: 1024
})
});
curl -X POST http://localhost:7860/api/generate \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "model_id": "meituan-longcat/LongCat-AudioDiT-1B", "guidance_method": "apg", "steps": 16, "strength": 4.0, "seed": 1024}'
Python
61.2%
JavaScript
38.8%
Diffusion-based text-to-speech with zero-shot voice cloning, built on LongCat-AudioDiT from Meituan.
| Setting | Default | Description |
|---|---|---|
| Model | 1B | Choose 1B (faster, less VRAM) or 3.5B (better quality) |
| Guidance Method | APG | apg (adaptive projection) or cfg (classifier-free) |
| Steps | 16 | Diffusion steps — more = better quality, slower |
| Guidance Strength | 4.0 | How strongly the model follows text conditioning |
| Seed | 1024 | Random seed for reproducibility |
Set GROQ_API_KEY as an environment variable for fast cloud-based transcription. Without it, the app falls back to local faster-whisper (slower but works offline).
import requests
# Voice cloning
with open("reference.wav", "rb") as f:
ref_audio = f.read()
response = requests.post("http://localhost:7860/api/generate", json={
"text": "The new line I want spoken",
"ref_audio": "<base64 encoded audio>",
"ref_transcript": "What the reference clip says",
"model_id": "meituan-longcat/LongCat-AudioDiT-1B",
"guidance_method": "apg",
"steps": 16,
"strength": 4.0,
"seed": 1024
})
const response = await fetch("http://localhost:7860/api/generate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
text: "The new line I want spoken",
model_id: "meituan-longcat/LongCat-AudioDiT-1B",
guidance_method: "apg",
steps: 16,
strength: 4.0,
seed: 1024
})
});
curl -X POST http://localhost:7860/api/generate \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "model_id": "meituan-longcat/LongCat-AudioDiT-1B", "guidance_method": "apg", "steps": 16, "strength": 4.0, "seed": 1024}'
Python
61.2%
JavaScript
38.8%