{"record":{"id":"b91ab43eb0b40105","repo":"mudler/LocalAI","slug":"4","errorCode":"4","errorMessage":"[omnivoice-cpp] ERROR: text is required\\n","messagePattern":"\\[omnivoice-cpp\\] ERROR: text is required\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp","lineNumber":137,"sourceCode":"        *out_n = out.n_samples;\n    ov_audio_free(&out);\n    return buf;\n}\n\nint omni_tts_stream(const char *text, const char *lang, const char *instruct,\n                    const float *ref_samples, int ref_n, const char *ref_text,\n                    long long seed, int denoise, omni_pcm_chunk_cb cb,\n                    void *user_data) {\n    if (!g_ctx) {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: model not loaded\\n\");\n        return 1;\n    }\n    if (!cb) {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: stream callback is null\\n\");\n        return 2;\n    }\n    if (!text || text[0] == '\\0') {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: text is required\\n\");\n        return 4;\n    }\n    ov_tts_params tp;\n    fill_params(&tp, text, lang, instruct, ref_samples, ref_n, ref_text, seed,\n                denoise);\n    // ov_audio_chunk_cb has the identical signature to omni_pcm_chunk_cb\n    // (bool vs int return are ABI-compatible; non-zero == true).\n    tp.on_chunk = (ov_audio_chunk_cb)cb;\n    tp.on_chunk_user_data = user_data;\n\n    ov_audio out = {0}; // stays empty in streaming mode\n    enum ov_status rc = ov_synthesize(g_ctx, &tp, &out);\n    ov_audio_free(&out);\n    if (rc != OV_STATUS_OK && rc != OV_STATUS_CANCELLED) {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: stream synth failed (rc=%d): %s\\n\",\n                (int)rc, ov_last_error());\n        return 3;\n    }","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp#L119-L155","documentation":"The omnivoice-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/omnivoice-cpp/cpp/gomnivoicecpp.cpp:137 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 payload includes the text parameter before invoking synthesis."],"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-15T17:31:12.345Z"}