diff --git a/core/handle/audioHandle.py b/core/handle/audioHandle.py index c4077251d..ac32fff04 100644 --- a/core/handle/audioHandle.py +++ b/core/handle/audioHandle.py @@ -44,20 +44,6 @@ async def handleAudioMessage(conn, audio): conn.asr_audio.clear() conn.reset_vad_states() -async def speechToText(conn): - conn.client_abort = False - conn.asr_server_receive = False - text, file_path = await conn.asr.speech_to_text(conn.asr_audio, conn.session_id) - logger.info(f"识别文本: {text}") - text_len, text_without_punctuation = remove_punctuation_and_length(text) - if text_len <= conn.max_cmd_length and await handleCMDMessage(conn, text_without_punctuation): - return - if text_len > 0: - await startToChat(conn, text) - else: - conn.asr_server_receive = True - conn.asr_audio.clear() - conn.reset_vad_states() async def handleCMDMessage(conn, text): cmd_exit = conn.cmd_exit