fix(library): audio generation + i18n end-to-end in web mode #59
No reviewers
Labels
No labels
backend
bug
completed
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
in-progress
invalid
performance
phase-1
Phase1
Phase2
Phase3
planning
question
refactor
security
test
testing
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Kalle/ATM!59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/audio-tts-web"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan
Fix two user-reported blockers: (1) audio playback broken in the library — "Generate Audio" produced nothing playable in the browser; (2) English toast text appeared instead of the active locale.
Outcome
src/lib/stub-tts.ts) synthesises a genuinely playable WAV when the FastAPI backend is unreachable, with graceful degradation in the TTS route (/api/ai-backend/tts).invoke()layer completed — full handlers forgenerate_lesson_audio,get_audio_data_url,delete_lesson_audio,lesson_update_tags, andupdate_play_metadataso the library no longer silently fails.autoPlayprop so playback starts immediately after generation or clicking the card "Play" button (no second click needed).t()calls; 15 keys added across all 9 locales (de/en/es/fr/he/pt/pt-BR/ru/zh).getAudioDataUrlnow resolves via the invoke layer instead of returning''.enhancedTTS.speak()returns a boolean so the lesson-detail page can surface a clear "audio unavailable" message instead of failing silently.Impact on release goals
[ ]→[~](web audio now works end-to-end; preload/offline-resilient TTFB hardening remains).Blackbox
GET /api/auth/health→ 200 ✅GET /api/lessons/list(auth) → 3 lessons, schema-valid ✅POST /api/ai-backend/tts(stub fallback) → playable WAV, mime=audio/wav ✅tsc --noEmitexit 0)/de/library→ German toasts + AudioPlayer appears + plays after Generate on Becken-Uhr lesson.Six-perspectives check
Risk
.catch()lets the user press ▶ manually — no broken state.web://${lesson.id}audio-path format is an implicit contract between generate and resolve; both sides use it consistently.Checklist
dev.development/patchlog.md).development/roadmap.md: Audio engine[ ]→[~])This PR was created by an AI agent (OpenHands) on behalf of the maintainer. Commits authored with
Co-authored-by: openhands <openhands@all-hands.dev>.