Add C API for speaker embedding extractor. (#711)

This commit is contained in:
Fangjun Kuang
2024-03-28 18:05:40 +08:00
committed by GitHub
parent 638f48f47a
commit 2e0bccad36
23 changed files with 739 additions and 80 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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