diff --git a/backend/apps/audio/main.py b/backend/apps/audio/main.py index 2bee38c5a..addaf4b76 100644 --- a/backend/apps/audio/main.py +++ b/backend/apps/audio/main.py @@ -41,8 +41,8 @@ from config import ( WHISPER_MODEL_DIR, WHISPER_MODEL_AUTO_UPDATE, DEVICE_TYPE, - OPENAI_API_BASE_URL, - OPENAI_API_KEY, + AUDIO_OPENAI_API_BASE_URL, + AUDIO_OPENAI_API_KEY, ) log = logging.getLogger(__name__) @@ -58,8 +58,8 @@ app.add_middleware( ) -app.state.OPENAI_API_BASE_URL = OPENAI_API_BASE_URL -app.state.OPENAI_API_KEY = OPENAI_API_KEY +app.state.OPENAI_API_BASE_URL = AUDIO_OPENAI_API_BASE_URL +app.state.OPENAI_API_KEY = AUDIO_OPENAI_API_KEY # setting device type for whisper model whisper_device_type = DEVICE_TYPE if DEVICE_TYPE and DEVICE_TYPE == "cuda" else "cpu" diff --git a/backend/config.py b/backend/config.py index 4c41542c2..6ca2c67bf 100644 --- a/backend/config.py +++ b/backend/config.py @@ -477,3 +477,11 @@ ENABLE_IMAGE_GENERATION = ( ) AUTOMATIC1111_BASE_URL = os.getenv("AUTOMATIC1111_BASE_URL", "") COMFYUI_BASE_URL = os.getenv("COMFYUI_BASE_URL", "") + + +#################################### +# Audio +#################################### + +AUDIO_OPENAI_API_BASE_URL = os.getenv("AUDIO_OPENAI_API_BASE_URL", OPENAI_API_BASE_URL) +AUDIO_OPENAI_API_KEY = os.getenv("AUDIO_OPENAI_API_KEY", OPENAI_API_KEY)