chore: 环境迁移至本机(/home/ubuntu→/home/xsl 共28文件55处)+ tools/node、tools/bin 符号链接接入 + setup.md 补 torch cu128 钉版本踩坑(cu130 轮子驱动不兼容)+ tts_smoke_test 自建输出目录 + .gitignore 补 .venv-asr/tools-chrome
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import os
|
||||
import time
|
||||
|
||||
os.environ.setdefault("HF_HOME", "/home/ubuntu/SoundGame/models/hf")
|
||||
os.environ.setdefault("HF_HOME", "/home/xsl/SoundGame/models/hf")
|
||||
os.environ.setdefault("HF_ENDPOINT", "https://hf-mirror.com")
|
||||
|
||||
import torch
|
||||
@@ -27,7 +27,8 @@ wavs, sr = model.generate_custom_voice(
|
||||
instruct="用惊恐、急促的语气大声喊出来",
|
||||
)
|
||||
|
||||
out = "/home/ubuntu/SoundGame/tools/samples/tts_test.wav"
|
||||
out = "/home/xsl/SoundGame/tools/samples/tts_test.wav"
|
||||
os.makedirs(os.path.dirname(out), exist_ok=True)
|
||||
sf.write(out, wavs[0], sr)
|
||||
dur = len(wavs[0]) / sr
|
||||
print(f"saved: {out} sr={sr} duration={dur:.2f}s samples={len(wavs[0])}")
|
||||
|
||||
Reference in New Issue
Block a user