mudler/LocalAI · critical
3
3
Error message
[omnivoice-cpp] FATAL: ov_init failed: %s\n
What it means
ov_init() returned NULL after params were filled (model_path, codec_path, use_fa, clamp_fp16). This is the engine-level load failure (return code 3); unlike moss-tts, the OmniVoice engine exposes the reason through ov_last_error(), which the message prints. Causes range from unreadable files to flash-attention (use_fa) or fp16 options unsupported on the current backend.
Source
Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:53
}
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;
}
fprintf(stderr, "[omnivoice-cpp] Model loaded (%s)\n", ov_version());
return 0;
}
// Fill an ov_tts_params from the flat wrapper arguments.
static void fill_params(ov_tts_params *tp, const char *text, const char *lang,
const char *instruct, const float *ref_samples,
int ref_n, const char *ref_text, long long seed,
int denoise) {
ov_tts_default_params(tp);
tp->text = text ? text : "";
tp->lang = lang ? lang : "";
if (instruct && instruct[0] != '\0')
tp->instruct = instruct;
if (ref_samples && ref_n > 0) {View on GitHub (pinned to 44413a9d06)
Solutions
- Read the ov_last_error() text in the FATAL line — it names the exact cause; fix that first.
- Retry with use_fa=0 if the error mentions flash attention.
- Verify model and codec files exist, match the same release, and have expected sizes.
- Disable clamp_fp16 or free memory if the error indicates allocation/precision problems.
Example fix
// before rc := C.omni_load(m, c, 1, 1) // fa + fp16 clamp on unsupported backend // after rc := C.omni_load(m, c, 0, 0) // conservative flags first, then re-enable
Defensive patterns
Strategy: retry
Validate before calling
for _, p := range []string{modelPath, codecPath} {
if _, err := os.Stat(p); err != nil {
return fmt.Errorf("omnivoice artifact missing: %w", err)
}
} Prevention
- Always include the ov_last_error() text in the error surfaced to the user — it names the real cause.
- Start with use_fa=0 and clamp_fp16=0; enable flags only after a baseline load succeeds.
- Keep model and codec from the same release; verify sizes against the manifest.
When it happens
Trigger: ov_init failing on missing/corrupt model or codec files, incompatible quantization, use_fa=1 on a backend without flash-attention support, or clamp_fp16 interactions with an fp16-incompatible device; also plain OOM during weight load.
Common situations: use_fa enabled on CPU-only or older GPU builds; model/codec from different OmniVoice releases; truncated downloads; memory-constrained containers.
Related errors
- 1
- [moss-tts-cpp] ERROR: local_path is required\n
- [moss-tts-cpp] FATAL: moss_local_load failed\n
- 2
- [omnivoice-cpp] ERROR: model not loaded\n
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/81c815e5c63e2d58.
Report an issue: GitHub.