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 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-05-29 14:57:06 +02:00
parent 28b1b73184
commit 1474bf1c7d
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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()