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

Add README for android libs. #1693

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/test-nodejs-addon-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ fi

echo "----------tts----------"

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
tar xvf matcha-icefall-en_US-ljspeech.tar.bz2
rm matcha-icefall-en_US-ljspeech.tar.bz2
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx

node ./test_tts_non_streaming_matcha_icefall_en.js
rm hifigan_v2.onnx
rm -rf matcha-icefall-en_US-ljspeech

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
tar xvf matcha-icefall-zh-baker.tar.bz2
rm matcha-icefall-zh-baker.tar.bz2
wget https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx

node ./test_tts_non_streaming_matcha_icefall_zh.js
rm hifigan_v2.onnx
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
./build-android-arm64-v8a.sh
mkdir -p jniLibs/arm64-v8a/
cp -v ./build-android-arm64-v8a/install/lib/*.so ./jniLibs/arm64-v8a/
cp -v ./build-android-arm64-v8a/install/lib/README.md ./jniLibs/arm64-v8a/
rm -rf ./build-android-arm64-v8a/

- name: build android armv7-eabi
Expand All @@ -77,6 +78,7 @@ jobs:
./build-android-armv7-eabi.sh
mkdir -p ./jniLibs/armeabi-v7a/
cp -v ./build-android-armv7-eabi/install/lib/*.so ./jniLibs/armeabi-v7a/
cp -v ./build-android-armv7-eabi/install/lib/README.md ./jniLibs/armeabi-v7a/
rm -rf ./build-android-armv7-eabi

- name: build android x86_64
Expand All @@ -90,6 +92,7 @@ jobs:
./build-android-x86-64.sh
mkdir -p ./jniLibs/x86_64
cp -v ./build-android-x86-64/install/lib/*.so ./jniLibs/x86_64
cp -v ./build-android-x86-64/install/lib/README.md ./jniLibs/x86_64
rm -rf ./build-android-x86-64

- name: build android x86
Expand All @@ -103,6 +106,7 @@ jobs:
./build-android-x86.sh
mkdir -p ./jniLibs/x86
cp -v ./build-android-x86/install/lib/*.so ./jniLibs/x86
cp -v ./build-android-x86/install/lib/README.md ./jniLibs/x86
rm -rf ./build-android-x86

- name: Copy files
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lazarus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ jobs:

git clone https://csukuangfj:[email protected]/csukuangfj/sherpa-onnx-bin huggingface
cd huggingface
git remote set-url origin https://csukuangfj:[email protected]/sherpa-onnx-bin
git fetch
git pull
git merge -m "merge remote" --ff origin main
Expand Down
16 changes: 16 additions & 0 deletions build-android-arm64-v8a.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,22 @@ cp -fv $onnxruntime_version/jni/arm64-v8a/libonnxruntime.so install/lib 2>/dev/n
rm -rf install/share
rm -rf install/lib/pkgconfig
rm -rf install/lib/lib*.a
if [ -f install/lib/libsherpa-onnx-c-api.so ]; then
cat >install/lib/README.md <<EOF
# Introduction

Note that if you use Android Studio, then you only need to
copy libonnxruntime.so and libsherpa-onnx-jni.so
to your jniLibs, and you don't need libsherpa-onnx-c-api.so or
libsherpa-onnx-cxx-api.so.

libsherpa-onnx-c-api.so and libsherpa-onnx-cxx-api.so are for users
who don't use JNI. In that case, libsherpa-onnx-jni.so is not needed.

In any case, libonnxruntime.is is always needed.
EOF
ls -lh install/lib/README.md
fi

# To run the generated binaries on Android, please use the following steps.
#
Expand Down
17 changes: 17 additions & 0 deletions build-android-armv7-eabi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,20 @@ cp -fv $onnxruntime_version/jni/armeabi-v7a/libonnxruntime.so install/lib 2>/dev
rm -rf install/share
rm -rf install/lib/pkgconfig
rm -rf install/lib/lib*.a

if [ -f install/lib/libsherpa-onnx-c-api.so ]; then
cat >install/lib/README.md <<EOF
# Introduction

Note that if you use Android Studio, then you only need to
copy libonnxruntime.so and libsherpa-onnx-jni.so
to your jniLibs, and you don't need libsherpa-onnx-c-api.so or
libsherpa-onnx-cxx-api.so.

libsherpa-onnx-c-api.so and libsherpa-onnx-cxx-api.so are for users
who don't use JNI. In that case, libsherpa-onnx-jni.so is not needed.

In any case, libonnxruntime.is is always needed.
EOF
ls -lh install/lib/README.md
fi
17 changes: 17 additions & 0 deletions build-android-x86-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,20 @@ cp -fv $onnxruntime_version/jni/x86_64/libonnxruntime.so install/lib 2>/dev/null
rm -rf install/share
rm -rf install/lib/pkgconfig
rm -rf install/lib/lib*.a

if [ -f install/lib/libsherpa-onnx-c-api.so ]; then
cat >install/lib/README.md <<EOF
# Introduction

Note that if you use Android Studio, then you only need to
copy libonnxruntime.so and libsherpa-onnx-jni.so
to your jniLibs, and you don't need libsherpa-onnx-c-api.so or
libsherpa-onnx-cxx-api.so.

libsherpa-onnx-c-api.so and libsherpa-onnx-cxx-api.so are for users
who don't use JNI. In that case, libsherpa-onnx-jni.so is not needed.

In any case, libonnxruntime.is is always needed.
EOF
ls -lh install/lib/README.md
fi
17 changes: 17 additions & 0 deletions build-android-x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,20 @@ make -j4
make install/strip
cp -fv $onnxruntime_version/jni/x86/libonnxruntime.so install/lib
rm -rf install/lib/pkgconfig

if [ -f install/lib/libsherpa-onnx-c-api.so ]; then
cat >install/lib/README.md <<EOF
# Introduction

Note that if you use Android Studio, then you only need to
copy libonnxruntime.so and libsherpa-onnx-jni.so
to your jniLibs, and you don't need libsherpa-onnx-c-api.so or
libsherpa-onnx-cxx-api.so.

libsherpa-onnx-c-api.so and libsherpa-onnx-cxx-api.so are for users
who don't use JNI. In that case, libsherpa-onnx-jni.so is not needed.

In any case, libonnxruntime.is is always needed.
EOF
ls -lh install/lib/README.md
fi
Loading