Add C API for punctuation (#768)

This commit is contained in:
Fangjun Kuang
2024-04-14 19:02:34 +08:00
committed by GitHub
parent b0265b258d
commit 13730ecbd8
13 changed files with 302 additions and 12 deletions

View File

@@ -11,8 +11,21 @@ log() {
echo "SLID_EXE is $SLID_EXE"
echo "SID_EXE is $SID_EXE"
echo "AT_EXE is $AT_EXE"
echo "PUNCT_EXE is $PUNCT_EXE"
echo "PATH: $PATH"
log "------------------------------------------------------------"
log "Test adding punctuations "
log "------------------------------------------------------------"
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
ls -lh
tar xf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
ls -lh sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12
rm sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12.tar.bz2
$PUNCT_EXE
rm -rf sherpa-onnx-punct-ct-transformer-zh-en-vocab272727-2024-04-12
log "------------------------------------------------------------"
log "Test audio tagging "
log "------------------------------------------------------------"

View File

@@ -126,7 +126,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
path: build/bin/*
path: install/*
- name: Test offline punctuation
shell: bash
@@ -143,6 +143,7 @@ jobs:
export SLID_EXE=spoken-language-identification-c-api
export SID_EXE=speaker-identification-c-api
export AT_EXE=audio-tagging-c-api
export PUNCT_EXE=add-punctuation-c-api
.github/scripts/test-c-api.sh

View File

@@ -122,6 +122,7 @@ jobs:
export SLID_EXE=spoken-language-identification-c-api
export SID_EXE=speaker-identification-c-api
export AT_EXE=audio-tagging-c-api
export PUNCT_EXE=add-punctuation-c-api
.github/scripts/test-c-api.sh

View File

@@ -89,6 +89,7 @@ jobs:
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
export PUNCT_EXE=add-punctuation-c-api.exe
.github/scripts/test-c-api.sh

View File

@@ -89,6 +89,7 @@ jobs:
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
export PUNCT_EXE=add-punctuation-c-api.exe
.github/scripts/test-c-api.sh