LocalAI/tests/e2e
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
..
distributed fix(tests): update InstallBackend call sites for new URI/Name/Alias params (#9467) 2026-04-21 11:41:38 +02:00
mock-backend fix(streaming): deduplicate tool call emissions during streaming (#9292) 2026-04-10 00:44:25 +02:00
e2e_anthropic_test.go fix(anthropic): do not emit empty tokens and fix SSE tool calls (#9258) 2026-04-07 00:38:21 +02:00
e2e_mcp_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
e2e_ollama_test.go feat(api): add ollama compatibility (#9284) 2026-04-09 14:15:14 +02:00
e2e_suite_test.go feat: Add Sherpa ONNX backend for ASR and TTS (#8523) 2026-04-24 14:40:06 +02:00
e2e_websocket_responses_test.go feat: add distributed mode (#9124) 2026-03-30 00:47:27 +02:00
mock_backend_test.go fix(streaming): deduplicate tool call emissions during streaming (#9292) 2026-04-10 00:44:25 +02:00
realtime_webrtc_test.go feat(realtime): WebRTC support (#8790) 2026-03-13 21:37:15 +01:00
realtime_ws_test.go feat: Add Sherpa ONNX backend for ASR and TTS (#8523) 2026-04-24 14:40:06 +02:00
run-realtime-sherpa.sh feat: Add Sherpa ONNX backend for ASR and TTS (#8523) 2026-04-24 14:40:06 +02:00