Add CI tests for online punctuation models (#1226)
This commit is contained in:
41
.github/scripts/test-online-punctuation.sh
vendored
Executable file
41
.github/scripts/test-online-punctuation.sh
vendored
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
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 "EXE is $EXE"
|
||||||
|
echo "PATH: $PATH"
|
||||||
|
|
||||||
|
which $EXE
|
||||||
|
|
||||||
|
log "------------------------------------------------------------"
|
||||||
|
log "Download the punctuation model "
|
||||||
|
log "------------------------------------------------------------"
|
||||||
|
|
||||||
|
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/punctuation-models/sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
|
||||||
|
|
||||||
|
tar xvf sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
|
||||||
|
rm sherpa-onnx-online-punct-en-2024-08-06.tar.bz2
|
||||||
|
repo=sherpa-onnx-online-punct-en-2024-08-06
|
||||||
|
ls -lh $repo
|
||||||
|
|
||||||
|
for m in model.onnx model.int8.onnx; do
|
||||||
|
$EXE \
|
||||||
|
--debug=1 \
|
||||||
|
--cnn-bilstm=$repo/$m \
|
||||||
|
--bpe-vocab=$repo/bpe.vocab \
|
||||||
|
"How are you i am fine thank you"
|
||||||
|
|
||||||
|
$EXE \
|
||||||
|
--debug=1 \
|
||||||
|
--cnn-bilstm=$repo/$m \
|
||||||
|
--bpe-vocab=$repo/bpe.vocab \
|
||||||
|
"The African blogosphere is rapidly expanding bringing more voices online in the form of commentaries opinions analyses rants and poetry"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf $repo
|
||||||
12
.github/workflows/linux.yaml
vendored
12
.github/workflows/linux.yaml
vendored
@@ -17,6 +17,7 @@ on:
|
|||||||
- '.github/scripts/test-offline-tts.sh'
|
- '.github/scripts/test-offline-tts.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -36,6 +37,7 @@ on:
|
|||||||
- '.github/scripts/test-offline-tts.sh'
|
- '.github/scripts/test-offline-tts.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -141,6 +143,16 @@ jobs:
|
|||||||
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
|
name: release-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
|
||||||
path: install/*
|
path: install/*
|
||||||
|
|
||||||
|
- name: Test online punctuation
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
du -h -d1 .
|
||||||
|
export PATH=$PWD/build/bin:$PATH
|
||||||
|
export EXE=sherpa-onnx-online-punctuation
|
||||||
|
|
||||||
|
.github/scripts/test-online-punctuation.sh
|
||||||
|
du -h -d1 .
|
||||||
|
|
||||||
- name: Test offline transducer
|
- name: Test offline transducer
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
10
.github/workflows/macos.yaml
vendored
10
.github/workflows/macos.yaml
vendored
@@ -17,6 +17,7 @@ on:
|
|||||||
- '.github/scripts/test-online-ctc.sh'
|
- '.github/scripts/test-online-ctc.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -35,6 +36,7 @@ on:
|
|||||||
- '.github/scripts/test-online-ctc.sh'
|
- '.github/scripts/test-online-ctc.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -113,6 +115,14 @@ jobs:
|
|||||||
otool -L build/bin/sherpa-onnx
|
otool -L build/bin/sherpa-onnx
|
||||||
otool -l build/bin/sherpa-onnx
|
otool -l build/bin/sherpa-onnx
|
||||||
|
|
||||||
|
- name: Test online punctuation
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export PATH=$PWD/build/bin:$PATH
|
||||||
|
export EXE=sherpa-onnx-online-punctuation
|
||||||
|
|
||||||
|
.github/scripts/test-online-punctuation.sh
|
||||||
|
|
||||||
- name: Test offline transducer
|
- name: Test offline transducer
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
8
.github/workflows/sanitizer.yaml
vendored
8
.github/workflows/sanitizer.yaml
vendored
@@ -76,6 +76,14 @@ jobs:
|
|||||||
otool -L build/bin/sherpa-onnx
|
otool -L build/bin/sherpa-onnx
|
||||||
otool -l build/bin/sherpa-onnx
|
otool -l build/bin/sherpa-onnx
|
||||||
|
|
||||||
|
- name: Test online punctuation
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export PATH=$PWD/build/bin:$PATH
|
||||||
|
export EXE=sherpa-onnx-online-punctuation
|
||||||
|
|
||||||
|
.github/scripts/test-online-punctuation.sh
|
||||||
|
|
||||||
- name: Test offline punctuation
|
- name: Test offline punctuation
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
10
.github/workflows/windows-x64.yaml
vendored
10
.github/workflows/windows-x64.yaml
vendored
@@ -16,6 +16,7 @@ on:
|
|||||||
- '.github/scripts/test-offline-tts.sh'
|
- '.github/scripts/test-offline-tts.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -32,6 +33,7 @@ on:
|
|||||||
- '.github/scripts/test-offline-tts.sh'
|
- '.github/scripts/test-offline-tts.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -85,6 +87,14 @@ jobs:
|
|||||||
name: release-windows-x64-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
|
name: release-windows-x64-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
|
||||||
path: build/install/*
|
path: build/install/*
|
||||||
|
|
||||||
|
- name: Test online punctuation
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export PATH=$PWD/build/bin/Release:$PATH
|
||||||
|
export EXE=sherpa-onnx-online-punctuation.exe
|
||||||
|
|
||||||
|
.github/scripts/test-online-punctuation.sh
|
||||||
|
|
||||||
- name: Test offline punctuation
|
- name: Test offline punctuation
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
10
.github/workflows/windows-x86.yaml
vendored
10
.github/workflows/windows-x86.yaml
vendored
@@ -16,6 +16,7 @@ on:
|
|||||||
- '.github/scripts/test-online-ctc.sh'
|
- '.github/scripts/test-online-ctc.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -32,6 +33,7 @@ on:
|
|||||||
- '.github/scripts/test-online-ctc.sh'
|
- '.github/scripts/test-online-ctc.sh'
|
||||||
- '.github/scripts/test-audio-tagging.sh'
|
- '.github/scripts/test-audio-tagging.sh'
|
||||||
- '.github/scripts/test-offline-punctuation.sh'
|
- '.github/scripts/test-offline-punctuation.sh'
|
||||||
|
- '.github/scripts/test-online-punctuation.sh'
|
||||||
- 'CMakeLists.txt'
|
- 'CMakeLists.txt'
|
||||||
- 'cmake/**'
|
- 'cmake/**'
|
||||||
- 'sherpa-onnx/csrc/*'
|
- 'sherpa-onnx/csrc/*'
|
||||||
@@ -85,6 +87,14 @@ jobs:
|
|||||||
name: release-windows-x86-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
|
name: release-windows-x86-${{ matrix.shared_lib }}-${{ matrix.with_tts }}
|
||||||
path: build/install/*
|
path: build/install/*
|
||||||
|
|
||||||
|
- name: Test online punctuation
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
export PATH=$PWD/build/bin/Release:$PATH
|
||||||
|
export EXE=sherpa-onnx-online-punctuation.exe
|
||||||
|
|
||||||
|
.github/scripts/test-online-punctuation.sh
|
||||||
|
|
||||||
- name: Test offline punctuation
|
- name: Test offline punctuation
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user