'commit'
This commit is contained in:
@@ -6,6 +6,11 @@ from datetime import datetime
|
||||
|
||||
from fastapi import APIRouter, Request, File, UploadFile, WebSocket, WebSocketDisconnect
|
||||
from fastapi.responses import JSONResponse
|
||||
from Util.XueBanUtil import get_xueban_response_async
|
||||
from Util.ASRClient import ASRClient
|
||||
from Util.ObsUtil import ObsUploader
|
||||
from Util.TTS_Pipeline import stream_and_split_text, StreamingVolcanoTTS
|
||||
|
||||
|
||||
# 创建路由路由器
|
||||
router = APIRouter(prefix="/api", tags=["学伴"])
|
||||
@@ -13,13 +18,6 @@ router = APIRouter(prefix="/api", tags=["学伴"])
|
||||
# 配置日志
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# 导入学伴工具函数、ASR客户端和OBS上传工具
|
||||
from Util.XueBanUtil import get_xueban_response_async
|
||||
from Util.ASRClient import ASRClient
|
||||
from Util.ObsUtil import ObsUploader
|
||||
# 导入TTS管道
|
||||
from Util.TTS_Pipeline import stream_and_split_text, StreamingVolcanoTTS
|
||||
|
||||
# 保留原有的HTTP接口,用于向后兼容
|
||||
@router.post("/xueban/upload-audio")
|
||||
async def upload_audio(file: UploadFile = File(...)):
|
||||
|
Reference in New Issue
Block a user