From 5aae567ec35a9bb4fd1d909eb61e862bb3b3f51c Mon Sep 17 00:00:00 2001 From: Chris <119588753+Chris-websketch@users.noreply.github.com> Date: Tue, 18 Feb 2025 11:33:29 +0800 Subject: [PATCH] Update asr.py --- core/utils/asr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/utils/asr.py b/core/utils/asr.py index 1c23fe551..aa734e0cc 100644 --- a/core/utils/asr.py +++ b/core/utils/asr.py @@ -9,6 +9,7 @@ import uuid import opuslib from funasr import AutoModel from funasr.utils.postprocess_utils import rich_transcription_postprocess +from core.utils.performance_monitor import track_performance TAG = __name__ logger = setup_logging() @@ -65,6 +66,7 @@ class FunASR(ASR): return file_path + @track_performance("ASR") def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]: """语音转文本主处理逻辑""" file_path = None