June 8Jun 8 What it isOpenAI-compatible Text-to-Speech API powered by CosyVoice 3 (Alibaba FunAudioLLM). State-of-the-art Chinese TTS with 18 dialects, 9 languages, built-in voices, instruction-based control, and zero-shot voice cloning. No bloat — just the model served via FastAPI.Exposes /v1/audio/speech (OpenAI-compatible TTS), /v1/audio/speech/clone (voice cloning), /v1/voices, /docs (Swagger), /healthTemplate detailsApp name: CosyVoice3-APITemplate URL: https://raw.githubusercontent.com/hsiang-han/unraid_templates/main/templates/cosyvoice3-api.xmlIcon URL: https://raw.githubusercontent.com/hsiang-han/unraid_templates/main/assets/cosyvoice3-api-icon.pngProject URL: https://github.com/hsiang-han/CosyVoice3-APISupport URL: https://github.com/hsiang-han/CosyVoice3-API/issuesContainer image strategyRepository (GPU only): ghcr.io/hsiang-han/cosyvoice3-api:latestExtra Parameters: --gpus all --shm-size=2gCUDA 12.8 — supports Blackwell (RTX 5060/5070/5090) and Ada GPUsRequires NVIDIA driver >= 570FeaturesBuilt-in voices: multiple Chinese/English/Japanese/Korean preset voicesInstruction control: guide tone/emotion via text promptZero-shot voice cloning: clone any voice with just 3 seconds of reference audioFP16 inference: ~3-4GB VRAM (default), FP32: ~6-8GB VRAMDefault mappings / settingsPort: 8080Host path: /mnt/user/appdata/cosyvoice3-api/models → /root/.cache/modelscope/hubAPI docs: http://[IP]:[PORT:8080]/docsFirst start downloads model (~2GB), subsequent starts are fastEnvironment variablesMODEL_DIR = FunAudioLLM/Fun-CosyVoice3-0.5B-2512 — ModelScope model IDFP16 = true — Half-precision inference, reduces VRAM by ~50%. Set to false only if you experience quality issues.PORT = 8080 — Internal API server portNVIDIA_VISIBLE_DEVICES = all — GPU selectionUsage # English TTS curl -X POST http://YOUR-UNRAID-IP:8080/v1/audio/speech \ -F "input=Hello world, this is a test" \ -F "voice=English Female" \ --output english.wav # Chinese TTS curl -X POST http://YOUR-UNRAID-IP:8080/v1/audio/speech \ -F "input=你好,世界" \ -F "voice=中文女" \ --output chinese.wav # Instruction control (English) curl -X POST http://YOUR-UNRAID-IP:8080/v1/audio/speech \ -F "input=What a beautiful day" \ -F "voice=English Female" \ -F "instruct_text=Say it happily and energetically" \ --output happy_en.wav # Instruction control (Chinese) curl -X POST http://YOUR-UNRAID-IP:8080/v1/audio/speech \ -F "input=今天天气真好" \ -F "voice=中文女" \ -F "instruct_text=用开心的语气说" \ --output happy_zh.wav # Voice cloning (3s reference audio) curl -X POST http://YOUR-UNRAID-IP:8080/v1/audio/speech/clone \ -F "input=This is the cloned voice" \ -F "prompt_text=Text spoken in the reference audio" \ -F "[email protected]" \ --output cloned.wav # List available voices curl http://YOUR-UNRAID-IP:8080/v1/voicesWorks with any OpenAI-compatible TTS client.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.