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:
xsl
2026-09-02 18:52:17 +08:00
parent 06d86d04e9
commit 3537610130
29 changed files with 77 additions and 57 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Ryan 音色中文发音冒烟测试:决定 simon/rhythm 男声旁白选型。"""
import os
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 numpy as np
import soundfile as sf
@@ -24,9 +24,9 @@ wavs, sr = model.generate_custom_voice(
speaker=["Ryan"] * len(texts),
instruct=["热情活力的中文游戏解说语气,吐字清晰"] * len(texts),
)
os.makedirs("/home/ubuntu/SoundGame/tools/samples", exist_ok=True)
os.makedirs("/home/xsl/SoundGame/tools/samples", exist_ok=True)
for i, wav in enumerate(wavs):
wav = np.asarray(wav, dtype=np.float32)
sf.write(f"/home/ubuntu/SoundGame/tools/samples/ryan_zh_{i}.wav", wav, sr)
sf.write(f"/home/xsl/SoundGame/tools/samples/ryan_zh_{i}.wav", wav, sr)
print(f"ryan_zh_{i}: {len(wav)/sr:.2f}s peak={np.max(np.abs(wav)):.3f}")
print("done")