I found that there was a problem with the word order of the text generated by ChatTTS, and when I generated the sound, the next few words/Chinese characters would be recited at the beginning
Code info:
import ChatTTS
import torch
import torchaudio
chat = ChatTTS.Chat()
chat.load(source='local',force_redownload=False,compile=False,custom_path=r"asset/GPT.pt",device=torch.device("cuda:0"),coef=None) # Set to True for better performance
texts = [" I am happy to join with you today in what will go down in history as the greatest demonstration for freedom in the history of our nation."]
wavs = chat.infer(texts)
for i in range(len(wavs)):
torchaudio.save(f"basic_output{i}.wav", torch.from_numpy(wavs[i]).unsqueeze(0), 22000)
I found that there was a problem with the word order of the text generated by ChatTTS, and when I generated the sound, the next few words/Chinese characters would be recited at the beginning
Code info: