Files
sherpa-onnx/rust-api-examples/run-zipformer-ctc-hlg.sh
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

20 lines
913 B
Bash
Executable File

#!/usr/bin/env bash
set -ex
# see also
# https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
if [ ! -f "./sherpa-onnx-zipformer-ctc-en-2023-10-02/model.int8.onnx" ]; then
curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
tar xvf sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
rm sherpa-onnx-zipformer-ctc-en-2023-10-02.tar.bz2
ls -lh sherpa-onnx-zipformer-ctc-en-2023-10-02
fi
# Offline CTC decoding with an HLG graph via ctc_fst_decoder_config.
cargo run --example zipformer_ctc_hlg -- \
--model ./sherpa-onnx-zipformer-ctc-en-2023-10-02/model.int8.onnx \
--tokens ./sherpa-onnx-zipformer-ctc-en-2023-10-02/tokens.txt \
--graph ./sherpa-onnx-zipformer-ctc-en-2023-10-02/HLG.fst \
--wav ./sherpa-onnx-zipformer-ctc-en-2023-10-02/test_wavs/0.wav