From 8a10c528e386b46968c3b52cee59d1f91848c402 Mon Sep 17 00:00:00 2001 From: Downupanddownup Date: Wed, 1 May 2024 01:49:37 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ref_Audio_Selector/tool/audio_inference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Ref_Audio_Selector/tool/audio_inference.py b/Ref_Audio_Selector/tool/audio_inference.py index 885d046..b056021 100644 --- a/Ref_Audio_Selector/tool/audio_inference.py +++ b/Ref_Audio_Selector/tool/audio_inference.py @@ -185,8 +185,9 @@ def generate_audio_files_for_emotion_group(url_composer, text_list, emotion_list end_time = time.perf_counter() # 获取计时终点 elapsed_time = end_time - start_time # 计算执行耗时 # 记录日志内容 - log_message = f"进程ID: {os.getpid()}, generate_audio_files_for_emotion_group 执行耗时: {elapsed_time:.6f} 秒;推理数量: {has_generated_count}; 字符总数:{all_text_count};每秒推理字符数:{all_text_count / elapsed_time:.3f};" + log_message = f"进程ID: {os.getpid()}, generate_audio_files_for_emotion_group 执行耗时: {elapsed_time:.6f} 秒;推理数量: {has_generated_count}; 字符总数:{all_text_count};每秒推理字符数:{all_text_count*len(emotion_list) / elapsed_time:.3f};" p_logger.info(log_message) + logger.info(log_message) def inference_audio_from_api(url):