feat: 部分语音聊天功能
This commit is contained in:
@@ -5,7 +5,6 @@ from aip import AipSpeech
|
||||
from app.constants.asr import APP_ID, API_KEY, SECRET_KEY
|
||||
import json
|
||||
|
||||
# 导入修改后的TTS模块
|
||||
from . import tts
|
||||
|
||||
router = APIRouter()
|
||||
@@ -62,7 +61,7 @@ async def websocket_online_count(websocket: WebSocket):
|
||||
await websocket.send_json({"type": "asr_result", "result": asr_text})
|
||||
temp_buffer = bytes()
|
||||
|
||||
# 修改:TTS处理支持消息ID
|
||||
# TTS处理
|
||||
elif msg_type == "tts_text":
|
||||
message_id = data.get("messageId")
|
||||
text = data.get("text", "")
|
||||
|
||||
Reference in New Issue
Block a user