Fix TTS voice being ignored/inconsistent in read-aloud and video export - #189
Merged
Merged
Conversation
Three related bugs caused a chosen fal.ai voice (e.g. "Rex") to be silently replaced: - AI Assistant read-aloud and voice mode called useTextToSpeech() without a voice, so any fal.ai fallback used the hardcoded default voice instead of the one configured in Settings -> Speech. - The article-to-video renderer never forwarded the selected voice at all, so every export used the current model's first listed voice. - Article-to-video narration re-resolved the "auto" Deepgram/fal.ai provider choice per chunk, so a single transient Deepgram failure mid-render silently swapped just that chunk to fal.ai's voice, producing a video whose narrator changes partway through. The provider is now resolved once per render job and pinned for every chunk, so a failure now fails the render instead of mixing voices. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R54PjuaaN6QnvxVCcxiuVs
davior
marked this pull request as ready for review
September 12, 2026 13:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the reported bug: setting the read-aloud voice to "Rex" (a fal.ai voice) did not take effect in AI Assistant read-aloud or in MP4 export, and some rendered videos changed voice partway through.
Three separate root causes:
AIConversationPanel.tsxanduseVoiceMode.tsboth calleduseTextToSpeech()with nomodeloption. When the fal.ai fallback path is used, the frontend defaults an unset voice to the hardcodedDEFAULT_TTS_VOICE("Aria") instead of the user's configured voice. Fixed by passing the settings store's currentvoicethrough, matching howEditorView.tsxandSpeechSettings.tsxalready do it._tts_callernever passed the user's selected voice intosynthesize_tts_bytesat all, so the fal.ai path always fell back to the current TTS model's first listed voice — never the user's actual choice. Addedload_selected_voice()to read the per-user voice setting and pass it through for every render.Test plan
_fal_tts,synthesize_tts_bytes) and confirmed the newvoice/provider_overrideplumbing is used consistently by the render worker.useTextToSpeech,useVoiceMode,AIConversationPanel) to confirm the selected voice is now threaded through everywhereuseTextToSpeechis instantiated.fal_client,pydantic, frontendnode_modules) aren't installed, so this couldn't be exercised end-to-end. Please verify manually before merging.🤖 Generated with Claude Code
https://claude.ai/code/session_01R54PjuaaN6QnvxVCcxiuVs
Generated by Claude Code