Add CXX API for MatchaTTS models (#1676)
This commit is contained in:
55
.github/workflows/cxx-api.yaml
vendored
55
.github/workflows/cxx-api.yaml
vendored
@@ -83,6 +83,61 @@ jobs:
|
||||
otool -L ./install/lib/libsherpa-onnx-cxx-api.dylib
|
||||
fi
|
||||
|
||||
- name: Test Matcha TTS (zh)
|
||||
shell: bash
|
||||
run: |
|
||||
g++ -std=c++17 -o matcha-tts-zh-cxx-api ./cxx-api-examples/matcha-tts-zh-cxx-api.cc \
|
||||
-I ./build/install/include \
|
||||
-L ./build/install/lib/ \
|
||||
-l sherpa-onnx-cxx-api \
|
||||
-l sherpa-onnx-c-api \
|
||||
-l onnxruntime
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-zh-baker.tar.bz2
|
||||
tar xvf matcha-icefall-zh-baker.tar.bz2
|
||||
rm matcha-icefall-zh-baker.tar.bz2
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
./matcha-tts-zh-cxx-api
|
||||
|
||||
rm -rf matcha-icefall-*
|
||||
rm hifigan_v2.onnx
|
||||
rm matcha-tts-zh-cxx-api
|
||||
|
||||
- name: Test Matcha TTS (en)
|
||||
shell: bash
|
||||
run: |
|
||||
g++ -std=c++17 -o matcha-tts-en-cxx-api ./cxx-api-examples/matcha-tts-en-cxx-api.cc \
|
||||
-I ./build/install/include \
|
||||
-L ./build/install/lib/ \
|
||||
-l sherpa-onnx-cxx-api \
|
||||
-l sherpa-onnx-c-api \
|
||||
-l onnxruntime
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/matcha-icefall-en_US-ljspeech.tar.bz2
|
||||
tar xvf matcha-icefall-en_US-ljspeech.tar.bz2
|
||||
rm matcha-icefall-en_US-ljspeech.tar.bz2
|
||||
|
||||
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/vocoder-models/hifigan_v2.onnx
|
||||
|
||||
export LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
|
||||
|
||||
./matcha-tts-en-cxx-api
|
||||
|
||||
rm matcha-tts-en-cxx-api
|
||||
rm -rf matcha-icefall-*
|
||||
rm hifigan_v2.onnx
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: matcha-tts-${{ matrix.os }}
|
||||
path: ./generated-matcha-*.wav
|
||||
|
||||
- name: Test Moonshine tiny
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user