Skip to content

Add real-time progress tracking for audio lesson generation#473

Merged
mircealungu merged 3 commits intomasterfrom
audio-lesson-progress-tracking
Feb 6, 2026
Merged

Add real-time progress tracking for audio lesson generation#473
mircealungu merged 3 commits intomasterfrom
audio-lesson-progress-tracking

Conversation

@mircealungu
Copy link
Member

Summary

  • Adds real-time progress tracking so users can see audio lesson generation progress
  • New database table audio_lesson_generation_progress tracks status per user
  • New API endpoint GET /audio_lesson_generation_progress for frontend polling
  • Progress callback in voice synthesizer reports each segment being synthesized

How it works

  1. When generation starts, a progress record is created
  2. Progress updates for: script generation, each audio segment, combining
  3. Frontend polls the progress endpoint every 1-2 seconds
  4. Shows: "Word 2/3: Synthesizing teacher (5/20)"

Test plan

  • Run migration on dev database
  • Generate an audio lesson while polling the progress endpoint
  • Verify progress updates in real-time
  • Test error handling (progress shows error state)

🤖 Generated with Claude Code

- New model: AudioLessonGenerationProgress tracks generation status
- New endpoint: GET /audio_lesson_generation_progress for polling
- voice_synthesizer: on_progress callback for each audio segment
- daily_lesson_generator: updates progress throughout generation

Progress shows: current word, total words, current segment, total segments,
status (generating_script/synthesizing_audio/combining_audio/done/error)

Frontend can poll every 1-2s to show real-time progress bar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

ArchLens - No architecturally relevant changes to the existing views

mircealungu and others added 2 commits February 6, 2026 10:02
- Add find_active_for_user() to check for in-progress generation
- Return 409 Conflict if user tries to generate while one is in progress
- Simpler than tracking per-language; user must wait for completion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move inline progress update to a proper method on the model
for consistency with other status update methods.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mircealungu mircealungu force-pushed the audio-lesson-progress-tracking branch from 50937bc to 2fc73b6 Compare February 6, 2026 08:14
@mircealungu mircealungu merged commit ba22d61 into master Feb 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant