{"record":{"id":"28830ae77b6227de","repo":"fishaudio/fish-speech","slug":"no-audio-generated-please-check-the-input-text","errorCode":null,"errorMessage":"No audio generated, please check the input text.","messagePattern":"No audio generated, please check the input text\\.","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"tools/server/inference.py","lineNumber":42,"sourceCode":"            case \"error\":\n                raise HTTPException(\n                    HTTPStatus.INTERNAL_SERVER_ERROR,\n                    content=str(result.error),\n                )\n\n            case \"segment\":\n                count += 1\n                if isinstance(result.audio, tuple):\n                    yield (result.audio[1] * AMPLITUDE).astype(np.int16).tobytes()\n\n            case \"final\":\n                count += 1\n                if isinstance(result.audio, tuple):\n                    yield result.audio[1]\n                return None  # Stop the generator\n\n    if count == 0:\n        raise HTTPException(\n            HTTPStatus.INTERNAL_SERVER_ERROR,\n            content=\"No audio generated, please check the input text.\",\n        )\n","sourceCodeStart":24,"sourceCodeEnd":46,"githubUrl":"https://github.com/fishaudio/fish-speech/blob/befe4001745417f8c42131739d862b8a6fdbd15a/tools/server/inference.py#L24-L46","documentation":"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.","triggerScenarios":"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.","commonSituations":"Passing punctuation-only strings; wrong language for the checkpoint; very short inputs the codec drops; silent failures after fine-tuning.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"text = (req.text or \"\").strip()\nif not text or not any(c.isalpha() for c in text):\n    raise ValueError(\"text must contain actual words\")","typeGuard":null,"tryCatchPattern":"if resp.status_code == 500 and \"No audio generated\" in resp.text:\n    text = add_filler(text)  # retry with longer, richer input","preventionTips":["Reject empty/punctuation-only text client-side","Verify language matches the model before calling"],"tags":["api-server","http-500","tts"],"backgroundTag":"empty-model-output","analyzedSha":"befe4001745417f8c42131739d862b8a6fdbd15a","analyzedAt":"2026-08-27T21:31:45.703Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}