liumaolin
commited on
Commit
·
8486c53
1
Parent(s):
7cddb77
修复`PerformanceLogMixin`中的调试模式检查逻辑
Browse files- 修改`log_task_performance`和`log_task_user_question`方法中的调试模式检查,确保在非调试模式下也能正确记录任务性能信息。
src/voice_dialogue/services/mixins.py
CHANGED
|
@@ -62,7 +62,7 @@ class PerformanceLogMixin:
|
|
| 62 |
|
| 63 |
def log_task_performance(self, voice_task: VoiceTask, task_name: str = "任务"):
|
| 64 |
"""记录ASR, LLM, TTS各阶段耗时和音频长度"""
|
| 65 |
-
if is_debug_mode():
|
| 66 |
return
|
| 67 |
|
| 68 |
try:
|
|
@@ -94,7 +94,7 @@ class PerformanceLogMixin:
|
|
| 94 |
logger.error(f"记录任务性能信息时出错: {e}")
|
| 95 |
|
| 96 |
def log_task_user_question(self, voice_task: VoiceTask):
|
| 97 |
-
if is_debug_mode():
|
| 98 |
return
|
| 99 |
|
| 100 |
from voice_dialogue.config.paths import PROJECT_ROOT
|
|
|
|
| 62 |
|
| 63 |
def log_task_performance(self, voice_task: VoiceTask, task_name: str = "任务"):
|
| 64 |
"""记录ASR, LLM, TTS各阶段耗时和音频长度"""
|
| 65 |
+
if not is_debug_mode():
|
| 66 |
return
|
| 67 |
|
| 68 |
try:
|
|
|
|
| 94 |
logger.error(f"记录任务性能信息时出错: {e}")
|
| 95 |
|
| 96 |
def log_task_user_question(self, voice_task: VoiceTask):
|
| 97 |
+
if not is_debug_mode():
|
| 98 |
return
|
| 99 |
|
| 100 |
from voice_dialogue.config.paths import PROJECT_ROOT
|