From e7432cd042734b951bd10eddc7c7a8c7f60ac163 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 23 Oct 2023 15:27:18 +0800 Subject: [PATCH] Fix jni test (#382) --- .github/workflows/pkg-config.yaml | 2 +- kotlin-api-examples/run.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkg-config.yaml b/.github/workflows/pkg-config.yaml index 6a15f06f4..35ede5a77 100644 --- a/.github/workflows/pkg-config.yaml +++ b/.github/workflows/pkg-config.yaml @@ -33,7 +33,7 @@ concurrency: cancel-in-progress: true jobs: - linux: + pkg_config: runs-on: ${{ matrix.os }} name: ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }} strategy: diff --git a/kotlin-api-examples/run.sh b/kotlin-api-examples/run.sh index a4c368b18..21e36430a 100755 --- a/kotlin-api-examples/run.sh +++ b/kotlin-api-examples/run.sh @@ -11,7 +11,7 @@ cd .. mkdir -p build cd build -if [ ! -f ../build/lib/libsherpa-onnx-jni.dylib ]; then +if [[ ! -f ../build/lib/libsherpa-onnx-jni.dylib && ! -f ../build/lib/libsherpa-onnx-jni.so ]]; then cmake \ -DSHERPA_ONNX_ENABLE_PYTHON=OFF \ -DSHERPA_ONNX_ENABLE_TESTS=OFF \ @@ -34,6 +34,11 @@ if [ ! -f ./sherpa-onnx-streaming-zipformer-en-2023-02-21/tokens.txt ]; then git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-zipformer-en-2023-02-21 fi +if [ ! -f ./vits-zh-aishell3/tokens.txt ]; then + git lfs install + git clone https://huggingface.co/csukuangfj/vits-zh-aishell3 +fi + kotlinc-jvm -include-runtime -d main.jar Main.kt WaveReader.kt SherpaOnnx.kt faked-asset-manager.kt Tts.kt ls -lh main.jar