mudler/LocalAI · error
2
2
Error message
[omnivoice-cpp] ERROR: codec_path is required\n
What it means
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.
Source
Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:37
case GGML_LOG_LEVEL_WARN: lvl = "WARN"; break;
case GGML_LOG_LEVEL_ERROR: lvl = "ERROR"; break;
default: break;
}
fprintf(stderr, "[%-5s] %s", lvl, log);
fflush(stderr);
}
int omni_load(const char *model_path, const char *codec_path, int use_fa,
int clamp_fp16) {
ggml_log_set(ggml_log_cb, nullptr);
ggml_backend_load_all();
if (!model_path || model_path[0] == '\0') {
fprintf(stderr, "[omnivoice-cpp] ERROR: model_path is required\n");
return 1;
}
if (!codec_path || codec_path[0] == '\0') {
fprintf(stderr, "[omnivoice-cpp] ERROR: codec_path is required\n");
return 2;
}
ov_init_params p;
ov_init_default_params(&p);
p.model_path = model_path;
p.codec_path = codec_path;
p.use_fa = use_fa != 0;
p.clamp_fp16 = clamp_fp16 != 0;
fprintf(stderr, "[omnivoice-cpp] Loading model=%s codec=%s\n", model_path,
codec_path);
g_ctx = ov_init(&p);
if (!g_ctx) {
fprintf(stderr, "[omnivoice-cpp] FATAL: ov_init failed: %s\n",
ov_last_error());
return 3;View on GitHub (pinned to 44413a9d06)
Solutions
- Download and pass the codec companion file path.
- Pre-validate both paths non-empty and files existing on the Go side.
Example fix
// before
rc := C.omni_load(m, C.CString(""), 1, 0)
// after
rc := C.omni_load(m, C.CString(cfg.CodecPath), 1, 0) Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(codecPath) == "" {
return errors.New("omnivoice-cpp: codec_path is required")
} Prevention
- OmniVoice needs model + codec; install both via the gallery entry.
- Pre-flight stat both files.
When it happens
Trigger: Calling omni_load(model, "", ...) — codec companion artifact not configured. The codec is a separate file from the main model.
Common situations: Gallery entry installs only the main OmniVoice model; config omits the codec key; user assumes one file is enough.
Related errors
- [moss-tts-cpp] ERROR: codec_path is required\n
- 1
- [moss-tts-cpp] ERROR: local_path is required\n
- [moss-tts-cpp] ERROR: tokenizer_path is required\n
- [moss-tts-cpp] ERROR: text is required\n
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/6c45769de87fac2f.
Report an issue: GitHub.