Problem
Voice-conditioned generation can silently proceed without voice audio. If loadAudioBlobByKey returns no blob, generation continues without a user-visible warning. addVoice can also return before IndexedDB persistence finishes, creating a race window.
Root Cause
Voice profile metadata and voice audio blob persistence are not treated as an atomic precondition for voice-conditioned generation.
Solution
- Await/confirm audio blob persistence before a voice profile is considered ready.
- Fail voice-conditioned generation with an actionable error if selected voice audio is missing.
- Add recovery UX to re-upload/re-record the missing voice sample.
- Add tests for missing blob and persistence race cases.
Verification
- Add store/service tests for
addVoice persistence completion.
- Add generation tests for missing selected voice audio.
- Add UI test for the user-facing error and recovery path.
Files to Touch
src/store/voiceStore.ts
src/services/generationPipeline.ts
src/services/voiceUploadService.ts
src/components/voice/*
Problem
Voice-conditioned generation can silently proceed without voice audio. If
loadAudioBlobByKeyreturns no blob, generation continues without a user-visible warning.addVoicecan also return before IndexedDB persistence finishes, creating a race window.Root Cause
Voice profile metadata and voice audio blob persistence are not treated as an atomic precondition for voice-conditioned generation.
Solution
Verification
addVoicepersistence completion.Files to Touch
src/store/voiceStore.tssrc/services/generationPipeline.tssrc/services/voiceUploadService.tssrc/components/voice/*