Add C API for speaker embedding extractor. (#711)
This commit is contained in:
15
.github/scripts/test-c-api.sh
vendored
15
.github/scripts/test-c-api.sh
vendored
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
log() {
|
||||
# This function is from espnet
|
||||
@@ -9,6 +9,7 @@ log() {
|
||||
}
|
||||
|
||||
echo "SLID_EXE is $SLID_EXE"
|
||||
echo "SID_EXE is $SID_EXE"
|
||||
echo "PATH: $PATH"
|
||||
|
||||
|
||||
@@ -24,3 +25,15 @@ rm sherpa-onnx-whisper-tiny.tar.bz2
|
||||
$SLID_EXE
|
||||
|
||||
rm -rf sherpa-onnx-whisper-tiny*
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Download file for speaker identification and verification "
|
||||
log "------------------------------------------------------------"
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speaker-recongition-models/3dspeaker_speech_campplus_sv_zh-cn_16k-common.onnx
|
||||
git clone https://github.com/csukuangfj/sr-data
|
||||
|
||||
$SID_EXE
|
||||
|
||||
rm -fv *.onnx
|
||||
rm -rf sr-data
|
||||
|
||||
3
.github/workflows/linux.yaml
vendored
3
.github/workflows/linux.yaml
vendored
@@ -124,11 +124,12 @@ jobs:
|
||||
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
|
||||
path: build/bin/*
|
||||
|
||||
- name: Test spoken language identification (C API)
|
||||
- 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
|
||||
|
||||
|
||||
3
.github/workflows/macos.yaml
vendored
3
.github/workflows/macos.yaml
vendored
@@ -103,11 +103,12 @@ jobs:
|
||||
otool -L build/bin/sherpa-onnx
|
||||
otool -l build/bin/sherpa-onnx
|
||||
|
||||
- name: Test spoken language identification (C API)
|
||||
- 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
|
||||
|
||||
|
||||
3
.github/workflows/windows-x64.yaml
vendored
3
.github/workflows/windows-x64.yaml
vendored
@@ -70,11 +70,12 @@ jobs:
|
||||
|
||||
ls -lh ./bin/Release/sherpa-onnx.exe
|
||||
|
||||
- name: Test spoken language identification (C API)
|
||||
- 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user