Files
sherpa-onnx/.github/workflows/test-nodejs-npm.yaml
T
Fangjun Kuang 0b3647632f Remove espeak-ng and piper-phonemize from sherpa-onnx (#4055)
Fixes #3731

espeak-ng and piper-phonemize are no longer built into sherpa-onnx.

Text frontends are now:

- **lexicon** — built in, no extra dependency
- **phonemize** — phonemize outside sherpa-onnx (e.g. [piper-phonemize](https://github.com/csukuangfj/piper-phonemize)) and pass the result in. That library is GPL, so it stays optional: sherpa-onnx is GPL-free after this PR.

## API

- `SherpaOnnxGenerationConfig` gains `phoneme_codepoints` and `tokens` (mutually exclusive alternatives to `text`)
- `data_dir` on the TTS model configs is deprecated and ignored; the ABI slot is kept
- all bindings updated: C/C++, Python, Java, Kotlin, Go, Rust, C#, Swift, Pascal, Dart/Flutter, node-addon, WASM, HarmonyOS
2026-10-20 11:09:04 +08:00

64 lines
1.5 KiB
YAML

name: test-nodejs-npm
on:
workflow_dispatch:
concurrency:
group: test-nodejs-npm-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-nodejs-npm:
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2022]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update version
shell: bash
run: |
./new-release.sh
git diff .
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
- name: Display node version
shell: bash
run: |
node --version
npm --version
- name: Run tests
shell: bash
run: |
node --version
npm --version
export d=nodejs-examples
./.github/scripts/test-nodejs-npm.sh
- uses: actions/upload-artifact@v4
with:
name: tts-waves-${{ matrix.os }}-${{ matrix.node-version }}
# all TTS outputs: *-lexicon.wav, *-phonemize.wav, plus the
# own-frontend models (test-pocket-en.wav, test-supertonic-*.wav)
path: nodejs-examples/test-*.wav
if-no-files-found: warn