Skip to content

Fix ValueError in FireRedTTS3Instruct.generate_tts - #5

Open
Talpik wants to merge 1 commit into
FireRedTeam:mainfrom
Talpik:fix/instruct-generate-tts-unpack
Open

Fix ValueError in FireRedTTS3Instruct.generate_tts#5
Talpik wants to merge 1 commit into
FireRedTeam:mainfrom
Talpik:fix/instruct-generate-tts-unpack

Conversation

@Talpik

@Talpik Talpik commented Aug 26, 2026

Copy link
Copy Markdown

Problem

Every call to fireredtts3.core.FireRedTTS3Instruct.generate_tts fails, on any device:

ValueError: not enough values to unpack (expected 3, got 2)

The text-frontend wrapper unpacks three values:

https://github.com/FireRedTeam/FireRedTTS3/blob/main/fireredtts3/core.py#L384

but the backend FireRedTTS3Instruct.generate_tts in fireredtts3/llm/fireredtts3_instruct.py returns only (gen_audio, gen_audio_sr) — which is also the two-value form documented in the README:

gen_audio, gen_audio_sr = instruct.generate_tts(...)

The sibling methods differ genuinely: generate_voice_design and generate_semantic_edit do return a third gen_text (the CoT plan / rewritten text), so only this one call site is wrong.

Repro

from fireredtts3.core import FireRedTTS3Instruct
instruct = FireRedTTS3Instruct("pretrained_models")
instruct.generate_tts(prompt_text=..., prompt_audio=..., prompt_audio_sr=..., text=...)

Fix

Unpack two values. One-line change, no behaviour change elsewhere.

Testing

ICL zero-shot cloning through FireRedTTS3Instruct.generate_tts now completes and produces correct audio; verified together with generate_voice_design, generate_semantic_edit and generate_acoustic_edit, which were already fine.

🤖 Generated with Claude Code

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>
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