mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
Update asr.py
This commit is contained in:
parent
caa7352028
commit
5aae567ec3
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue