-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
348d9b5
commit 2e58493
Showing
24 changed files
with
439 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
log() { | ||
# This function is from espnet | ||
local fname=${BASH_SOURCE[1]##*/} | ||
echo -e "$(date '+%Y-%m-%d %H:%M:%S') (${fname}:${BASH_LINENO[0]}:${FUNCNAME[1]}) $*" | ||
} | ||
|
||
echo "EXE is $EXE" | ||
echo "PATH: $PATH" | ||
|
||
which $EXE | ||
|
||
cd build | ||
|
||
curl -SL -O https://github.com/k2-fsa/sherpa-ncnn/releases/download/models/sherpa-ncnn-silero-vad.tar.bz2 | ||
tar xvf sherpa-ncnn-silero-vad.tar.bz2 | ||
rm sherpa-ncnn-silero-vad.tar.bz2 | ||
ls -lh sherpa-ncnn-silero-vad | ||
|
||
curl -SL -O https://github.com/k2-fsa/sherpa-ncnn/releases/download/models/lei-jun-test.wav | ||
|
||
$EXE | ||
|
||
ls -lh *.wav | ||
rm -rfv sherpa-ncnn-* | ||
rm *.wav |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-android | ||
|
||
- name: Display NDK HOME | ||
shell: bash | ||
run: | | ||
|
@@ -62,6 +67,9 @@ jobs: | |
- name: build android arm64-v8a | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-arm64-v8a.sh | ||
mkdir -p jniLibs/arm64-v8a/ | ||
|
@@ -70,6 +78,9 @@ jobs: | |
- name: build android armv7-eabi | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-armv7-eabi.sh | ||
mkdir -p ./jniLibs/armeabi-v7a/ | ||
|
@@ -78,6 +89,9 @@ jobs: | |
- name: build android x86_64 | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-x86-64.sh | ||
mkdir -p ./jniLibs/x86_64 | ||
|
@@ -86,6 +100,9 @@ jobs: | |
- name: build android x86 | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
export ANDROID_NDK=$ANDROID_NDK_LATEST_HOME | ||
./build-android-x86.sh | ||
mkdir -p ./jniLibs/x86 | ||
|
@@ -117,10 +134,11 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "Fangjun Kuang" | ||
export GIT_CLONE_PROTECTION_ACTIVE=false | ||
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/sherpa-ncnn-libs huggingface | ||
cd huggingface | ||
git lfs pull | ||
git pull | ||
cp -v ../sherpa-ncnn-*-android.tar.bz2 ./ | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ on: | |
- 'sherpa-ncnn/jni/*' | ||
- '.github/scripts/test-jni.sh' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: jni-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -42,6 +44,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-jni | ||
|
||
- name: Display kotlin version | ||
shell: bash | ||
run: | | ||
|
@@ -56,4 +63,7 @@ jobs: | |
- name: Run JNI test | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
.github/scripts/test-jni.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
paths: | ||
- '.github/workflows/linux.yaml' | ||
- '.github/scripts/run-test.sh' | ||
- '.github/scripts/test-vad.sh' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'sherpa-ncnn/csrc/*' | ||
|
@@ -16,11 +17,14 @@ on: | |
paths: | ||
- '.github/workflows/linux.yaml' | ||
- '.github/scripts/run-test.sh' | ||
- '.github/scripts/test-vad.sh' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'sherpa-ncnn/csrc/*' | ||
- 'sherpa-ncnn/csrc/*' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: linux-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -37,19 +41,31 @@ jobs: | |
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-linux | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
cmake --version | ||
mkdir build | ||
cd build | ||
cmake -D CMAKE_BUILD_TYPE=Release -DSHERPA_NCNN_ENABLE_FFMPEG_EXAMPLES=OFF .. | ||
- name: Build sherpa-ncnn for ubuntu | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
cd build | ||
make -j2 | ||
|
@@ -59,6 +75,9 @@ jobs: | |
ls -lh bin/sherpa-ncnn | ||
file bin/sherpa-ncnn | ||
ls -lh bin/sherpa-ncnn-vad | ||
file bin/sherpa-ncnn-vad | ||
ls -lh bin/sherpa-ncnn-microphone | ||
file bin/sherpa-ncnn-microphone | ||
|
@@ -71,6 +90,13 @@ jobs: | |
name: sherpa-ncnn-pre-built-binaries-os-${{ matrix.os }} | ||
path: ./build/bin | ||
|
||
- name: Test vad | ||
run: | | ||
export PATH=$PWD/build/bin:$PATH | ||
export EXE=sherpa-ncnn-vad | ||
.github/scripts/test-vad.sh | ||
- name: Test sherpa-ncnn | ||
run: | | ||
export PATH=$PWD/build/bin:$PATH | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
paths: | ||
- '.github/workflows/macos.yaml' | ||
- '.github/scripts/run-test.sh' | ||
- '.github/scripts/test-vad.sh' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'sherpa-ncnn/csrc/*' | ||
|
@@ -16,10 +17,13 @@ on: | |
paths: | ||
- '.github/workflows/macos.yaml' | ||
- '.github/scripts/run-test.sh' | ||
- '.github/scripts/test-vad.sh' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'sherpa-ncnn/csrc/*' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: macos-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -33,22 +37,34 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest] | ||
os: [macos-latest, macos-13] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-macos | ||
|
||
- name: Configure CMake | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
cmake --version | ||
mkdir build | ||
cd build | ||
cmake -D CMAKE_BUILD_TYPE=Release .. | ||
- name: Build sherpa-ncnn for macos | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
cd build | ||
make -j2 | ||
|
@@ -58,6 +74,9 @@ jobs: | |
ls -lh bin/sherpa-ncnn | ||
file bin/sherpa-ncnn | ||
ls -lh bin/sherpa-ncnn-vad | ||
file bin/sherpa-ncnn-vad | ||
ls -lh bin/sherpa-ncnn-microphone | ||
file bin/sherpa-ncnn-microphone | ||
|
@@ -70,6 +89,13 @@ jobs: | |
name: sherpa-ncnn-pre-built-binaries-os-${{ matrix.os }} | ||
path: ./build/bin | ||
|
||
- name: Test vad | ||
run: | | ||
export PATH=$PWD/build/bin:$PATH | ||
export EXE=sherpa-ncnn-vad | ||
.github/scripts/test-vad.sh | ||
- name: Test sherpa-ncnn | ||
run: | | ||
export PATH=$PWD/build/bin:$PATH | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-npm | ||
|
||
- name: Install emsdk | ||
uses: mymindstorm/setup-emsdk@v14 | ||
|
||
|
@@ -59,6 +64,9 @@ jobs: | |
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
./build-wasm-simd-for-nodejs.sh | ||
cp -v build-wasm-simd-for-nodejs/install/bin/wasm/sherpa-ncnn-wasm-main.js ./scripts/nodejs | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,8 @@ on: | |
- 'sherpa-ncnn/swift-api-examples/*' | ||
- 'build-swift-macos.sh' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: swift-api-test-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -44,7 +46,15 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-swift | ||
|
||
- name: Run swift-api-test | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
.github/scripts/swift-api-test.sh |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,12 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-wasm | ||
|
||
- name: Install emsdk | ||
uses: mymindstorm/setup-emsdk@v14 | ||
|
||
|
@@ -53,6 +59,9 @@ jobs: | |
- name: Build sherpa-ncnn for WebAssembly | ||
shell: bash | ||
run: | | ||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
./build-wasm-simd.sh | ||
- name: collect files | ||
|
Oops, something went wrong.