mirror of
https://github.com/k2-fsa/sherpa-onnx.git
synced 2026-11-10 21:11:03 +08:00
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
22 lines
770 B
JavaScript
22 lines
770 B
JavaScript
// Copyright (c) 2026 Xiaomi Corporation
|
|
//
|
|
// Print the sherpa-onnx and onnxruntime versions.
|
|
//
|
|
// Usage:
|
|
// node test_version.js
|
|
|
|
const sherpa_onnx = require('sherpa-onnx-node');
|
|
|
|
console.log(`sherpa-onnx version: ${sherpa_onnx.version}`);
|
|
console.log(`sherpa-onnx gitSha1: ${sherpa_onnx.gitSha1}`);
|
|
console.log(`sherpa-onnx gitDate: ${sherpa_onnx.gitDate}`);
|
|
console.log(`onnxruntime version: ${sherpa_onnx.onnxruntimeVersion}`);
|
|
|
|
if (typeof sherpa_onnx.version !== 'string' || sherpa_onnx.version.length === 0) {
|
|
throw new Error('sherpa_onnx.version is missing or empty');
|
|
}
|
|
if (typeof sherpa_onnx.onnxruntimeVersion !== 'string' ||
|
|
sherpa_onnx.onnxruntimeVersion.length === 0) {
|
|
throw new Error('sherpa_onnx.onnxruntimeVersion is missing or empty');
|
|
}
|