Commit graph

14 commits

Author SHA1 Message Date
michael
05bde8326d feat: add Whisper-based pause point refinement for audio descriptions
Implements word-level speech analysis using faster-whisper to refine
AD pause points. Gemini's timestamps are snapped to natural speech gaps
(sentence/phrase boundaries) to prevent pauses mid-word.

Key changes:
- Add WhisperService for transcription and gap detection
- Add dedicated Celery task routed to 'whisper' queue
- Integrate refinement into render_accessible_video task
- Cache Whisper transcripts in MongoDB for reuse across languages
- Add dedicated whisper-worker with concurrency=1 to prevent OOM

Configuration:
- Uses faster-whisper 'base' model (multilingual, ~145MB)
- 5-second search window after Gemini's recommended point
- Falls back to original timestamp if no gap found

Infrastructure:
- New Docker stage: whisper-worker
- New Cloud Run service: accessible-video-whisper-worker
- Updated docker-compose.yml with whisper-worker service

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 08:27:48 -06:00
michael
901083b426 fix: ensure temp files use shared volume with correct permissions
- Modified render_accessible_video.py to explicitly pass TMPDIR to
  tempfile.TemporaryDirectory() so files are created in shared volume
- Updated docker-compose.yml to run containers as root initially,
  chown /shared-tmp to app:app, then switch to app user for celery
- This ensures both worker containers can access the same temp files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 06:15:45 -06:00
michael
c3bc0bd523 fix: add shared volume between worker containers for temp files
The main worker and ffmpeg-worker run in separate containers with
isolated filesystems. Add a shared volume mounted at /shared-tmp
and set TMPDIR so Python's tempfile module uses it. This allows
ffmpeg-worker to access video files created by the main worker.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 06:05:06 -06:00
michael
bf1c321088 feat: add dedicated ffmpeg queue to prevent server overload
Add a dedicated Celery queue (ffmpeg) with concurrency=1 to serialize
all FFmpeg operations. This prevents CPU spikes when multiple render
tasks run in parallel with multiple languages.

Changes:
- Add ffmpeg_operations.py with run_ffmpeg_command and run_ffprobe_command tasks
- Update VideoRendererService to dispatch ffmpeg commands via the queue
- Add ffmpeg-worker service to docker-compose with --concurrency=1
- Configure main worker to exclude the ffmpeg queue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:56:23 -06:00
michael
22e1744f25 suppress verbose MongoDB INFO logs in docker
- Add all logging components with verbosity 0 in mongod.conf
- Add WiredTiger verbose=[] to suppress checkpoint messages
- Add --quiet flag to mongod command
- Change healthcheck from mongosh to TCP port check to avoid
  connection metadata spam every 30s
- Increase healthcheck interval from 30s to 60s

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 11:26:44 -06:00
michael
d4417acd35 env variables for MSAL added to docker compose 2025-10-10 10:32:54 -05:00
michael
2f90da34c9 configured tts key in docker-compose 2025-10-08 18:44:28 -05:00
michael
99b49fbc1e added config for mongodb to reduce log verbosity 2025-10-08 18:34:06 -05:00
michael
7921079446 reduced verbosity of mongodb logs 2025-10-08 18:30:08 -05:00
michael
38e6f37450 fixed overly aggressive security algorithm 2025-10-08 17:49:20 -05:00
michael
aafc4078ae bug fixes for frontend when trying to npm run build 2025-10-08 16:47:14 -05:00
michael
1a1ed3048d wrote docker files and deployment instructions 2025-10-08 16:00:12 -05:00
michael
de61d0bd39 removed mongodb change stream monitoring, added global websockets monitoring for notifications, broke symmetry between toasts and persistent notifications (and refined which notifications get sent and how) 2025-08-25 15:48:18 -05:00
michael
af2562096a initial commit 2025-08-24 16:28:33 -05:00