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):