Files
sherpa-onnx/.github/workflows/test-pip-install.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

179 lines
5.4 KiB
YAML

name: test-pip-install
on:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: test-pip-install-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test_pip_install:
if: github.repository_owner == 'csukuangfj' || github.repository_owner == 'k2-fsa'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.architecture || ((contains(matrix.os, 'arm') || matrix.os == 'macos-14' || matrix.os == 'macos-latest') && 'arm64' || 'x64') }}
strategy:
fail-fast: false
matrix:
# See https://github.com/actions/runner-images
include:
# Linux x64
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.11"
- os: ubuntu-latest
python-version: "3.12"
- os: ubuntu-latest
python-version: "3.13"
- os: ubuntu-latest
python-version: "3.14"
# Linux arm64
- os: ubuntu-24.04-arm
python-version: "3.10"
- os: ubuntu-24.04-arm
python-version: "3.11"
- os: ubuntu-24.04-arm
python-version: "3.12"
- os: ubuntu-24.04-arm
python-version: "3.13"
- os: ubuntu-24.04-arm
python-version: "3.14"
# macOS x64
- os: macos-15-intel
python-version: "3.8"
- os: macos-15-intel
python-version: "3.9"
# macOS arm64
- os: macos-14
python-version: "3.10"
- os: macos-14
python-version: "3.11"
- os: macos-latest
python-version: "3.12"
- os: macos-latest
python-version: "3.13"
# Windows x64
- os: windows-2022
python-version: "3.8"
- os: windows-2022
python-version: "3.9"
- os: windows-2022
python-version: "3.10"
- os: windows-2022
python-version: "3.11"
- os: windows-2022
python-version: "3.12"
- os: windows-2022
python-version: "3.13"
- os: windows-2022
python-version: "3.14"
# Windows arm64
- os: windows-11-arm
python-version: "3.11"
- os: windows-11-arm
python-version: "3.12"
- os: windows-11-arm
python-version: "3.13"
- os: windows-11-arm
python-version: "3.14"
# Windows x86
- os: windows-2022
python-version: "3.8"
architecture: x86
- os: windows-2022
python-version: "3.9"
architecture: x86
- os: windows-2022
python-version: "3.10"
architecture: x86
- os: windows-2022
python-version: "3.11"
architecture: x86
- os: windows-2022
python-version: "3.12"
architecture: x86
- os: windows-2022
python-version: "3.13"
architecture: x86
- os: windows-2022
python-version: "3.14"
architecture: x86
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 }}
architecture: ${{ matrix.architecture || ((contains(matrix.os, 'arm') || matrix.os == 'macos-14' || matrix.os == 'macos-latest') && 'arm64' || 'x64') }}
- name: Install sherpa-onnx
shell: bash
run: |
pip install --verbose -U sherpa-onnx sherpa-onnx-core sherpa-onnx-bin || \
pip install --verbose -U sherpa-onnx sherpa-onnx-core sherpa-onnx-bin -f https://k2-fsa.github.io/sherpa/onnx/cpu.html
- name: Test sherpa-onnx-bin
shell: bash
run: |
sherpa-onnx-version
sherpa-onnx --help
sherpa-onnx-keyword-spotter --help
sherpa-onnx-offline --help
sherpa-onnx-offline-tts --help
sherpa-onnx-microphone --help
sherpa-onnx-microphone-offline --help
sherpa-onnx-offline-websocket-server --help
sherpa-onnx-online-websocket-server --help
sherpa-onnx-online-websocket-client --help
- name: Test sherpa-onnx-core
shell: bash
run: |
python3 -m sherpa_onnx --cflags
python3 -m sherpa_onnx --c-api-libs
python3 -m sherpa_onnx --c-api-libs-only-L
python3 -m sherpa_onnx --c-api-libs-only-l
python3 -m sherpa_onnx --cxx-api-libs
python3 -m sherpa_onnx --cxx-api-libs-only-L
python3 -m sherpa_onnx --cxx-api-libs-only-l
- name: Test sherpa-onnx
shell: bash
run: |
python3 -c "import sherpa_onnx; print(sherpa_onnx.__file__)"
python3 -c "import sherpa_onnx; print(sherpa_onnx.__version__)"
python3 -c "import sherpa_onnx; print(sherpa_onnx.OnlineRecognizer)"
python3 -c "import sherpa_onnx; print(sherpa_onnx.OfflineRecognizer)"