Add function 'tolowerUnicode' in sherpa-onnx-microphone (fix #791) #767
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run-java-test | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/run-java-test.yaml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'java-api-examples/**' | |
- 'sherpa-onnx/csrc/*' | |
- 'sherpa-onnx/jni/*' | |
- 'sherpa-onnx/java-api/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '.github/workflows/run-java-test.yaml' | |
- 'CMakeLists.txt' | |
- 'cmake/**' | |
- 'java-api-examples/**' | |
- 'sherpa-onnx/csrc/*' | |
- 'sherpa-onnx/jni/*' | |
- 'sherpa-onnx/java-api/**' | |
workflow_dispatch: | |
concurrency: | |
group: run-java-test-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
run_java_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.os }}-java | |
- name: OS info | |
shell: bash | |
run: | | |
uname -a | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '21' | |
- name: Display java version | |
shell: bash | |
run: | | |
java -version | |
java -help | |
echo "----" | |
javac -version | |
javac -help | |
echo "JAVA_HOME is: ${JAVA_HOME}" | |
cmake --version | |
- name: Build sherpa-onnx (jar) | |
shell: bash | |
run: | | |
cd sherpa-onnx/java-api/ | |
make | |
ls -lh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sherpa-onnx-jar-${{ matrix.os }} | |
path: sherpa-onnx/java-api/build | |
- name: Build sherpa-onnx (C++) | |
shell: bash | |
run: | | |
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
mkdir build | |
cd build | |
cmake \ | |
-DSHERPA_ONNX_ENABLE_PYTHON=OFF \ | |
-DSHERPA_ONNX_ENABLE_TESTS=OFF \ | |
-DSHERPA_ONNX_ENABLE_CHECK=OFF \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DSHERPA_ONNX_ENABLE_PORTAUDIO=OFF \ | |
-DSHERPA_ONNX_ENABLE_BINARY=OFF \ | |
-DSHERPA_ONNX_ENABLE_JNI=ON \ | |
.. | |
make -j4 | |
ls -lh lib | |
- name: Run java test (Streaming ASR) | |
shell: bash | |
run: | | |
cd ./java-api-examples | |
./run-streaming-decode-file-ctc.sh | |
# Delete model files to save space | |
rm -rf sherpa-onnx-streaming-* | |
./run-streaming-decode-file-ctc-hlg.sh | |
rm -rf sherpa-onnx-streaming-* | |
./run-streaming-decode-file-paraformer.sh | |
rm -rf sherpa-onnx-streaming-* | |
./run-streaming-decode-file-transducer.sh | |
rm -rf sherpa-onnx-streaming-* | |
- name: Run java test (Non-Streaming ASR) | |
shell: bash | |
run: | | |
cd ./java-api-examples | |
./run-non-streaming-decode-file-paraformer.sh | |
rm -rf sherpa-onnx-paraformer-zh-* | |
./run-non-streaming-decode-file-transducer.sh | |
rm -rf sherpa-onnx-zipformer-* | |
./run-non-streaming-decode-file-whisper.sh | |
rm -rf sherpa-onnx-whisper-* | |
./run-non-streaming-decode-file-nemo.sh | |
rm -rf sherpa-onnx-nemo-* |