{"record":{"id":"6c45769de87fac2f","repo":"mudler/LocalAI","slug":"2","errorCode":"2","errorMessage":"[omnivoice-cpp] ERROR: codec_path is required\\n","messagePattern":"\\[omnivoice-cpp\\] ERROR: codec_path is required\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp","lineNumber":37,"sourceCode":"    case GGML_LOG_LEVEL_WARN:  lvl = \"WARN\";  break;\n    case GGML_LOG_LEVEL_ERROR: lvl = \"ERROR\"; break;\n    default: break;\n    }\n    fprintf(stderr, \"[%-5s] %s\", lvl, log);\n    fflush(stderr);\n}\n\nint omni_load(const char *model_path, const char *codec_path, int use_fa,\n              int clamp_fp16) {\n    ggml_log_set(ggml_log_cb, nullptr);\n    ggml_backend_load_all();\n\n    if (!model_path || model_path[0] == '\\0') {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: model_path is required\\n\");\n        return 1;\n    }\n    if (!codec_path || codec_path[0] == '\\0') {\n        fprintf(stderr, \"[omnivoice-cpp] ERROR: codec_path is required\\n\");\n        return 2;\n    }\n\n    ov_init_params p;\n    ov_init_default_params(&p);\n    p.model_path = model_path;\n    p.codec_path = codec_path;\n    p.use_fa = use_fa != 0;\n    p.clamp_fp16 = clamp_fp16 != 0;\n\n    fprintf(stderr, \"[omnivoice-cpp] Loading model=%s codec=%s\\n\", model_path,\n            codec_path);\n\n    g_ctx = ov_init(&p);\n    if (!g_ctx) {\n        fprintf(stderr, \"[omnivoice-cpp] FATAL: ov_init failed: %s\\n\",\n                ov_last_error());\n        return 3;","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp#L19-L55","documentation":"omni_load() rejects the call because codec_path is NULL or empty (return code 2), after model_path passed validation. OmniVoice requires a companion codec model; without it the load is refused before ov_init is attempted.","triggerScenarios":"Calling omni_load(model, \"\", ...) — codec companion artifact not configured. The codec is a separate file from the main model.","commonSituations":"Gallery entry installs only the main OmniVoice model; config omits the codec key; user assumes one file is enough.","solutions":["Download and pass the codec companion file path.","Pre-validate both paths non-empty and files existing on the Go side."],"exampleFix":"// before\nrc := C.omni_load(m, C.CString(\"\"), 1, 0)\n// after\nrc := C.omni_load(m, C.CString(cfg.CodecPath), 1, 0)","handlingStrategy":"validation","validationCode":"if strings.TrimSpace(codecPath) == \"\" {\n    return errors.New(\"omnivoice-cpp: codec_path is required\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["OmniVoice needs model + codec; install both via the gallery entry.","Pre-flight stat both files."],"tags":["omnivoice-cpp","tts","argument-validation","codec"],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}