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
importChatTTSimporttorchimporttorchaudiochat=ChatTTS.Chat()
chat.load(compile=False) # Set to True for better performancef=open("../frog-tts/demo/w.text", "r", encoding="utf-8")
texts=f.read().replace('\n', '')
f.close()
wavs=chat.infer(texts)
foriinrange(len(wavs)):
""" In some versions of torchaudio, the first line works but in other versions, so does the second line. """try:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]).unsqueeze(0), 24000)
except:
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]), 24000)
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: