fix(deploy): reduce backend worker footprint

This commit is contained in:
ZL-Q
2026-04-29 21:28:21 +08:00
parent b17862bff7
commit 203cdd9330
15 changed files with 136 additions and 74 deletions
+3 -3
View File
@@ -3,9 +3,6 @@ from __future__ import annotations
import asyncio
from typing import Any
import dashscope
from dashscope.audio.asr import Recognition, RecognitionCallback
from core.config.settings import config
from core.logging import get_logger
@@ -28,6 +25,9 @@ class AsrService:
async def transcribe_file(self, file_path: str, filename: str) -> str:
try:
import dashscope
from dashscope.audio.asr import Recognition, RecognitionCallback
dashscope.api_key = self._get_api_key()
loop = asyncio.get_event_loop()