Replace get_stdout() with SAFE_STDOUT

This commit is contained in:
litagin02
2023-12-30 18:45:04 +09:00
parent 6e8bcc2219
commit a9652979cc
10 changed files with 24 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ import commons
import utils
from config import config
from text import cleaned_text_to_sequence, get_bert
from tools.stdout_wrapper import get_stdout
from tools.stdout_wrapper import SAFE_STDOUT
def process_line(x):
@@ -76,7 +76,7 @@ if __name__ == "__main__":
for _ in tqdm(
pool.imap_unordered(process_line, zip(lines, add_blank)),
total=len(lines),
file=get_stdout(),
file=SAFE_STDOUT,
):
# 这里是缩进的代码块,表示循环体
pass # 使用pass语句作为占位符