mirror of
https://github.com/2noise/ChatTTS.git
synced 2026-08-29 02:10:59 +08:00
optimize(test): log printing
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ from tools.logger import get_logger
|
||||
logger = get_logger("Test #511", lv=logging.WARN)
|
||||
|
||||
chat = ChatTTS.Chat(logger)
|
||||
chat.load(compile=False) # Set to True for better performance
|
||||
chat.load(compile=False, source="huggingface") # Set to True for better performance
|
||||
|
||||
texts = [
|
||||
"的 话 语 音 太 短 了 会 造 成 生 成 音 频 错 误 , 这 是 占 位 占 位 , 老 大 爷 觉 得 车 夫 的 想 法 很 有 道 理 [uv_break]",
|
||||
|
||||
+8
-1
@@ -14,7 +14,7 @@ from tools.logger import get_logger
|
||||
|
||||
logger = get_logger("Test #521", lv=logging.WARN)
|
||||
|
||||
chat = ChatTTS.Chat(logger)
|
||||
chat = ChatTTS.Chat(logger, source="huggingface")
|
||||
chat.load(compile=False) # Set to True for better performance
|
||||
|
||||
texts = [
|
||||
@@ -25,6 +25,12 @@ texts = [
|
||||
gen_result = chat.infer(
|
||||
texts,
|
||||
stream=True,
|
||||
params_refine_text=ChatTTS.Chat.RefineTextParams(
|
||||
show_tqdm=False,
|
||||
),
|
||||
params_infer_code=ChatTTS.Chat.InferCodeParams(
|
||||
show_tqdm=False,
|
||||
)
|
||||
)
|
||||
|
||||
has_finished = [False for _ in range(len(texts))]
|
||||
@@ -40,6 +46,7 @@ for i, result in enumerate(gen_result):
|
||||
continue
|
||||
if not has_finished[j]:
|
||||
has_finished[j] = True
|
||||
logger.warning("iter %d index %d len finished unfully", i, j)
|
||||
else:
|
||||
logger.warning(
|
||||
"stream iter %d index %d returned non-zero wav after finished", i, j
|
||||
|
||||
Reference in New Issue
Block a user