diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index 8843f376f..f866d867f 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -14,7 +14,6 @@ from fastapi import ( from fastapi.responses import StreamingResponse, JSONResponse, FileResponse from fastapi.middleware.cors import CORSMiddleware -from faster_whisper import WhisperModel from pydantic import BaseModel import uuid @@ -277,6 +276,8 @@ def transcribe( f.close() if app.state.config.STT_ENGINE == "": + from faster_whisper import WhisperModel + whisper_kwargs = { "model_size_or_path": WHISPER_MODEL, "device": whisper_device_type, diff --git a/backend/apps/images/main.py b/backend/apps/images/main.py index 8f1a08e04..24542ee93 100644 --- a/backend/apps/images/main.py +++ b/backend/apps/images/main.py @@ -12,7 +12,6 @@ from fastapi import ( Form, ) from fastapi.middleware.cors import CORSMiddleware -from faster_whisper import WhisperModel from constants import ERROR_MESSAGES from utils.utils import (