Skip to content

Commit

Permalink
Fix test on windows x86
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Oct 19, 2023
1 parent 34f8678 commit e87f3db
Showing 1 changed file with 49 additions and 23 deletions.
72 changes: 49 additions & 23 deletions .github/scripts/test-offline-tts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,83 @@ which $EXE
# test waves are saved in ./tts
mkdir ./tts

log "------------------------------------------------------------"
log "vits-ljs test"

wget -qq https://huggingface.co/csukuangfj/vits-ljs/resolve/main/vits-ljs.onnx
wget -qq https://huggingface.co/csukuangfj/vits-ljs/resolve/main/lexicon.txt
wget -qq https://huggingface.co/csukuangfj/vits-ljs/resolve/main/tokens.txt
log "------------------------------------------------------------"

repo_url=https://huggingface.co/csukuangfj/vits-ljs
log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd

$EXE \
--vits-model=./vits-ljs.onnx \
--vits-lexicon=./lexicon.txt \
--vits-tokens=./tokens.txt \
--vits-model=$repo/vits-ljs.onnx \
--vits-lexicon=$repo/lexicon.txt \
--vits-tokens=$repo/tokens.txt \
--output-filename=./tts/vits-ljs.wav \
'liliana, the most beautiful and lovely assistant of our team!'

ls -lh ./tts

rm -v vits-ljs.onnx ./lexicon.txt ./tokens.txt
rm -fv $repo

log "------------------------------------------------------------"
log "vits-vctk test"
wget -qq https://huggingface.co/csukuangfj/vits-vctk/resolve/main/vits-vctk.onnx
wget -qq https://huggingface.co/csukuangfj/vits-vctk/resolve/main/lexicon.txt
wget -qq https://huggingface.co/csukuangfj/vits-vctk/resolve/main/tokens.txt
log "------------------------------------------------------------"

repo_url=https://huggingface.co/csukuangfj/vits-vctk
log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd

for sid in 0 10 90; do
$EXE \
--vits-model=./vits-vctk.onnx \
--vits-lexicon=./lexicon.txt \
--vits-tokens=./tokens.txt \
--vits-model=$repo/vits-vctk.onnx \
--vits-lexicon=$repo/lexicon.txt \
--vits-tokens=$repo/tokens.txt \
--sid=$sid \
--output-filename=./tts/vits-vctk-${sid}.wav \
'liliana, the most beautiful and lovely assistant of our team!'
done

rm -v vits-vctk.onnx ./lexicon.txt ./tokens.txt
rm -fv $repo

ls -lh tts/

log "------------------------------------------------------------"
log "vits-zh-aishell3"

wget -qq https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/vits-aishell3.onnx
wget -qq https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/lexicon.txt
wget -qq https://huggingface.co/csukuangfj/vits-zh-aishell3/resolve/main/tokens.txt
log "------------------------------------------------------------"

repo_url=https://huggingface.co/csukuangfj/vits-zh-aishell3
log "Start testing ${repo_url}"
repo=$(basename $repo_url)
log "Download pretrained model from $repo_url"
GIT_LFS_SKIP_SMUDGE=1 git clone $repo_url
pushd $repo
git lfs pull --include "*.onnx"
ls -lh *.onnx
popd

for sid in 0 10 90; do
$EXE \
--vits-model=./vits-aishell3.onnx \
--vits-lexicon=./lexicon.txt \
--vits-tokens=./tokens.txt \
--vits-model=$repo/vits-aishell3.onnx \
--vits-lexicon=$repo/lexicon.txt \
--vits-tokens=$repo/tokens.txt \
--sid=$sid \
--output-filename=./tts/vits-aishell3-${sid}.wav \
'林美丽最美丽'
done

rm -v vits-aishell3.onnx ./lexicon.txt ./tokens.txt
rm -fv $repo

ls -lh ./tts/

0 comments on commit e87f3db

Please sign in to comment.