LocalAI/backend/go
Richard Palethorpe 13734ae9fa
feat: Add Sherpa ONNX backend for ASR and TTS (#8523)
feat(backend): Add Sherpa ONNX backend and Omnilingual ASR

Adds a new Go backend wrapping sherpa-onnx via purego (no cgo). Same
approach as opus/stablediffusion-ggml/whisper — a thin C shim
(csrc/shim.c + shim.h → libsherpa-shim.so) wraps the bits purego
can't reach directly: nested struct config writes, result-struct field
reads, and the streaming TTS callback trampoline. The Go side uses
opaque uintptr handles and purego.NewCallback for the TTS callback.

Supports:
- VAD via sherpa-onnx's Silero VAD
- Offline ASR: Whisper, Paraformer, SenseVoice, Omnilingual CTC
- Online/streaming ASR: zipformer transducer with endpoint detection
  (AudioTranscriptionStream emits delta events during decode)
- Offline TTS: VITS (LJS, etc.)
- Streaming TTS: sherpa-onnx's callback API → PCM chunks on a channel,
  prefixed by a streaming WAV header

Gallery entries: omnilingual-0.3b-ctc-q8-sherpa (1600-language offline
ASR), streaming-zipformer-en-sherpa (low-latency streaming ASR),
silero-vad-sherpa, vits-ljs-sherpa.

E2E coverage: tests/e2e-backends for offline + streaming ASR,
tests/e2e for the full realtime pipeline (VAD + STT + TTS).

Assisted-by: claude-opus-4-7-1M [Claude Code]

Signed-off-by: Richard Palethorpe <io@richiejp.com>
2026-04-24 14:40:06 +02:00
..
acestep-cpp chore: ⬆️ Update ace-step/acestep.cpp to e0c8d75a672fca5684c88c68dbf6d12f58754258 (#9261) 2026-04-07 00:39:24 +02:00
llm/llama feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
local-store feat: add biometrics UI (#9524) 2026-04-24 08:50:34 +02:00
opus feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
piper fix(package.sh): drop redundant -a and -R 2026-02-05 16:39:38 +01:00
qwen3-tts-cpp feat(qwen3tts.cpp): add new backend (#9316) 2026-04-11 23:14:26 +02:00
sam3-cpp feat(rocm): bump to 7.x (#9323) 2026-04-12 08:51:30 +02:00
sherpa-onnx feat: Add Sherpa ONNX backend for ASR and TTS (#8523) 2026-04-24 14:40:06 +02:00
silero-vad fix(package.sh): drop redundant -a and -R 2026-02-05 16:39:38 +01:00
stablediffusion-ggml chore: ⬆️ Update leejet/stable-diffusion.cpp to c97702e1057c2fe13a7074cd9069cb9dd6edc1bf (#9495) 2026-04-23 09:32:21 +02:00
voxtral feat: wire transcription for llama.cpp, add streaming support (#9353) 2026-04-14 16:13:40 +02:00
whisper chore: ⬆️ Update ggml-org/whisper.cpp to fc674574ca27cac59a15e5b22a09b9d9ad62aafe (#9450) 2026-04-21 11:09:05 +02:00