git clone https://github.com/airacle-ai/xiaolu-homepage.git cd xiaolu-homepage/ai-drama-voice-library/python pip install -r requirements.txt
cd .. cp .env.example .env # 编辑 .env,填入 VOLC_TTS_API_KEY
按角色名(自动套用预设参数):
python python/tts_client.py --character 苏棠 python python/tts_client.py --character 林晚 --text "奶奶,我找到了。"
按音色 ID:
python python/tts_client.py --voice S_uxrEEuK42 --text "哎哟喂!"
批量为所有角色生成样例(7 个音频文件):
python python/tts_client.py --batch
from python.tts_client import synthesize_character
out = synthesize_character("林晚", text="奶奶,我找到了。")
print(out) # samples/S_vBsEEuK42_林晚.mp3
.env 已加入 .gitignore,永远不提交真实 Key。生成的音频文件也不入版本库。