fishaudio/fish-speech · error · HTTPException
No audio generated, please check the input text.
Error message
No audio generated, please check the input text.
What it means
After consuming the whole result stream, if zero audio segments were yielded the wrapper raises HTTP 500 'No audio generated...'. This means inference ran but produced no audible output, typically because the text produced no valid tokens.
Source
Thrown at tools/server/inference.py:42
case "error":
raise HTTPException(
HTTPStatus.INTERNAL_SERVER_ERROR,
content=str(result.error),
)
case "segment":
count += 1
if isinstance(result.audio, tuple):
yield (result.audio[1] * AMPLITUDE).astype(np.int16).tobytes()
case "final":
count += 1
if isinstance(result.audio, tuple):
yield result.audio[1]
return None # Stop the generator
if count == 0:
raise HTTPException(
HTTPStatus.INTERNAL_SERVER_ERROR,
content="No audio generated, please check the input text.",
)
View on GitHub (pinned to befe400174)
Solutions
- Check the request text is non-empty and contains real words
- Use a model/checkpoint matching the input language
- Try the same text via the CLI to see model-side logs; slightly lengthen the input
Defensive patterns
Strategy: validation
Validate before calling
text = (req.text or "").strip()
if not text or not any(c.isalpha() for c in text):
raise ValueError("text must contain actual words") Try / catch
if resp.status_code == 500 and "No audio generated" in resp.text:
text = add_filler(text) # retry with longer, richer input Prevention
- Reject empty/punctuation-only text client-side
- Verify language matches the model before calling
When it happens
Trigger: Sending empty/whitespace text, text in a language the model can't handle, or content that tokenizes to nothing usable — the stream completes without any 'segment' result.
Common situations: Passing punctuation-only strings; wrong language for the checkpoint; very short inputs the codec drops; silent failures after fine-tuning.
Related errors
- {str(result.error)}
- Failed to encode audio
- Failed to decode tokens to audio
- Invalid token
- Unsupported Media Type
AI-assisted analysis of fishaudio/fish-speech@befe400174 (2026-08-27).
Data as JSON: /api/errors/28830ae77b6227de.
Report an issue: GitHub.