Repository navigation
espeak-shared: never exit on eSpeak init failure; detect truncated data paths - #79
Merged
Merged
Conversation
…ta paths espeak_Initialize() calls exit(1) when its data cannot be loaded unless espeakINITIALIZE_DONT_EXIT is passed, and the shared owner passed 0, so a bad eSpeak data directory ended the whole process (the agent on Android). libespeak-ng also copies the data path into a fixed N_PATH_HOME buffer (160 bytes on POSIX) and silently truncates a longer one, then falls back to its compiled-in default data. prepare() now: - rejects a missing data directory with an error; - initialises through espeak_ng_InitializePath/espeak_ng_Initialize/ espeak_ng_InitializeOutput, which return a status instead of exiting; - reads back the path libespeak-ng kept (espeak_Info) and fails, naming N_PATH_HOME, when it is not the requested directory (or its espeak-ng-data child). misaki's fixed "~135 bytes" pre-check is removed: the limit is whatever the linked libespeak-ng was built with, and the Android builds raise it. New test misaki_g2p_espeak_data_path: missing dir, 150- and 400-byte paths (rejected with a 160-byte N_PATH_HOME, accepted and phonemized identically with -DN_PATH_HOME=1024), and recovery on the short path afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Merging. Checks: 32 passed. macOS-latest-arm64 fails only in |
lalalune
added a commit
to elizaOS/eliza
that referenced
this pull request
Oct 14, 2026
…everywhere, raise the eSpeak path limit (#36239) * fix(voice): stage eSpeak NG data on AOSP, name the Paradee GGUF v1_0 everywhere, raise the eSpeak path limit - The mobile-voice catalog staged tts/paradee/paradee-8m-v1.0.gguf, while ElizaBionicInferenceServer, paradee-voice/inputs.json, the paradee-voice build and the host worker use paradee-8m-v1_0.gguf. The catalog (path, hfPath, missingAssets) now uses paradee-8m-v1_0.gguf, and the Paradee GGUF and misaki lexicon rows carry their byte-reproducible pins. A group staged under the old name is restaged (the record's path is compared too). - AOSP bootstrap passed espeak_data_dir=NULL to eliza_inference_paradee_load, so misaki spelled out every word outside its lexicon. The catalog now lists the 7 pinned eSpeak NG 1.52.0 English data files (GPL-3.0-or-later, flagged, unpublished, catalog-pinned), staged as a nested group tts/paradee/espeak-ng-data after tts/paradee. The bootstrap passes <bundle>/tts/paradee when that group is staged, logs the resulting G2P kind, and if the load with eSpeak data fails it retries with the lexicon alone and warns. - libespeak-ng keeps its data path in a 160-byte N_PATH_HOME buffer (about 135 bytes of directory). stage-elizavoice-lib builds the Android libespeak-ng with -DN_PATH_HOME=1024, checks path_home's size in the archive, and keys its reuse stamp on the option so older builds are rebuilt. The compiled data bytes are unchanged. - llama.cpp gitlink 866a6da2 -> 5df17a66 (elizaOS/llama.cpp#79): the shared eSpeak owner no longer exit(1)s when the data cannot load, and it rejects a data path libespeak-ng would truncate (naming N_PATH_HOME) instead of quietly loading other data. misaki's fixed ~135-byte check is gone. Tests: aosp-voice-download covers the catalog/inputs.json/Bionic/host-worker name and pin agreement, the nested eSpeak group (ordering, staging, tamper, path escape) and restaging on a renamed row; the bootstrap test covers the eSpeak load fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style(voice): biome format the AOSP voice staging changes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
eliza_espeak_shared::prepare()calledespeak_Initialize(..., options=0). In eSpeak NG 1.52 that callsexit(1)when the data cannot be loaded, so a bad data directory ended the whole process (on Android, the agent). It now initialises throughespeak_ng_InitializePath/espeak_ng_Initialize/espeak_ng_InitializeOutput, which return a status.N_PATH_HOMEbuffer (160 bytes on POSIX) and truncates longer paths silently, then falls back to its compiled-in default data.prepare()now reads back the kept path (espeak_Info) and fails with an error namingN_PATH_HOMEwhen it is not the requested directory (or itsespeak-ng-datachild).-DN_PATH_HOME=1024, in the companion eliza PR).Tests
New ctest
misaki_g2p_espeak_data_path(skips with code 77 without libespeak-ng or its data). It covers:espeak-ng-datalink;Local runs on macOS arm64:
misaki_g2p_mini_lexicon,misaki_g2p_unit,misaki_g2p_espeak_sharedandmisaki_g2p_espeak_data_pathpass.-DN_PATH_HOME=1024: both long paths are accepted and phonemize byte-identically to the short path.AI assistance disclosure: written with Claude Code.
🤖 Generated with Claude Code