Add C API for audio tagging (#754)
This commit is contained in:
13
.github/scripts/test-c-api.sh
vendored
13
.github/scripts/test-c-api.sh
vendored
@@ -10,8 +10,21 @@ log() {
|
||||
|
||||
echo "SLID_EXE is $SLID_EXE"
|
||||
echo "SID_EXE is $SID_EXE"
|
||||
echo "AT_EXE is $AT_EXE"
|
||||
echo "PATH: $PATH"
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Test audio tagging "
|
||||
log "------------------------------------------------------------"
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/audio-tagging-models/sherpa-onnx-zipformer-audio-tagging-2024-04-09.tar.bz2
|
||||
tar xvf sherpa-onnx-zipformer-audio-tagging-2024-04-09.tar.bz2
|
||||
rm sherpa-onnx-zipformer-audio-tagging-2024-04-09.tar.bz2
|
||||
|
||||
$AT_EXE
|
||||
|
||||
rm -rf sherpa-onnx-zipformer-audio-tagging-2024-04-09
|
||||
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Download whisper tiny for spoken language identification "
|
||||
|
||||
18
.github/workflows/linux.yaml
vendored
18
.github/workflows/linux.yaml
vendored
@@ -126,6 +126,16 @@ jobs:
|
||||
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
|
||||
path: build/bin/*
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api
|
||||
export SID_EXE=speaker-identification-c-api
|
||||
export AT_EXE=audio-tagging-c-api
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
- name: Test Audio tagging
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -142,14 +152,6 @@ jobs:
|
||||
|
||||
.github/scripts/test-online-ctc.sh
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api
|
||||
export SID_EXE=speaker-identification-c-api
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
- name: Test spoken language identification (C++ API)
|
||||
shell: bash
|
||||
|
||||
19
.github/workflows/macos.yaml
vendored
19
.github/workflows/macos.yaml
vendored
@@ -105,6 +105,16 @@ jobs:
|
||||
otool -L build/bin/sherpa-onnx
|
||||
otool -l build/bin/sherpa-onnx
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api
|
||||
export SID_EXE=speaker-identification-c-api
|
||||
export AT_EXE=audio-tagging-c-api
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
- name: Test Audio tagging
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -113,15 +123,6 @@ jobs:
|
||||
|
||||
.github/scripts/test-audio-tagging.sh
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api
|
||||
export SID_EXE=speaker-identification-c-api
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
- name: Test spoken language identification (C++ API)
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
20
.github/workflows/windows-x64.yaml
vendored
20
.github/workflows/windows-x64.yaml
vendored
@@ -72,6 +72,17 @@ jobs:
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api.exe
|
||||
export SID_EXE=speaker-identification-c-api.exe
|
||||
export AT_EXE=audio-tagging-c-api.exe
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
|
||||
- name: Test Audio tagging
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -80,15 +91,6 @@ jobs:
|
||||
|
||||
.github/scripts/test-audio-tagging.sh
|
||||
|
||||
- name: Test C API
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api.exe
|
||||
export SID_EXE=speaker-identification-c-api.exe
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
- name: Test spoken language identification (C++ API)
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
2
.github/workflows/windows-x86.yaml
vendored
2
.github/workflows/windows-x86.yaml
vendored
@@ -77,6 +77,8 @@ jobs:
|
||||
run: |
|
||||
export PATH=$PWD/build/bin/Release:$PATH
|
||||
export SLID_EXE=spoken-language-identification-c-api.exe
|
||||
export SID_EXE=speaker-identification-c-api.exe
|
||||
export AT_EXE=audio-tagging-c-api.exe
|
||||
|
||||
.github/scripts/test-c-api.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user