Box icon indicating copy to clipboard operation
Box copied to clipboard

Bug: Kokoro English (v1.0) crashes Box 3.5.7 on Pixel 10 Pro XL (GrapheneOS) during model initialization

Open WitherMonarch opened this issue 1 week ago • 1 comments

Summary

Loading the Kokoro (English) TTS model causes the entire Box application to close unexpectedly after a few seconds.

The model files appear to download correctly, but the Sherpa-ONNX initialization log indicates that the multilingual Kokoro model is being initialized with an empty language parameter (lang="").

Sherpa-ONNX reports that a language or lexicon must be provided.

This may be a missing configuration parameter in Box's Kokoro integration.

Device and Software Information

Component Details
Device Google Pixel 10 Pro XL
SoC Google Tensor G5
Operating System GrapheneOS
Android version 17
Build CP4A.261105.040.A1
OS Build ID 2026111801
Box version 3.5.7 PQC Custom ROM
Package com.box.gallery
Target SDK 37
User profile Secondary profile (full.secondary), tested on main too
Google Play Services Not installed
Model Kokoro (English)
Model version v1.0
Inference library sherpa-onnx

Steps to Reproduce

  1. Install Box 3.5.7 PQC Custom ROM build on GrapheneOS.
  2. Download Kokoro (English) through Box's model management interface (approximately 325 MB).
  3. Verify that the following files exist:
    • model.onnx
    • tokens.txt
    • voices.bin
  4. Open the Kokoro TTS interface.
  5. Attempt to load the model.
  6. Wait a few seconds.

Actual Result

The entire Box application closes unexpectedly while loading Kokoro.

Expected Result

Kokoro initializes successfully and becomes available for offline text-to-speech synthesis.

Relevant Logcat Output

1. Sherpa-ONNX library loads successfully

D nativeloader: Load /data/app/.../lib/arm64/libsherpa-onnx-jni.so
using class loader ns clns-9: ok

2. Model configuration reported by Sherpa-ONNX

OfflineTtsConfig(
  model="/storage/emulated/11/Android/data/com.box.gallery/files/Kokoro__English_/v1_0/model.onnx",
  voices="/storage/emulated/11/Android/data/com.box.gallery/files/Kokoro__English_/v1_0/voices.bin",
  tokens="/storage/emulated/11/Android/data/com.box.gallery/files/Kokoro__English_/v1_0/tokens.txt",
  lexicon="",
  data_dir="/storage/emulated/11/Android/data/com.box.gallery/files/espeak-ng-data",
  lang=""
)

3. Relevant Sherpa-ONNX Warning

W sherpa-onnx:
offline-tts-kokoro-impl.h:InitFrontend:401

Current model version: '2'

W sherpa-onnx:
offline-tts-kokoro-impl.h:InitFrontend:404

You are using a multi-lingual Kokoro model
(e.g., Kokoro >= v1.0).
please pass --kokoro-lexicon or --kokoro-lang

Additional Observations

  • All three essential model files exist in the downloaded model directory.
  • No additional configuration or lexicon files are present in that directory.
  • The model is stored in internal app storage.
  • The crash occurs during model initialization, before speech generation.
  • The Sherpa-ONNX native library loads successfully.
  • Box is running without Google Play Services.
  • The device is running the Custom ROM build of Box.

Suspected Cause

The multilingual Kokoro model (version 2) appears to be initialized without a language identifier or lexicon.

The log explicitly shows:

lang=""
lexicon=""

Could the Kokoro configuration be missing the appropriate language parameter?

For the English model, could Box initialize Sherpa-ONNX with an appropriate language setting, such as en-us, if supported by the model and runtime version?

Alternatively, could the model download metadata be missing a language field that should be passed to the native TTS configuration?

Questions for the Developer

  1. Is Kokoro v1.0 multilingual currently supported by Box 3.5.7?
  2. Should the English model automatically populate kokoro-lang?
  3. Is this a known issue with the Custom ROM build?
  4. Is there a newer Sherpa-ONNX runtime or configuration fix available?
  5. Does Box support GPU acceleration for Kokoro on Google Tensor G5, or is this implementation CPU-only?

Requested Assistance

Please investigate the Kokoro initialization configuration and provide a fix or workaround for the English model on GrapheneOS.

I can provide additional logcat output or perform further diagnostic tests if needed.

Thank you for developing Box and supporting custom ROM users.

WitherMonarch avatar Nov 25 '26 02:11 WitherMonarch

@WitherMonarch

Thanks for reporting this issue, a fix will be applied in the next release

Best

jegly avatar Nov 28 '26 04:11 jegly