← Back to Leaderboard
Sk2-fsa

k2-fsa/sherpa

Self-hosted speech-to-text with PyTorch transducer and CTC models

Engineering Health (Methodology)
A · 85/100
Maintenance Activity
● Updated today
Latest Release
speaker-recognition-models
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption19/25
Release Cadence11/20
License Clarity20/20
DockerAPI
Total Stars
★ 1,029
24h Growth
+0
7d Growth
+1
Forks
160

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

k2-fsa/sherpa Star History (2022-05-18 - 2026-12-04) ALL-TIME STAR HISTORY (2022-05 – 2026-12) +1k in 1661d · avg +1/day 1.1k 544 0 2022-05-18: ★ 12022-08-27: ★ 852022-12-10: ★ 1352023-03-25: ★ 2112023-07-08: ★ 2632023-10-21: ★ 3062024-02-03: ★ 3702024-05-18: ★ 4332024-08-31: ★ 5032024-12-14: ★ 5562025-03-29: ★ 6332025-07-12: ★ 7212025-10-25: ★ 7942026-02-07: ★ 8642026-05-23: ★ 9222026-09-05: ★ 9802026-12-04: ★ 1,029 ★ 1k 2022-05 2024-08 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

sherpa is a C++ speech-to-text inference framework backed by PyTorch, with C++ and Python APIs for running pretrained end-to-end transducer and CTC models. The application supplies speech audio and uses the selected model to obtain a transcript. WebSocket is a service integration path when the recognizer needs to run separately from its clients, rather than a requirement for in-process API use.

CMakeLists.txt and setup.py provide native build and Python packaging entry points, respectively, while python-api-examples/ is a starting point for client integration. requirements.txt lists websockets, kaldifeat, sentencepiece>=0.1.96, and numpy; the container recipe also installs torchaudio and a pinned k2 build. The presence of triton/ alone does not establish a supported Triton configuration or a production service contract.

Key Capabilities & Differentiators

The main capability is transcribing speech with pretrained end-to-end transducer and CTC models. That gives teams two model families to evaluate without making the serving framework responsible for training or fine-tuning; those workflows belong in icefall. Use the API surface and examples to validate the inference integration, and test WebSocket separately if browser or remote clients will connect to a recognition service.

Choose the model before committing to a rollout. There are no verified specifications here for language coverage, input audio format, decoding options, partial-result semantics, or serving capacity. A browser demo provides a way to try recognition without installing the stack, but it does not establish the production protocol or what latency and recognition quality to expect on your own audio.

Trade-offs & Limitations

Compared with a managed Whisper API, self-hosting sherpa gives your team control over where audio is processed and which supported model it runs. In return, the team owns dependency compatibility, model rollout, capacity planning, and service reliability. Neither lower latency nor lower cost follows automatically; compare end-to-end behavior with your model, hardware, concurrency, and network path.

If removing PyTorch or targeting iOS, Android, or embedded systems is a hard requirement, start by evaluating the related projects sherpa-onnx and sherpa-ncnn, which do not depend on PyTorch and cover those platforms. For commercial distribution, Apache-2.0 applies to the sherpa repository; verify the separate terms for your model weights, dependencies, and container base.

Hardware & Deployment Guide

For the Docker path, check the host NVIDIA driver against the nvcr.io/nvidia/pytorch:22.12-py3 base and the pinned k2 build, 1.24.4.dev20240223+cuda11.7.torch1.13.1, before installing or changing runtime components. The recipe installs torchaudio, clones icefall under /workspace, and adds it to PYTHONPATH. The Dockerfile excerpt ends at an incomplete clone line, so it does not establish a runnable image build, a server command, an exposed port, or model mounts.

For direct integration, use the CMake or Python packaging path as appropriate and provision a compatible pretrained model. Profile RAM, VRAM where applicable, and real-time performance under representative stream concurrency rather than sizing from the base image. The January 8–10, 2025 releases are labeled speaker-segmentation-models, vad-models, and speaker-recognition-models; those names do not establish runtime changes or a unified API for these tasks.

Model scope: Pretrained end-to-end transducer and CTC inference; training and fine-tuning belong in icefall.
Integration: C++ and Python APIs, Python examples in python-api-examples/, and a WebSocket service path.
Dependencies: websockets, kaldifeat, sentencepiece>=0.1.96, and numpy are listed in requirements.txt.
Container compatibility: The Dockerfile specifies NVIDIA PyTorch 22.12-py3 and k2 1.24.4.dev20240223+cuda11.7.torch1.13.1.
Release scope: January 2025 entries are labeled for speaker segmentation, voice activity detection, and speaker recognition models; they do not establish a unified service API.
Best For

Teams self-hosting pretrained transducer or CTC speech recognition through a C++ or Python API or a WebSocket service, with the capacity to maintain a PyTorch runtime.

Skip If

You need a PyTorch-free mobile or embedded runtime, a training framework, or a managed transcription API that removes inference operations from your team.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releasesMethodology

Comparison vs. Top Voice, Vision & Video Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
sherpa ★1k+1C++Apache-2.0Self-hosted speech-to-text with PyTorch transducer and CTC models
WhisperLiveKit11.3k+27PythonApache-2.0Self-hosted streaming speech-to-text with pluggable ASR and speaker diarization
sherpa-onnx16.4k+136C++Apache-2.0C++ and ONNX Runtime SDK for offline speech and real-time transcription
whisperX26.5k+677PythonBSD-2-ClauseBatched Whisper with forced alignment for word timings and optional speaker labe

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/k2-fsa/sherpa.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

k2-fsa/sherpa Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about sherpa

Should I embed sherpa or run it as a separate service?

Use the C++ or Python API to integrate inference into an application, or evaluate the WebSocket server path if speech recognition should run as a separate service. Start by selecting a supported pretrained transducer or CTC model, then verify the input contract and response format before building the client. The available information does not establish an HTTP REST API or a versioned wire contract.

How much RAM or VRAM should I provision?

There is no verified VRAM minimum or concurrency ceiling. The Docker recipe shows a CUDA-oriented PyTorch stack, not a universal GPU requirement for every integration. Measure RAM and, where applicable, VRAM with the chosen model loaded, then repeat at target stream concurrency and measure real-time performance on the intended hardware.

Can I self-host sherpa in a commercial product?

Apache-2.0 permits commercial self-hosting, subject to its terms. If you redistribute sherpa in an application or container, review the license and notice obligations. Check model weights, dependencies, and the NVIDIA base image separately; the repository license does not establish their terms. Self-hosting also does not by itself satisfy audio privacy or retention requirements.

When should I choose sherpa over sherpa-onnx, sherpa-ncnn, or a managed Whisper API?

Choose sherpa when you want to deploy pretrained transducer or CTC models with C++ or Python integration and can maintain the PyTorch stack. Evaluate sherpa-onnx or sherpa-ncnn when avoiding PyTorch or targeting mobile and embedded platforms is central. A managed Whisper API is the more direct option if you would rather delegate inference operations and can send audio to an external provider. Compare recognition quality and latency on your own audio.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining k2-fsa/sherpa? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature k2-fsa/sherpa on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare