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
25 lines
552 B
C#
25 lines
552 B
C#
/// Copyright (c) 2026 Xiaomi Corporation (authors: Fangjun Kuang)
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace SherpaOnnx
|
|
{
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public struct OfflineCtcFstDecoderConfig
|
|
{
|
|
public OfflineCtcFstDecoderConfig()
|
|
{
|
|
Graph = "";
|
|
MaxActive = 3000;
|
|
}
|
|
|
|
[MarshalAs(UnmanagedType.LPStr)]
|
|
public string Graph;
|
|
|
|
/// <summary>
|
|
/// Decoder max-active setting. 0 means 3000.
|
|
/// </summary>
|
|
public int MaxActive;
|
|
}
|
|
}
|