本地适配的部分,包括重新配置gpt/sovits模型,重新配置config等

This commit is contained in:
Karyl01 2025-05-09 16:49:23 +08:00
parent 13055fa569
commit e270178100
6 changed files with 27 additions and 0 deletions

BIN
Arona_Academy_In_2.ogg.wav Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
878b3caf4d1cd7c2927c26e85072a2f5

View File

@ -15,6 +15,8 @@ cnhubert_path = "GPT_SoVITS/pretrained_models/chinese-hubert-base"
bert_path = "GPT_SoVITS/pretrained_models/chinese-roberta-wwm-ext-large"
pretrained_sovits_path = "GPT_SoVITS/pretrained_models/s2G488k.pth"
pretrained_gpt_path = "GPT_SoVITS/pretrained_models/s1bert25hz-2kh-longer-epoch=68e-step=50232.ckpt"
# pretrained_sovits_path = "GPT_SoVITS/pretrained_models/Aris_e16_s272.pth.pth"
# pretrained_gpt_path = "GPT_SoVITS/pretrained_models/Aris_e15.ckpt"
exp_root = "logs"
python_exec = sys.executable or "python"

BIN
output.wav Normal file

Binary file not shown.

24
test.py Normal file
View File

@ -0,0 +1,24 @@
import requests
# API地址本地运行时
url = "http://127.0.0.1:9880"
# 请求体
payload = {
"refer_wav_path": "Arona_Academy_In_2.ogg.wav", # 替换为你的参考音频路径
"prompt_text": "様々な授業やイベントが準備されているので、ご希望のスケジュールを選んでください!", # 参考音频中的文字
"prompt_language": "ja", # 语言
"text": "你好。你好。你好。你好。你好。你好。你好。你好。你好。你好。你好。",
"text_language": "zh"
}
# 发送 POST 请求
response = requests.post(url, json=payload)
# 检查返回
if response.status_code == 200:
with open("output.wav", "wb") as f:
f.write(response.content)
print("生成成功,保存为 output.wav")
else:
print(f"生成失败: {response.status_code}, 返回信息: {response.text}")