mudler/LocalAI · error

4

4

Error message

[omnivoice-cpp] ERROR: text is required\n

What it means

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.

Source

Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:137

        *out_n = out.n_samples;
    ov_audio_free(&out);
    return buf;
}

int omni_tts_stream(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, omni_pcm_chunk_cb cb,
                    void *user_data) {
    if (!g_ctx) {
        fprintf(stderr, "[omnivoice-cpp] ERROR: model not loaded\n");
        return 1;
    }
    if (!cb) {
        fprintf(stderr, "[omnivoice-cpp] ERROR: stream callback is null\n");
        return 2;
    }
    if (!text || text[0] == '\0') {
        fprintf(stderr, "[omnivoice-cpp] ERROR: text is required\n");
        return 4;
    }
    ov_tts_params tp;
    fill_params(&tp, text, lang, instruct, ref_samples, ref_n, ref_text, seed,
                denoise);
    // ov_audio_chunk_cb has the identical signature to omni_pcm_chunk_cb
    // (bool vs int return are ABI-compatible; non-zero == true).
    tp.on_chunk = (ov_audio_chunk_cb)cb;
    tp.on_chunk_user_data = user_data;

    ov_audio out = {0}; // stays empty in streaming mode
    enum ov_status rc = ov_synthesize(g_ctx, &tp, &out);
    ov_audio_free(&out);
    if (rc != OV_STATUS_OK && rc != OV_STATUS_CANCELLED) {
        fprintf(stderr, "[omnivoice-cpp] ERROR: stream synth failed (rc=%d): %s\n",
                (int)rc, ov_last_error());
        return 3;
    }

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Provide a non-empty text field in the TTS request.
  2. Ensure the request payload includes the text parameter before invoking synthesis.

When it happens

Trigger: Thrown at backend/go/omnivoice-cpp/cpp/gomnivoicecpp.cpp:137 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/b91ab43eb0b40105. Report an issue: GitHub.