mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 00:53:54 +08:00
update:优化日志对象
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
from config.logger import setup_logging
|
||||
import json
|
||||
import asyncio
|
||||
import time
|
||||
from core.utils.util import get_string_no_punctuation_or_emoji, analyze_emotion
|
||||
|
||||
TAG = __name__
|
||||
logger = setup_logging()
|
||||
|
||||
emoji_map = {
|
||||
"neutral": "😶",
|
||||
@@ -49,10 +47,10 @@ async def sendAudioMessage(conn, audios, text, text_index=0):
|
||||
)
|
||||
|
||||
if text_index == conn.tts_first_text_index:
|
||||
logger.bind(tag=TAG).info(f"发送第一段语音: {text}")
|
||||
conn.logger.bind(tag=TAG).info(f"发送第一段语音: {text}")
|
||||
await send_tts_message(conn, "sentence_start", text)
|
||||
|
||||
is_first_audio = (text_index == conn.tts_first_text_index)
|
||||
is_first_audio = text_index == conn.tts_first_text_index
|
||||
await sendAudio(conn, audios, pre_buffer=is_first_audio)
|
||||
|
||||
await send_tts_message(conn, "sentence_end", text)
|
||||
|
||||
Reference in New Issue
Block a user