|
|
|
@ -1,5 +1,11 @@
|
|
|
|
|
1、ASR
|
|
|
|
|
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32-server\main\xiaozhi-server\core\handle\receiveAudioHandle.py
|
|
|
|
|
|
|
|
|
|
在第12行,大约这个位置下断点,可以跟踪到流程
|
|
|
|
|
async def handleAudioMessage(conn, audio):
|
|
|
|
|
if not conn.asr_server_receive:
|
|
|
|
|
|
|
|
|
|
某些场景下,在38行下断点可以拦截到内容
|
|
|
|
|
if conn.client_voice_stop:
|
|
|
|
|
conn.client_abort = False
|
|
|
|
|
conn.asr_server_receive = False
|
|
|
|
@ -10,4 +16,11 @@ D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32-server\main\xiaozhi-server\core\handle\
|
|
|
|
|
text, file_path = await conn.asr.speech_to_text(
|
|
|
|
|
conn.asr_audio, conn.session_id
|
|
|
|
|
)
|
|
|
|
|
约第38行
|
|
|
|
|
|
|
|
|
|
跟踪进入
|
|
|
|
|
D:\dsWork\QingLong\XiaoZhi\xiaozhi-esp32-server\main\xiaozhi-server\core\providers\asr\fun_local.py
|
|
|
|
|
76行
|
|
|
|
|
async def speech_to_text(self, opus_data: List[bytes], session_id: str) -> Tuple[Optional[str], Optional[str]]:
|
|
|
|
|
"""语音转文本主处理逻辑"""
|
|
|
|
|
file_path = None
|
|
|
|
|
try:
|
|
|
|
|