Add C API for spoken language identification. (#695)

This commit is contained in:
Fangjun Kuang
2024-03-25 15:16:47 +08:00
committed by GitHub
parent 0d258dd150
commit ab7cff2513
18 changed files with 366 additions and 70 deletions

26
.github/scripts/test-c-api.sh vendored Executable file
View File

@@ -0,0 +1,26 @@
#!/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 "SLID_EXE is $SLID_EXE"
echo "PATH: $PATH"
log "------------------------------------------------------------"
log "Download whisper tiny for spoken language identification "
log "------------------------------------------------------------"
rm -rf sherpa-onnx-whisper-tiny*
curl -LS -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-whisper-tiny.tar.bz2
tar xvf sherpa-onnx-whisper-tiny.tar.bz2
rm sherpa-onnx-whisper-tiny.tar.bz2
$SLID_EXE
rm -rf sherpa-onnx-whisper-tiny*