Use piper-phonemize to convert text to token IDs (#453)
This commit is contained in:
11
.github/scripts/test-nodejs-npm.sh
vendored
11
.github/scripts/test-nodejs-npm.sh
vendored
@@ -52,14 +52,13 @@ node ./test-online-transducer.js
|
||||
rm -rf sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20
|
||||
|
||||
# offline tts
|
||||
curl -LS -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-vctk.tar.bz2
|
||||
tar xvf vits-vctk.tar.bz2
|
||||
rm vits-vctk.tar.bz2
|
||||
|
||||
curl -LS -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
|
||||
tar xf vits-piper-en_US-amy-low.tar.bz2
|
||||
node ./test-offline-tts-en.js
|
||||
rm -rf vits-vctk
|
||||
rm vits-piper-en_US-amy-low.tar.bz2
|
||||
|
||||
curl -LS -O https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-aishell3.tar.bz2
|
||||
tar xvf vits-zh-aishell3.tar.bz2
|
||||
rm vits-zh-aishell3.tar.bz2
|
||||
node ./test-offline-tts-zh.js
|
||||
rm -rf vits-zh-aishell3
|
||||
rm vits-zh-aishell3.tar.bz2
|
||||
|
||||
18
.github/scripts/test-offline-tts.sh
vendored
18
.github/scripts/test-offline-tts.sh
vendored
@@ -16,6 +16,24 @@ which $EXE
|
||||
# test waves are saved in ./tts
|
||||
mkdir ./tts
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "vits-piper-en_US-amy-low"
|
||||
log "------------------------------------------------------------"
|
||||
curl -O -SL https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
|
||||
tar xf vits-piper-en_US-amy-low.tar.bz2
|
||||
rm vits-piper-en_US-amy-low.tar.bz2
|
||||
|
||||
$EXE \
|
||||
--vits-model=./vits-piper-en_US-amy-low/en_US-amy-low.onnx \
|
||||
--vits-tokens=./vits-piper-en_US-amy-low/tokens.txt \
|
||||
--vits-data-dir=./vits-piper-en_US-amy-low/espeak-ng-data \
|
||||
--debug=1 \
|
||||
--output-filename=./tts/amy.wav \
|
||||
"“Today as always, men fall into two groups: slaves and free men. Whoever does not have two-thirds of his day for himself, is a slave, whatever he may be: a statesman, a businessman, an official, or a scholar.” The sun shone bleakly in the sky, its meager light struggling to penetrate the thick foliage of the forest. Birds sang their songs up in the crowns of the trees, fluttering from one branch to the other. A blanket of total tranquility lied over the forest. The peace was only broken by the steady gallop of the horses of the soldiers who were traveling to their upcoming knighting the morrow at Camelot, and rowdy conversation. “Finally we will get what we deserve,” “It’s been about time,” Perceval agreed. “We’ve been risking our arses for the past two years. It’s the least they could give us.” Merlin remained ostensibly silent, refusing to join the verbal parade of self-aggrandizing his fellow soldiers have engaged in. He found it difficult to happy about anything, when even if they had won the war, he had lost everything else in the process."
|
||||
|
||||
file ./tts/amy.wav
|
||||
rm -rf vits-piper-en_US-amy-low
|
||||
|
||||
log "------------------------------------------------------------"
|
||||
log "vits-ljs test"
|
||||
log "------------------------------------------------------------"
|
||||
|
||||
4
.github/workflows/apk-tts.yaml
vendored
4
.github/workflows/apk-tts.yaml
vendored
@@ -26,8 +26,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
total: ["12"]
|
||||
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11"]
|
||||
total: ["30"]
|
||||
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
80
.github/workflows/test-build-wheel.yaml
vendored
Normal file
80
.github/workflows/test-build-wheel.yaml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: test-build-wheel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
pull_request:
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: test-build-wheel-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-build-wheel:
|
||||
name: ${{ matrix.os }} ${{ matrix.python_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
python-version: ["3.8", "3.9", "3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ matrix.os }}-${{ matrix.python_version }}
|
||||
|
||||
- name: Install python dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install wheel twine setuptools
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
cmake --version
|
||||
|
||||
export SHERPA_ONNX_MAKE_ARGS="VERBOSE=1 -j"
|
||||
|
||||
python3 setup.py bdist_wheel
|
||||
ls -lh dist
|
||||
|
||||
- name: Display wheel
|
||||
shell: bash
|
||||
run: |
|
||||
ls -lh dist
|
||||
|
||||
- name: Install wheel
|
||||
shell: bash
|
||||
run: |
|
||||
pip install --verbose ./dist/*.whl
|
||||
|
||||
- name: Test
|
||||
shell: bash
|
||||
run: |
|
||||
# For windows
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.7.9/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.8.10/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.9.13/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.10.11/x64/bin:$PATH
|
||||
export PATH=/c/hostedtoolcache/windows/Python/3.11.6/x64/bin:$PATH
|
||||
|
||||
which sherpa-onnx
|
||||
sherpa-onnx --help
|
||||
4
.github/workflows/test-nodejs.yaml
vendored
4
.github/workflows/test-nodejs.yaml
vendored
@@ -70,6 +70,10 @@ jobs:
|
||||
mkdir -p scripts/nodejs/lib/win-x64
|
||||
dst=scripts/nodejs/lib/win-x64
|
||||
fi
|
||||
ls -lh build/install/lib/
|
||||
|
||||
rm -rf build/install/lib/pkgconfig
|
||||
|
||||
cp -v build/install/lib/* $dst/
|
||||
|
||||
- name: replace files
|
||||
|
||||
Reference in New Issue
Block a user