From 1474bf1c7dfef14fcb62bd4111163e131d53a62f Mon Sep 17 00:00:00 2001 From: mARTin-B78 Date: Fri, 29 May 2026 14:57:06 +0200 Subject: [PATCH] Fix ImportError: _AUDIO_EXTS imported from wrong module in routes/stt.py _AUDIO_EXTS lives in core.voice, not core.audio. The dead alias '_VOICE_AUDIO_EXTS' was never used anywhere in the file. Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 6 ++++++ routes/stt.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4cab7e..e9b8bc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,12 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi ### Fixed +- **`ImportError: cannot import name '_AUDIO_EXTS' from 'core.audio'`** — + `routes/stt.py` had a dead alias `from core.audio import _to_wav_16k, _AUDIO_EXTS as _VOICE_AUDIO_EXTS`; + `_AUDIO_EXTS` lives in `core.voice`, not `core.audio`. Removed the + wrong import; `_AUDIO_EXTS` is already correctly imported from `core.voice` + on the next line and the unused alias was never referenced in the file. + - **`No module named 'core'` on container restart** — `docker restart` reuses the old container configuration and never applies new volume mounts from `docker-compose.yml`. Added a comment to `portainer-stack.yml` and updated diff --git a/routes/stt.py b/routes/stt.py index d20c8a4..9b7a227 100644 --- a/routes/stt.py +++ b/routes/stt.py @@ -17,7 +17,7 @@ from core.constants import ( ) from core.registry import _registry_get, TEMP_DIR from core.validation import _validate_http_url, _copy_limited -from core.audio import _to_wav_16k, _AUDIO_EXTS as _VOICE_AUDIO_EXTS +from core.audio import _to_wav_16k from core.voice import _AUDIO_EXTS, _UPLOAD_EXTS router = APIRouter()