pocketsphinx-android icon indicating copy to clipboard operation
pocketsphinx-android copied to clipboard

16KB support

Open ouachman opened this issue 5 months ago • 5 comments

Hi everyone

Google is asking every app to be compatible with 16 KB page size: https://android-developers.googleblog.com/2025/05/prepare-play-apps-for-devices-with-16kb-page-size.html

The PocketSphinx library unfortunately is not, and needs to be recompiled.

Anyone has the ability to build a new version of the AAR, using a recent NDK version, to have it compatible?

Thank you :)

ouachman avatar Aug 27 '25 13:08 ouachman

@ouachman I’ve updated the pocketsphinx-android project so it builds with the latest Android SDK. It also supports the 16KB page size. I’m publishing an AAR release in my private fork: https://github.com/tinoue/pocketsphinx-android/releases/tag/5prealpha2

tinoue avatar Sep 14 '25 14:09 tinoue

Wow excellent! This is much much appreciated @tinoue :) Just curious, how do you explain the aar size going from 3MB to 1.2MB? The latest official aar file being this one: https://github.com/cmusphinx/pocketsphinx-android-demo/blob/master/aars/pocketsphinx-android-5prealpha-release.aar

ouachman avatar Sep 15 '25 16:09 ouachman

Wow. Didn't have much hope going into the issues of this ancient library. You are the GOAT @tinoue 🎉

ezamelczyk avatar Sep 16 '25 08:09 ezamelczyk

@ouachman

how do you explain the aar size going from 3MB to 1.2MB?

This is interesting—the .so files are roughly half the size compared to the official ones. The reason seems to be that the latest version of AGP(>= 4.0) automatically strips symbols from the .so files.

tinoue avatar Sep 16 '25 09:09 tinoue

Thank you for the explanation @tinoue. BTW I tested and my app is now 16KB compatible, so again a big thank you for taking the time to do this! I can leave this ticket opened for the time being, but I doubt this will eventually be done in the official release which is not maintained anymore.

ouachman avatar Sep 17 '25 07:09 ouachman