你只需要:
https://github.com/wangwangit/tts
Fork
按钮,将项目复制到你的 GitHub 账号注册 Cloudflare 账号
一键部署
获取访问地址
https://your-app.workers.dev
的地址// 基础调用
const response = await fetch('https://your-domain.com/v1/audio/speech', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
input: "你好,这是一个测试",
voice: "zh-CN-XiaoxiaoNeural",
speed: 1.0,
pitch: "0",
style: "general"
})
});
const audioBlob = await response.blob();
# 批量转换文本文件
for file in *.txt; do
curl -X POST "https://your-domain.com/v1/audio/speech" \
-H "Content-Type: application/json" \
-d "{\"input\": \"$(cat $file)\", \"voice\": \"zh-CN-XiaoxiaoNeural\"}" \
--output "${file%.txt}.mp3"
done
![]() |
1
foufoufm 4 天前
想问一下短视频基于影视作品改造语音的那种,是怎么做到的?
|
![]() |
3
NoahBishop 4 天前 via Android
@foufoufm 用 cosyvoice2 本地部署,直接把需要的语气和音色那段参考,效果很好。
|
![]() |
4
foufoufm 4 天前
|
![]() |
5
KFCVIVO50 4 天前
赞
|
6
kneo 4 天前 via Android
你这克隆出来的站点不是都一样吗?专属体现在哪啊?
|
![]() |
7
gaobh 4 天前
@foufoufm #1 https://elevenlabs.io/ 全球最顶尖的语音克隆工具
|
![]() |
8
cat9life 4 天前
这是调用了哪个模型?api
|
9
firegl99 4 天前
直接用的微软的模型,不怕被微软告?
|
![]() |
12
aero99 4 天前
本地搭建过语音克隆工具,又在云端训练模型,最后生成感觉还不是很满意,缺乏情绪,好像目前类似工具的痛点
|
13
Vicissitude 4 天前
为啥只有中文没有英文?
|
14
xialaoban 3 天前
这个声音:这个男人叫小帅
|