{"record":{"id":"5447c14c936090f1","repo":"mudler/LocalAI","slug":"4-5447c1","errorCode":"4","errorMessage":"[qwen3-tts-cpp] ERROR: text is required\\n","messagePattern":"\\[qwen3-tts-cpp\\] ERROR: text is required\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/qwen3-tts-cpp/cpp/goqwen3ttscpp.cpp","lineNumber":155,"sourceCode":"    qt_audio_free(&out);\n    return buf;\n}\n\nint qt3_tts_stream(const char *text, const char *lang, const char *instruct,\n                   const char *speaker, const float *ref_samples, int ref_n,\n                   const char *ref_text, long long seed, float temperature,\n                   int top_k, float top_p, float repetition_penalty,\n                   int max_new_tokens, qt3_chunk_cb cb, void *user_data) {\n    if (!g_ctx) {\n        fprintf(stderr, \"[qwen3-tts-cpp] ERROR: model not loaded\\n\");\n        return 1;\n    }\n    if (!cb) {\n        fprintf(stderr, \"[qwen3-tts-cpp] ERROR: stream callback is null\\n\");\n        return 2;\n    }\n    if (!text || text[0] == '\\0') {\n        fprintf(stderr, \"[qwen3-tts-cpp] ERROR: text is required\\n\");\n        return 4;\n    }\n    qt_tts_params tp;\n    fill_params(&tp, text, lang, instruct, speaker, ref_samples, ref_n,\n                ref_text, seed, temperature, top_k, top_p, repetition_penalty,\n                max_new_tokens);\n    // qt_audio_chunk_cb has the identical signature to qt3_chunk_cb\n    // (bool vs int return are ABI-compatible; non-zero == true).\n    tp.on_chunk = (qt_audio_chunk_cb)cb;\n    tp.on_chunk_user_data = user_data;\n\n    qt_audio out = {0}; // stays empty in streaming mode\n    enum qt_status rc = qt_synthesize(g_ctx, &tp, &out);\n    qt_audio_free(&out);\n    if (rc != QT_STATUS_OK && rc != QT_STATUS_CANCELLED) {\n        fprintf(stderr, \"[qwen3-tts-cpp] ERROR: stream synth failed (rc=%d): %s\\n\",\n                (int)rc, qt_last_error());\n        return 3;","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/qwen3-tts-cpp/cpp/goqwen3ttscpp.cpp#L137-L173","documentation":"The qwen3-tts-cpp backend received a synthesis request with an empty text field. Guard: validate the request text is non-empty before calling into the shim; trim whitespace and reject empty payloads at the gRPC handler.","triggerScenarios":"Thrown at backend/go/qwen3-tts-cpp/cpp/goqwen3ttscpp.cpp:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty text field in the TTS request.","Ensure the request includes the text parameter."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}