mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-07-01 08:15:46 +00:00
This commit includes two related fixes: 1. Model Storage Location Fix: - Models were stored outside persistent volume, causing re-downloads on every container rebuild - Implemented dependency injection for adapter constructors - Adapters now accept envPath parameter instead of hardcoded paths - Added registerAdapters() function in main.go to register adapters after config loads - Removed init() functions from all adapters (whisperx, parakeet, canary, sortformer, pyannote) - Models now persist in /app/data/whisperx-env (inside Docker volume) 2. Parakeet CUDA Error 35 Fix: - Fixed CUDA_ERROR_ILLEGAL_ADDRESS on long audio files (30+ minutes) - Disabled CUDA graphs via change_decoding_strategy() in buffered inference - Fixed buffered script check in PrepareEnvironment() to verify both transcribe.py and transcribe_buffered.py exist - Verified working: 49min audio transcribed in 63sec (47x realtime) Files Modified: - cmd/server/main.go: Added registerAdapters() function - internal/transcription/adapters/whisperx_adapter.go: Constructor accepts envPath, removed init() - internal/transcription/adapters/parakeet_adapter.go: Constructor accepts envPath, removed init(), added CUDA fix and buffered script check - internal/transcription/adapters/canary_adapter.go: Constructor accepts envPath, removed init() - internal/transcription/adapters/sortformer_adapter.go: Constructor accepts envPath, removed init() - internal/transcription/adapters/pyannote_adapter.go: Constructor accepts envPath, removed init()