Add Go API for TTS (#377)
This commit is contained in:
122
.github/workflows/test-go-package.yaml
vendored
122
.github/workflows/test-go-package.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20'
|
||||
go-version: '>=1.12'
|
||||
|
||||
- name: Display go version
|
||||
shell: bash
|
||||
@@ -66,6 +66,121 @@ jobs:
|
||||
run: |
|
||||
gcc --version
|
||||
|
||||
- name: Test non-streaming TTS (Linux/macOS)
|
||||
if: matrix.os != 'windows-latest'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir tts-waves
|
||||
cd go-api-examples/non-streaming-tts
|
||||
ls -lh
|
||||
go mod tidy
|
||||
cat go.mod
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
git clone https://huggingface.co/csukuangfj/vits-zh-aishell3
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-zh-aishell3
|
||||
|
||||
ls -lh *.wav
|
||||
cp *.wav ../../tts-waves/
|
||||
|
||||
- name: Test non-streaming TTS (Win64)
|
||||
if: matrix.os == 'windows-latest' && matrix.arch == 'x64'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir tts-waves
|
||||
cd go-api-examples/non-streaming-tts
|
||||
ls -lh
|
||||
go mod tidy
|
||||
cat go.mod
|
||||
go build
|
||||
ls -lh
|
||||
|
||||
echo $PWD
|
||||
ls -lh /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/
|
||||
ls -lh /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/*
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/x86_64-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
git clone https://huggingface.co/csukuangfj/vits-zh-aishell3
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-zh-aishell3
|
||||
|
||||
ls -lh *.wav
|
||||
cp *.wav ../../tts-waves/
|
||||
|
||||
- name: Test non-streaming TTS (Win32)
|
||||
if: matrix.os == 'windows-latest' && matrix.arch == 'x86'
|
||||
shell: bash
|
||||
run: |
|
||||
cd go-api-examples/non-streaming-tts
|
||||
ls -lh
|
||||
go mod tidy
|
||||
cat go.mod
|
||||
ls -lh
|
||||
|
||||
go env GOARCH
|
||||
go env
|
||||
echo "------------------------------"
|
||||
go env -w GOARCH=386
|
||||
go env -w CGO_ENABLED=1
|
||||
go env
|
||||
|
||||
go clean
|
||||
go build
|
||||
|
||||
echo $PWD
|
||||
ls -lh /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/
|
||||
cp -v /C/Users/runneradmin/go/pkg/mod/github.com/k2-fsa/sherpa-onnx-go-windows*/lib/i686-pc-windows-gnu/*.dll .
|
||||
ls -lh
|
||||
|
||||
git lfs install
|
||||
|
||||
echo "Test vits-ljs"
|
||||
git clone https://huggingface.co/csukuangfj/vits-ljs
|
||||
./run-vits-ljs.sh
|
||||
rm -rf vits-ljs
|
||||
|
||||
echo "Test vits-vctk"
|
||||
git clone https://huggingface.co/csukuangfj/vits-vctk
|
||||
./run-vits-vctk.sh
|
||||
rm -rf vits-vctk
|
||||
|
||||
echo "Test vits-zh-aishell3"
|
||||
git clone https://huggingface.co/csukuangfj/vits-zh-aishell3
|
||||
./run-vits-zh-aishell3.sh
|
||||
rm -rf vits-zh-aishell3
|
||||
|
||||
ls -lh *.wav
|
||||
cp *.wav ../../tts-waves/
|
||||
|
||||
- name: Test non-streaming decoding files (Linux/macOS)
|
||||
if: matrix.os != 'windows-latest'
|
||||
shell: bash
|
||||
@@ -298,3 +413,8 @@ jobs:
|
||||
git clone https://huggingface.co/csukuangfj/sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
./run-paraformer.sh
|
||||
rm -rf sherpa-onnx-streaming-paraformer-bilingual-zh-en
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tts-waves
|
||||
path: tts-waves
|
||||
|
||||
Reference in New Issue
Block a user