Skip to content

whisper.android.java : update build with ggml source changes #2942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025

Conversation

danbev
Copy link
Collaborator

@danbev danbev commented Mar 25, 2025

This commit updates the whisper.android.java build to include the new ggml source files and directories. The gradle build configuration is also updated to include the aliyun maven repository.

danbev added 2 commits March 25, 2025 06:41
This commit updates the whisper.android.java build to include the
new ggml source files and directories. The gradle build configuration is
also updated to include the aliyun maven repository.
This commit adds GGML_USE_CPU to whisper library in order to enable the
CPU backend to work.

I'm not currently sure about the aproach to take with regards to the
backends on Android. I went down the dynamic library route, but it was
a struggle and perhaps not the best way to go. I'm still looking how to
enable GPU backends and which ones are available.
@danbev
Copy link
Collaborator Author

danbev commented Mar 25, 2025

With the latest change I'm able to build and install the example to a Android Emulator and run inference using the CPU backend:
image

@danbev
Copy link
Collaborator Author

danbev commented Mar 25, 2025

@ggerganov Do you know it this is "enough" of a test, and is this basically what the example did before as well?

@ggerganov
Copy link
Member

Yes, this is good enough for the example.

The main issue is that the build process of ggml has to be done via CMake, similar to the XCFramework examples. This will avoid having duplicate build scripts and will allow ggml to automatically use the available CPU instruction sets in the future when we start to support that for Arm CPUs. But this is overall a low priority atm, so this is good for now.

@danbev danbev marked this pull request as ready for review March 25, 2025 14:42
@danbev danbev merged commit 226d344 into ggml-org:master Mar 25, 2025
47 checks passed
@danbev danbev deleted the android-java branch April 1, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants