Add C++ runtime for speech enhancement GTCRN models (#1977)
See also https://github.com/Xiaobin-Rong/gtcrn
This commit is contained in:
32
.github/scripts/test-offline-speech-denoiser.sh
vendored
Executable file
32
.github/scripts/test-offline-speech-denoiser.sh
vendored
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/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]}) $*"
|
||||
}
|
||||
|
||||
if [ -z $EXE ]; then
|
||||
EXE=./build/bin/sherpa-onnx-offline-denoiser
|
||||
fi
|
||||
|
||||
echo "EXE is $EXE"
|
||||
echo "PATH: $PATH"
|
||||
|
||||
which $EXE
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "Run gtcrn"
|
||||
log "------------------------------------------------------------"
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/gtcrn_simple.onnx
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/speech-enhancement-models/speech_with_noise.wav
|
||||
|
||||
$EXE \
|
||||
--debug=1 \
|
||||
--speech-denoiser-gtcrn-model=./gtcrn_simple.onnx \
|
||||
--input-wav=./speech_with_noise.wav \
|
||||
--output-wav=./enhanced_speech_16k.wav
|
||||
|
||||
rm ./gtcrn_simple.onnx
|
||||
16
.github/workflows/linux.yaml
vendored
16
.github/workflows/linux.yaml
vendored
@@ -10,6 +10,7 @@ on:
|
||||
- '.github/workflows/linux.yaml'
|
||||
- '.github/scripts/test-kws.sh'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
- '.github/scripts/test-offline-speech-denoiser.sh'
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
- '.github/scripts/test-offline-ctc.sh'
|
||||
@@ -31,6 +32,7 @@ on:
|
||||
paths:
|
||||
- '.github/workflows/linux.yaml'
|
||||
- '.github/scripts/test-kws.sh'
|
||||
- '.github/scripts/test-offline-speech-denoiser.sh'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
- '.github/scripts/test-online-paraformer.sh'
|
||||
- '.github/scripts/test-offline-transducer.sh'
|
||||
@@ -203,6 +205,15 @@ jobs:
|
||||
overwrite: true
|
||||
file: sherpa-onnx-*.tar.bz2
|
||||
|
||||
- name: Test offline speech denoiser
|
||||
shell: bash
|
||||
run: |
|
||||
du -h -d1 .
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export EXE=sherpa-onnx-offline-denoiser
|
||||
|
||||
.github/scripts/test-offline-speech-denoiser.sh
|
||||
|
||||
- name: Test offline TTS
|
||||
if: matrix.with_tts == 'ON'
|
||||
shell: bash
|
||||
@@ -214,6 +225,11 @@ jobs:
|
||||
.github/scripts/test-offline-tts.sh
|
||||
du -h -d1 .
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: speech-denoiser-${{ matrix.build_type }}-with-shared-lib-${{ matrix.shared_lib }}-with-tts-${{ matrix.with_tts }}
|
||||
path: ./*speech*.wav
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: matrix.with_tts == 'ON'
|
||||
with:
|
||||
|
||||
11
.github/workflows/macos.yaml
vendored
11
.github/workflows/macos.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+*'
|
||||
paths:
|
||||
- '.github/scripts/test-offline-speech-denoiser.sh'
|
||||
- '.github/workflows/macos.yaml'
|
||||
- '.github/scripts/test-kws.sh'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
@@ -28,6 +29,7 @@ on:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '.github/scripts/test-offline-speech-denoiser.sh'
|
||||
- '.github/workflows/macos.yaml'
|
||||
- '.github/scripts/test-kws.sh'
|
||||
- '.github/scripts/test-online-transducer.sh'
|
||||
@@ -160,6 +162,15 @@ jobs:
|
||||
overwrite: true
|
||||
file: sherpa-onnx-*osx-universal2*.tar.bz2
|
||||
|
||||
- name: Test offline speech denoiser
|
||||
shell: bash
|
||||
run: |
|
||||
du -h -d1 .
|
||||
export PATH=$PWD/build/bin:$PATH
|
||||
export EXE=sherpa-onnx-offline-denoiser
|
||||
|
||||
.github/scripts/test-offline-speech-denoiser.sh
|
||||
|
||||
- name: Test offline TTS
|
||||
if: matrix.with_tts == 'ON'
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user