Repository navigation
libelizainference ABI v17: Paradee + misaki TTS entries, ASR cancel/supported, TTS cancel and evict for Kokoro/Paradee - #59
Merged
Conversation
…evict)
ABI v17 adds these symbols and changes no existing signature:
- Paradee-8M TTS with native misaki G2P, guarded by ELIZA_ENABLE_PARADEE.
Paradee is linked when both the paradee_lib and misaki_g2p targets
exist, into both the shared and the static elizainference. New entries:
paradee_supported, load, sample_rate, g2p_kind, phonemize,
synthesize_alloc and synthesize_phonemes_alloc. The phoneme string is
split into chunks of at most 510 ids (sentence end, then clause, then
space, then hard slice). Each chunk is padded with 0 at both ends, and
the chunks' PCM is joined into one buffer. The model and lexicon live on
the ctx under their own mutex.
- cancel_tts now also cancels Kokoro and Paradee. Each engine has its own
flag and clears it when a call starts. Paradee checks its flag through
the synth cancel callback and between chunks. Kokoro checks before and
after the forward pass.
- New asr_cancel: an atomic flag set without asr_mutex. It is wired to the
llama abort callback on asr_lctx and checked between mtmd chunks (which
now use eval_chunk_single) and before each decode token. A cancelled
call returns ELIZA_ERR_CANCELLED. New asr_supported returns 1.
- mmap_evict("tts") now also frees Kokoro, Paradee and the lexicon. It
keeps their paths, and the next synth or mmap_acquire("tts") reloads
them. acquire("tts") succeeds with no OmniVoice weights present when a
Kokoro or Paradee head is configured. The OmniVoice GGUF picker skips
tts/paradee/ and paradee* files.
- The header documents the regions and lists one probe per capability.
Tests:
- eliza-inference-test-paradee-asr builds the bridge against scripted
stand-ins for the paradee/misaki contract. It covers chunking, a
load/synth/cancel/evict race across threads, evict then reload, and ASR
cancel during prefill and during decode.
- eliza-inference-test-abi checks the real library. It covers the ABI
string "17", the probes, the no-op calls, and an opt-in real-model ASR
cancel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cancel and race tests call CHECK from worker threads, but the counters were plain ints. TSan reported the races, the check total varied between runs (509/514/518), and a lost ++g_failures could turn a failure into a PASS. The counters are now std::atomic<int>. eliza-inference-test-abi and eliza-inference-test-paradee-asr were registered with ctest but had no label, so CI (ctest -L main) built them and never ran them. Both now carry the main label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
lalalune
pushed a commit
that referenced
this pull request
Oct 14, 2026
…ABI v18) Add eliza_inference_llm_context_capacity, which loads the resident text model if needed and returns the context size llm_stream_open would use (requested, else ELIZA_LLM_N_CTX, else 8192, clamped to the GGUF training context) without allocating a decode context. llm_stream_open shares the same resolution and rejects a non-positive capacity. The new symbol bumps ELIZA_INFERENCE_ABI_VERSION to 18 (v17 is the Paradee/ASR-cancel surface from #59) with a v18 changelog entry. The FFI ABI tests expect "18" and cover the new entry's argument validation and missing-text-GGUF error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lalalune
added a commit
to elizaOS/eliza
that referenced
this pull request
Oct 14, 2026
…rd empty phonemize output Move the native/llama.cpp gitlink from 7efee0037 to 236bfd34c (elizaOS/llama.cpp#59), a fast-forward of three additive ABI v17 commits. The TypeScript binding now declares ABI 17, so the pinned header has to match; with the old pin the header-alignment test fails in lanes that check out the submodule. paradeePhonemize no longer asks toArrayBuffer for a zero-length view when the library returns an empty phoneme string; the buffer is still freed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Review before merge (ABI v17 bridge). I checked:
Sanitizer runs on macOS arm64, CPU build:
Pushed 76ed981:
CI on this head:
For the sibling integration: the in-progress misaki header uses a C API ( 🤖 Generated with Claude Code |
lalalune
added a commit
to elizaOS/eliza
that referenced
this pull request
Oct 14, 2026
…tegration The fork commit ce4dacc2 (elizaOS/llama.cpp branch claude/alpha-voice-android-integration) is fork main with ABI v17 (elizaOS/llama.cpp#59, merged) plus the open misaki-g2p (#63) and paradee-native branches. Move it to the merged fork commit once those merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lalalune
added a commit
to elizaOS/eliza
that referenced
this pull request
Oct 14, 2026
…on libelizainference ABI v17 (#36158) * feat(local-inference): standalone Qwen3-ASR and Paradee host workers on libelizainference ABI v17 Add host-asr-worker (Qwen3-ASR-0.6B Q8_0, no text model) and switch host-tts-worker from Kokoro-82M to Paradee-8M with native misaki G2P. Both workers pin their assets by SHA-256, run native calls on an engine thread so {op:"cancel"} reaches eliza_inference_asr_cancel / eliza_inference_cancel_tts mid-pass, and evict their region when idle. Bind every ABI v17 symbol (paradee_*, free_pcm, asr_supported, asr_cancel) through a separate optional dlopen and accept v16 only when the family is absent. ffi-stub/ffi.h is now the v17 header. The app serves POST /api/tts/paradee (libelizainference-paradee) and POST /api/asr/libelizainference (local-inference) from one owner-session route module; /api/tts/kokoro is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(local-inference): pin llama.cpp to the ABI v17 fork merge and guard empty phonemize output Move the native/llama.cpp gitlink from 7efee0037 to 236bfd34c (elizaOS/llama.cpp#59), a fast-forward of three additive ABI v17 commits. The TypeScript binding now declares ABI 17, so the pinned header has to match; with the old pin the header-alignment test fails in lanes that check out the submodule. paradeePhonemize no longer asks toArrayBuffer for a zero-length view when the library returns an empty phoneme string; the buffer is still freed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(local-inference): gate host ASR with pinned Silero VAD --------- Co-authored-by: Shaw <thefutureisaweirdplace@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Shaw <shawgotbags@gmail.com>
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ABI v17 for the fused libelizainference. This PR changes only
tools/omnivoice/(FFI header, bridge, CMake, tests). The base iseliza/develop-pin-ea8b3f2, the branch the7efee003pin is on.What changes
ELIZA_ENABLE_PARADEE):eliza_inference_paradee_{supported,load,sample_rate,g2p_kind,phonemize,synthesize_alloc,synthesize_phonemes_alloc}. PCM is released witheliza_inference_free_pcmand phonemes witheliza_inference_free_string.0at both ends, synthesized, and the PCM is concatenated.paradee_mutex.paradee_libandmisaki_g2pare linked into both the shared and the staticelizainference, but only when both targets exist.eliza_inference_cancel_ttsnow also stops Kokoro and Paradee.paradee_synth_options.cancelcallback and between chunks.ELIZA_ERR_CANCELLEDwith no audio.eliza_inference_asr_cancel(ctx, err)sets an atomic flag without takingasr_mutex. The flag is checked:asr_lctx(prefill and decode graphs)mtmd_helper_eval_chunk_single)asr_mutex. So a cancel sent while a second call is waiting for the lock stops the call that holds it, not the waiting one. The tests cover this.eliza_inference_asr_supported()returns 1, because this library is only built with mtmd.asr_stream_*stubs are unchanged.mmap_acquire("tts")reloads them.mmap_acquire("tts")now succeeds with no OmniVoice weights present when a Kokoro or Paradee head is configured.tts/paradee/andparadee*files.mmap_evict("asr")is unchanged.Contract with the sibling PRs
This PR builds against the paradee-native and misaki-g2p public headers. Those are not merged yet. The exact declarations the bridge uses are in
tools/omnivoice/tests/paradee-contract/{paradee.h,misaki-g2p.h}:eliza_paradee::paradee_load_model,paradee_sample_rate,paradee_phonemes_to_ids,paradee_synthesize(model, input_ids_with_pads, paradee_synth_options{speed, cancel, cancel_user_data}, audio, err),PARADEE_MAX_INPUT_IDS = 512, and the status codesPARADEE_E_CANCELLEDandPARADEE_E_OOM.eliza_misaki::misaki_load_lexicon(path, espeak_dir_or_null, err),misaki_get_fallback_kind,misaki_phonemize, andMISAKI_FALLBACK_{NONE,RULES,ESPEAK}.If the real headers differ, the Paradee section of the bridge has to be adjusted when this is rebased. Also,
tools/CMakeLists.txtand the rootCMakeLists.txtmust addparadeeandmisaki-g2pbeforeomnivoice, the same way kokoro is ordered, orELIZA_ENABLE_PARADEEstays off.Tests (macOS arm64 host, Metal build)
eliza-inference-test-paradee-asr: PASS, 518 checks. It compiles the bridge withELIZA_INFERENCE_TEST_HOOKSagainst scripted stand-ins for the contract. It covers:eliza-inference-test-abi(reallibelizainference.dylib): PASS. ABI string"17", the probes, cancel and evict as no-ops, and Paradee returning NOT_IMPLEMENTED in a build without Paradee.ELIZA_TEST_ASR_DIR. The pair used iseliza-1-asr.gguf(sha256bca25981…a1971) andeliza-1-asr-mmproj.gguf(41a342b5…6603d), with LibriSpeech1188-133604-0022.wav.ELIZA_ERR_CANCELLEDfor an early cancel and a late cancel, and the next run gave the same transcript.tools/mtmdis not changed here). The machine was heavily loaded (load average around 80), so these timings are noisy.aarch64-linux-android26-fsyntax-only -Wall -Wextracompile, both with and withoutELIZA_ENABLE_PARADEE. No APK was built and nothing was run on a device or emulator.Consumers
"17"together with the gitlink bump. That is theffi-bindings.tsexpected version and any JNI check.🤖 Generated with Claude Code