A production-ready text-to-speech skill that connects to a local GPT-SoVITS v2 Pro+ API server. Converts Chinese text to natural-sounding speech with a cloned reference voice. Designed for voice response automation, content narration, and AI voice applications.
http://127.0.0.1:9880 (or set GPT_SOVITS_API_URL)axiosComponentFileSizes1s1v3.ckpt148MBs2s2Gv2ProPlus.pth191MBBERTchinese-roberta-wwm-ext-large621MBCNHuBERTchinese-hubert-base180MBSpeaker Verificationpretrained_eres2netv2w24s4ep4.ckpt103MBReference Audioref_audio.wav~10-30s clean recording
bash
cd /path/to/GPT-SoVITS-CPUFast
conda activate GPTSoVits
python api_v2.py -a 127.0.0.1 -p 9880
Place a clean .wav file (10-30 seconds of the target voice) at:
text
voice-clone/ref_audio.wav
js
const tts = require('./skills/voice-clone');
const mp3 = await tts.speak("你好,欢迎使用GPT-SoVITS语音合成。", "output.mp3");
// Returns: "output.mp3"
speak(text, outputPath, opts?)#ParamTypeDefaultDescriptiontextstringrequiredChinese text to synthesizeoutputPathstringrequiredOutput .mp3 file pathopts.topKnumber15Top-K samplingopts.topPnumber0.7Top-P samplingopts.temperaturenumber0.5Sampling temperatureopts.speednumber1.0Speed factoropts.seednumber-1Random seed (-1 = random)
Returns: Promise<string> — path to the generated MP3 file.
VariableDefaultDescriptionGPT_SOVITS_API_URLhttp://127.0.0.1:9880GPT-SoVITS API base URLGPT_SOVITS_API_TIMEOUT300000API request timeout (ms)
This skill is designed to be called from automation workflows:
MIT