Dev-channel Android APK ships without in-house native modules (sherpa-native, audio-stream-native) -> Kokoro local TTS/STT unavailable
Summary
The publicdev (dev channel) Android build is published without the first-party Expo native modules @happier-dev/sherpa-native and @happier-dev/audio-stream-native. As a result, on-device Kokoro TTS (and the Sherpa STT / native audio path) report "Kokoro is not supported on this device/runtime" on every dev-channel Android device — this is not a device limitation.
Because publicdev uses fingerprint runtimeVersion policy (apps/ui/app.config.js:166-168), the native module can only ship in a fresh APK — OTA updates can never deliver it. So no amount of "update the app" (OTA) fixes this; the published APK itself is missing the modules.
Runtime check vs model download (do not conflate)
The Voice Assistant settings show two separate Kokoro rows with two separate gates — this report is about the first:
- "Kokoro runtime — Unavailable" —
LocalNeuralTtsSettings.native.tsx:115-123, rendered only when!runtimeSupported, whereruntimeSupported = isKokoroRuntimeSupported()(line 37). On Android that resolves to "is the native Sherpa module present?". This is the failing gate — native module absent from the APK. - "Kokoro model — Not downloaded" — the model/asset download row (
LocalNeuralTtsSettings.native.tsx:164-199,prepareModel()). Different concern (artifact files).
Critically, the runtime gate blocks the download: tapping "Kokoro model" while !runtimeSupported hits LocalNeuralTtsSettings.native.tsx:168-176:
if (!runtimeSupported) { Modal.alert(error, runtimeUnsupported.body); return; }
It bails before downloading. So users cannot download the model until the native module ships. Order is native module first, model second — downloading does nothing while the runtime row says Unavailable.
Impact
- All dev-channel Android users: local neural TTS (Kokoro) and native STT/audio unavailable, and the model download is blocked.
- Reported on Pixel 9 (arm64-v8a), app version
0.2.7— reproduces structurally on any dev device.
Evidence (from the live published binary)
Inspected the current published dev APK directly:
gh release download ui-mobile-dev --pattern happier-dev-android.apk
# asset rebuilt 2026-06-19 from `dev` (nightly publish_android_apk: true)
# 48 arm64-v8a .so libs present, ZERO sherpa:
unzip -l happier-dev-android.apk | grep -iE 'lib/arm64-v8a/(libhappier_sherpa|libsherpa)' # -> empty
unzip -l happier-dev-android.apk | grep -i sherpa # -> empty
# Expo module class absent:
unzip -p happier-dev-android.apk 'classes*.dex' | grep -ac HappierSherpaNativeModule # -> 0
# audio-stream-native lib also absent (libreact-native-audio-api.so present is a different 3rd-party pkg)
The runtime gate that then trips:
apps/ui/sources/voice/kokoro/runtime/kokoroSupport.ts:27-28->requireOptionalNativeModule('HappierSherpaNative')returnsnull- ->
isKokoroRuntimeSupported()false -> copysettingsVoice.local.kokoro.runtime(apps/ui/sources/text/translations/en.ts:7440): "Kokoro is not supported on this device/runtime."
Why this is a build bug (not device, not config)
The modules are correctly wired in source:
- Declared deps of
apps/ui(apps/ui/package.json:86,91) - Valid
expo-module.config.json(packages/sherpa-native/expo-module.config.json->dev.happier.sherpa.HappierSherpaNativeModule) - Android impl + CMake target
happier_sherpa_jni, linkslibsherpa-onnx-c-api.so(packages/sherpa-native/android/) - In
devhistory since 2026-02-15 (bc1d1819c)
Key tell: the build succeeded yet produced no sherpa libs. If the module had been autolinked, the mandatory preBuild sherpa-onnx tarball download/checksum task (packages/sherpa-native/android/build.gradle, preBuild.dependsOn(prepareSherpaOnnxAndroid)) would have failed the entire build on any network/checksum issue — it cannot silently drop. So the module was never autolinked into the generated native project.
Prime suspect (needs confirmation from EAS build log)
publicdev uses CNG (no committed apps/ui/android/), so expo-modules-autolinking generates the project at build time. Suspect the in-house packages/* native modules aren't resolved in the EAS working dir at prebuild time — see the note that EAS evaluates expo config before installing deps in the local stage (scripts/pipeline/expo/native-build.mjs:85-89). Possible angles:
- Monorepo autolinking search paths not covering
packages/*for the EAS-local prebuild - Workspace native packages not hoisted/installed before prebuild/autolinking runs
HAPPIER_INSTALL_SCOPEinteraction (current scope list inapps/ui/eas.jsonbase env omits both native packages — though it only gatespostinstall:real, worth ruling out)
Repro
- Install latest dev APK (GitHub release
ui-mobile-dev) on any Android device. - Settings -> Voice -> Local neural TTS (Kokoro).
- Observe: "Kokoro runtime — Unavailable" / "Kokoro is not supported on this device/runtime."
- Tap "Kokoro model" to download -> blocked with the runtime-unsupported alert.
Confirmation step for the owner
Pull the autolinking module list from a recent publicdev EAS build log — confirm HappierSherpaNative / audio-stream-native are absent from "Using autolinked modules". Then fix prebuild dep resolution and verify the next APK contains lib/arm64-v8a/libhappier_sherpa_jni.so + libsherpa-onnx-c-api.so and dex class HappierSherpaNativeModule.
Acceptance
- Published dev APK contains both
.solibs + the module class. - "Kokoro runtime" row no longer shows Unavailable; model download proceeds.
- Kokoro local TTS works on a clean dev-channel install.
- (Verify iOS dev build for the same gap.)
Thanks for distinguishing missing native support from model downloads. We need to inspect the affected Android build. Please share the app version and build, download source and Kokoro runtime status; an over-the-air update cannot add missing native modules.
Posted on behalf of @leeroybrun.
Thanks! Details for the affected build:
- Device: Pixel 9 (arm64-v8a)
- App:
0.2.7, dev channel (publicdev) - Download source: GitHub release
ui-mobile-dev,happier-dev-android.apk, rebuilt 2026-06-19 - Kokoro runtime: "Unavailable". The APK contained no
libhappier_sherpa_jni.so/libsherpa-onnx-*.so, and its dex had noHappierSherpaNativeModule.
Update: on the current dev APK the Kokoro runtime is now Available. f9269d55b3 added sherpa-native/audio-stream-native to the install scope, so the original issue is fixed.
With the runtime gate passing, both model downloads then failed on the device:
- Kokoro (q8):
model_pack_download_failed:404. The installer rebuilt asset names from the pack path, but GitHub stores!as., so all 104espeak-ng-data/voices/!v/*files 404'd. - Sherpa STT:
Failed to allocate a 57126928 byte allocation … growth limit 268435456. Model files were read whole into the JS heap to hash them, and RN fetch has no streaming body.
Both are fixed in #529, which is JS-only and should be OTA-deliverable. Separately, the fp32 Kokoro option appears in the picker but its pack was never published (its manifest 404s). Happy to close this once #529 lands, unless you'd rather track the download fixes here.