lenML / Speech-AI-Forge

🍦 Speech-AI-Forge is a project developed around TTS generation model, implementing an API Server and a Gradio-based WebUI.
https://huggingface.co/spaces/lenML/ChatTTS-Forge
GNU Affero General Public License v3.0
711 stars 87 forks source link

如何控制音频的语速 #14

Closed matyhtf closed 4 months ago

matyhtf commented 4 months ago

默认生成的音频,语速较快,是否可以通过参数来调整语速?

zhzLuke96 commented 4 months ago

简单说有两个方法,prompt,或者调用api使用原始的音频加速,具体看你要用在哪

  1. 使用prompt调整语速: 如果你在使用 webui 入口,在tts tab左下角有 Prompt engineering 模块 你可以在 prefix 栏填入 [speed_5] 以调整语速,最高 [speed_9] 最低 [speed_0] 没有写的话模型以文本内容自行推断也可能是随机 (虽然即使写了 prefix 也有可能不会变快,但是大概率是会有效果)

  2. 调用接口 具体部署之后看 /docs 下,有 speed 参数的接口都可以调整 当然,调用接口也可以写 prefix