You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
这是我的代码
``import os
import torch
import torchaudio
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
print("Loading model...")
config = XttsConfig()
config.load_json("/aia-storage/root/liyingjun/TTS/run/training/GPT_XTTS_v2.0_LJSpeech_FT-May-21-2025_06+00PM-dbf1a08a/config.json")
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir='/aia-storage/root/liyingjun/TTS/run/training/XTTS_v2.0_original_model_files', use_deepspeed=True, vocab_path='/aia-storage/root/liyingjun/TTS/run/training/XTTS_v2.0_original_model_files/vocab.json')
model.cuda()
print("Computing speaker latents...")
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(audio_path=["/aia-storage/root/liyingjun/TTS/mix-yinpin/zh-data/wavs/EN_1238_ZH_SZH115.wav"])
print("Inference...")
out = model.inference(
"当然,如果您需要的话,这边帮您准备。",
"zh",
gpt_cond_latent,
speaker_embedding,
temperature=0.7, # Add custom parameters here
)
torchaudio.save("xtts.wav", torch.tensor(out["wav"]).unsqueeze(0), 24000)``
这是我的路径
Beta Was this translation helpful? Give feedback.
All reactions