-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationstaleThe topic has been ignored for a long timeThe topic has been ignored for a long time
Description
环境 MacBookPro Intel 芯片。
用的是以下代码:
import torch
torch._dynamo.config.cache_size_limit = 64
torch._dynamo.config.suppress_errors = True
torch.set_float32_matmul_precision("high")
import ChatTTS
from tools.logger import get_logger
from tools.normalizer import normalizer_en_nemo_text, normalizer_zh_tn
from IPython.display import Audio
from tools.audio import load_audio
logger = get_logger("ChatTTS", format_root=True)
chat = ChatTTS.Chat(logger)
chat.load(compile=False)
spk_smp = chat.sample_audio_speaker(load_audio("11s.wav", 24000))
print(spk_smp) # save it in order to load the speaker without sample audio next time
params_infer_code = ChatTTS.Chat.InferCodeParams(
spk_smp=spk_smp,
txt_smp="我没读过原著,我也没看过,所以他告诉我只是说,哦我们把一个捕头的角色改成女的,那我觉得",
)
wav = chat.infer(
"四川美食确实以辣闻名。",
params_infer_code=params_infer_code,
)
Audio(wav[0], rate=24_000, autoplay=True)运行以后,开始得到这个报错信息:
[+0800 20250302 23:19:13] [INFO] ChatTTS | core | split text into 1 parts
text: 4%|▍ | 15/384(max) [00:01, 10.80it/s]
[+0800 20250302 23:19:16] [INFO] ChatTTS | core | infer split 0~1
code: 0%| | 0/2048(max) [00:00, ?it/s][+0800 20250302 23:19:17] [WARN] ChatTTS | gpt | unexpected end at index [0]
code: 0%| | 0/2048(max) [00:01, ?it/s]
然后就一直不停的regenerate 了。
一直没有生成成功。
音频大于10s, 声音质量也可以,没有杂声。
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationstaleThe topic has been ignored for a long timeThe topic has been ignored for a long time