Skip to content
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

feat: setup android support #52

Merged
merged 10 commits into from
Dec 24, 2024
Merged

feat: setup android support #52

merged 10 commits into from
Dec 24, 2024

Conversation

thewh1teagle
Copy link
Owner

@thewh1teagle thewh1teagle commented Nov 28, 2024

Todo:

Failed to generate bindings: ClangDiagnostic("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:1022:2: error: Unsupported architecture

Related: rust-lang/rust-bindgen#1229

@thewh1teagle
Copy link
Owner Author

thewh1teagle commented Nov 28, 2024

Failed to run on Android arm64
Missing libpthread.so.0

ls
libcargs.so  libonnxruntime.so  libsherpa-onnx-c-api.so  libsherpa-onnx-cxx-api.so  libsherpa_rs.so  tts  tts-0498663e598a2018  tts-0498663e598a2018.d  tts.d
surya:/data/local/tmp/examples $ LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./tts                                                                                                                                                                          
CANNOT LINK EXECUTABLE "./tts": library "libpthread.so.0" not found: needed by /data/local/tmp/examples/libsherpa-onnx-c-api.so in namespace (default)
1|surya:/data/local/tmp/examples $ 

https://stackoverflow.com/questions/53936680/java-lang-unsatisfiedlinkerror-dlopen-failed-library-libpthread-so-0-not-fou

 Dist: Dist { url: "https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.10.32/sherpa-onnx-v1.10.32-linux-aarch64-shared-cpu.tar.bz2", sha256: "131223601629A03FF2820DAE4E06EAA11DB1180AC416444828EA1A8A98F69537", name: "sherpa-onnx-v1.10.32-linux-aarch64-shared-cpu", is_dynamic: true }

@csukuangfj

Seems like the sherpa-onnx-v1.10.32-linux-aarch64-shared-cpu won't work on Android. is there release for Android for the C API of sherpa-onnx? (I think it shouldn't be the JNI but the regular C API)

@csukuangfj
Copy link

is there release for Android for the C API of sherpa-onnx?

Please use the script from sherpa-onnx to build it by yourself.

Hint: set
https://github.com/k2-fsa/sherpa-onnx/blob/be159f943ed83c607940958c654bde1c5fa82bec/build-android-arm64-v8a.sh#L97
to
ON

@csukuangfj
Copy link

I suggest this repo only does one thing, that is, provide rust API support for sherpa-onnx.

@thewh1teagle thewh1teagle changed the title feat: add sherpa dist for android aarch64 feat: setup android support Dec 24, 2024
@thewh1teagle thewh1teagle merged commit 8f267ad into main Dec 24, 2024
3 checks passed
@thewh1teagle thewh1teagle deleted the feat/setup-android-support branch December 24, 2024 17:10
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