Fix ValueError in FireRedTTS3Instruct.generate_tts - #5
Open
Talpik wants to merge 1 commit into
Open
Conversation
The text-frontend wrapper unpacked three values from the backend
generate_tts, which returns only (gen_audio, gen_audio_sr) — matching the
two-value form documented in the README. Every call to
fireredtts3.core.FireRedTTS3Instruct.generate_tts therefore raised
ValueError: not enough values to unpack (expected 3, got 2)
regardless of device.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 26, 2026
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.
Problem
Every call to
fireredtts3.core.FireRedTTS3Instruct.generate_ttsfails, on any device:The text-frontend wrapper unpacks three values:
https://github.com/FireRedTeam/FireRedTTS3/blob/main/fireredtts3/core.py#L384
but the backend
FireRedTTS3Instruct.generate_ttsinfireredtts3/llm/fireredtts3_instruct.pyreturns only(gen_audio, gen_audio_sr)— which is also the two-value form documented in the README:The sibling methods differ genuinely:
generate_voice_designandgenerate_semantic_editdo return a thirdgen_text(the CoT plan / rewritten text), so only this one call site is wrong.Repro
Fix
Unpack two values. One-line change, no behaviour change elsewhere.
Testing
ICL zero-shot cloning through
FireRedTTS3Instruct.generate_ttsnow completes and produces correct audio; verified together withgenerate_voice_design,generate_semantic_editandgenerate_acoustic_edit, which were already fine.🤖 Generated with Claude Code