mudler/LocalAI · error
[omnivoice-cpp] ERROR: synthesize failed (rc=%d): %s\n
Error message
[omnivoice-cpp] ERROR: synthesize failed (rc=%d): %s\n
What it means
ov_synthesize returned a non-zero status. Guard: check model-loaded state and input length limits before synthesis; on failure, propagate the rc and error string to the gRPC response instead of crashing, and log the failing text length.
Source
Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:102
long long seed, int denoise, int *out_n) {
if (out_n)
*out_n = 0;
if (!g_ctx) {
fprintf(stderr, "[omnivoice-cpp] ERROR: model not loaded\n");
return nullptr;
}
if (!text || text[0] == '\0') {
fprintf(stderr, "[omnivoice-cpp] ERROR: text is required\n");
return nullptr; // omni_tts: out_n already 0
}
ov_tts_params tp;
fill_params(&tp, text, lang, instruct, ref_samples, ref_n, ref_text, seed,
denoise);
ov_audio out = {0};
enum ov_status rc = ov_synthesize(g_ctx, &tp, &out);
if (rc != OV_STATUS_OK || out.n_samples <= 0 || !out.samples) {
fprintf(stderr, "[omnivoice-cpp] ERROR: synthesize failed (rc=%d): %s\n",
(int)rc, ov_last_error());
ov_audio_free(&out);
return nullptr;
}
// Copy into a plain malloc buffer the Go side can free symmetrically via
// omni_pcm_free; then release the ov_audio-owned buffer.
size_t bytes = (size_t)out.n_samples * sizeof(float);
float *buf = (float *)malloc(bytes);
if (!buf) {
fprintf(stderr, "[omnivoice-cpp] ERROR: malloc(%zu) failed\n", bytes);
ov_audio_free(&out);
return nullptr;
}
memcpy(buf, out.samples, bytes);
if (out_n)
*out_n = out.n_samples;
ov_audio_free(&out);View on GitHub (pinned to 44413a9d06)
Solutions
- Inspect the rc code and the detail message to identify the underlying synthesize failure.
- Verify the model and codec files are valid and compatible with the omnivoice library version.
- Check available memory and logs for OOM or decoder errors during synthesis.
When it happens
Trigger: Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:102 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15).
Data as JSON: /api/errors/394a25e888969a79.
Report an issue: GitHub.