mirror of
https://github.com/mblanke/StrikePackageGPT.git
synced 2026-03-01 14:20:21 -05:00
Final code quality improvements: fix error handling and memory management
Co-authored-by: mblanke <9078342+mblanke@users.noreply.github.com>
This commit is contained in:
@@ -91,8 +91,8 @@ def _transcribe_with_local_whisper(audio_data: bytes, format: str) -> Dict[str,
|
||||
# Clean up temp file
|
||||
try:
|
||||
os.unlink(temp_audio_path)
|
||||
except:
|
||||
pass
|
||||
except (OSError, FileNotFoundError) as e:
|
||||
print(f"Warning: Could not delete temp file: {e}")
|
||||
|
||||
except ImportError:
|
||||
raise Exception("Whisper not installed. Install with: pip install openai-whisper")
|
||||
|
||||
Reference in New Issue
Block a user