ulysses/services
Tatlatat 3885f9fa90
STT: clean temp audio files on transcription failure
STTService._transcribe_local writes the audio to a NamedTemporaryFile
(delete=False) and only unlinks it on the success path, before the except.
If model.transcribe() raises (corrupt audio, model/runtime error, etc.) the
function logs, returns None, and leaves the .webm temp file behind — so
every failed local transcription leaks a file in the system temp dir.

Initialize tmp_path = None up front and move the unlink into a finally
block so the temp file is cleaned up whether transcription succeeds or
raises.

tests/test_stt_leak.py stubs the whisper model to raise during transcribe,
runs _transcribe_local, and asserts it returns None and leaves no new .webm
file in the temp dir. Fails before this change.
2026-06-02 20:43:24 +09:00
..
docs Odysseus v1.0 2026-05-31 23:58:26 +09:00
faces Odysseus v1.0 2026-05-31 23:58:26 +09:00
hwfit Cookbook: fix Windows NVIDIA VRAM detection 2026-06-02 20:32:53 +09:00
memory fix: data integrity — deep-research result parsing + memory-extraction durability (#808) 2026-06-02 11:27:31 +09:00
research fix: data integrity — deep-research result parsing + memory-extraction durability (#808) 2026-06-02 11:27:31 +09:00
search Fix invalidate_search_cache using a key that never matches stored entries (#852) 2026-06-02 10:53:33 +09:00
shell Odysseus v1.0 2026-05-31 23:58:26 +09:00
stt STT: clean temp audio files on transcription failure 2026-06-02 20:43:24 +09:00
tts Honor disabled speech service toggles (#814) 2026-06-02 10:44:39 +09:00
youtube Odysseus v1.0 2026-05-31 23:58:26 +09:00
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00