Commit Graph
156 Commits
Author SHA1 Message Date
Fangjun Kuang 3ff34bb8d6 Update Python APIs for Moonshine v2 models (#3235) 2026-02-27 17:00:37 +08:00
Fangjun Kuang cbe547a49c Support FireRedASR CTC models (#3221)
This PR adds support for FireRedASR CTC models to the sherpa-onnx offline speech recognition system. The implementation includes new model configuration classes, integration into the existing CTC recognition pipeline, and comprehensive testing infrastructure.
2026-02-26 15:38:23 +08:00
Joe Cheng 7be9a38e27 Whisper timestamps (#2945)
This pull request significantly enhances the Whisper integration by introducing comprehensive timestamping capabilities. It provides both fine-grained token-level timestamps, derived from cross-attention weights using Dynamic Time Warping, and broader segment-level timestamps, based on Whisper's native timestamp tokens. This allows for more detailed temporal alignment of transcribed text with audio, which is crucial for applications like subtitle generation and improving the handling of long audio inputs. The changes span model export utilities, core C++ logic, and Python API bindings to fully support these new features.
2026-02-05 13:10:37 +08:00
Edison dos Santos 67b53a018c feat: add support for Meta Omnilingual ASR v2 models (#3138)
This pull request integrates support for the latest Meta Omnilingual ASR v2 models, enhancing the project's multilingual speech recognition capabilities without requiring modifications to the core C++ codebase. It introduces a dedicated Python example to facilitate usage and demonstrates the model's performance and compatibility.
2026-02-05 12:34:19 +08:00
Wasser1462 9799efcf06 Add hotword support for FunASR-Nano (#3122)
This pull request significantly enhances the FunASR-nano model integration by introducing advanced control over the transcription process. Users can now leverage hotwords to guide recognition, specify the target language, and manage Inverse Text Normalization (ITN) settings. These capabilities are seamlessly exposed through comprehensive API updates across Python, Java, Kotlin, and Swift. Additionally, the underlying C++ implementation benefits from performance optimizations via CPU IoBinding and pre-allocated buffers, alongside more informative error messages and debugging logs, contributing to a more robust and user-friendly experience.
2026-02-04 18:05:38 +08:00
Fangjun Kuang db0d94a500 Add CI for PocketTTS. (#3090) 2026-01-27 12:10:05 +08:00
Fangjun Kuang d84be82459 Limit text length for PocketTTS. (#3089)
This pull request significantly enhances the PocketTTS system's ability to process long input texts. By introducing a sophisticated text segmentation and chunking mechanism, the system can now reliably handle extensive content, breaking it down into smaller, more manageable units for synthesis. This refactoring improves the overall stability and user experience when generating speech from lengthy passages, as demonstrated by the updated example script.
2026-01-27 11:39:39 +08:00
Fangjun Kuang 960916075e Add Python API examples for PocketTTS (#3088) 2026-01-27 10:48:30 +08:00
Fangjun Kuang f75cb392e1 Support BPE tokenizer (#3078) 2026-01-26 10:34:49 +08:00
Wasser1462 b82d9c6aff FunASR-nano: switch to unified KV-cache LLM (#2995)
This PR updates FunASR-nano inference from the prefill+decode dual-model pipeline to a single unified KV-cache model.

## Summary

Previously, FunASR-nano required two separate ONNX models:
- `llm_prefill.onnx`
- `llm_decode.onnx`

This PR switches to a single model:
- `llm.onnx`

The new pipeline uses a static KV cache + KV-delta incremental update mechanism, and relies on `cache_position` to differentiate prefill vs. decode steps. This significantly simplifies model/session management and reduces deployment complexity.

## Key changes

- **Single LLM session / single model file**: `llm.onnx` replaces `llm_prefill.onnx` + `llm_decode.onnx`.

- **Unified KV-cache implementation**:
  - static KV cache layout
  - KV-delta update for decode
  - `cache_position` distinguishes prefill vs. decode behavior

- **Config changes (breaking)**:
  - `funasr_nano.llm_prefill` and `funasr_nano.llm_decode` are deprecated/removed
  - use only `funasr_nano.llm`

- **Not backward compatible**:
  - users must re-export models in KV-delta/unified-KV format

- **Trade-off**: slightly slower, but lower VRAM duplication
2026-01-07 10:41:53 +08:00
Wasser1462 4ea060ab49 Add funASR-Nano with LLM support (#2936) 2025-12-30 12:04:29 +08:00
Fangjun Kuang 1f5f9633cc Add C++ runtime and Python API for Google MedASR models (#2935)
This pull request significantly enhances sherpa-onnx by integrating comprehensive support for Google MedASR CTC models. The changes encompass the foundational C++ model implementation, a streamlined Python API for ease of use, and specialized audio feature processing and text post-processing logic to ensure accurate medical speech recognition. This integration also includes updates to the build system and continuous integration tests, alongside a practical Python example, making MedASR models readily available and verifiable within the framework.
2025-12-25 17:25:56 +08:00
Fangjun Kuang a6a36e8cef Use a shorter name for Zipvoice models. (#2894) 2025-12-11 20:30:19 +08:00
Fangjun Kuang 1e4ac57888 Fix building errors (#2893)
This pull request addresses and resolves building errors by refactoring the OfflineTtsZipVoiceModelConfig across various language bindings. The core change involves renaming the pinyinDict parameter to lexicon to standardize terminology and improve clarity in text-to-speech configurations. Additionally, the Python example script for offline zero-shot TTS has been updated to align with these changes, including new model paths and example content, ensuring the examples remain functional and up-to-date.
2025-12-11 19:15:53 +08:00
Fangjun Kuang 1a48531bbd Add simulate streaming ASR Python example for Paraformer (#2839) 2025-12-01 11:54:11 +08:00
Fangjun Kuang 36ef8d1fbc Add C++ and Python API for Omnilingual ASR models. (#2772)
This PR adds C++ and Python API support for Omnilingual ASR models with CTC decoding, enabling speech recognition across 1600+ languages using models from Facebook Research's omnilingual-asr project.

Key changes:

- Implements OfflineOmnilingualAsrCtcModel class with feature normalization and model inference
- Adds Python bindings through from_omnilingual_asr_ctc() method on OfflineRecognizer
- Integrates omnilingual models into existing CTC recognition pipeline with special handling for input shapes and frame shifts
2025-11-13 12:25:30 +08:00
Fangjun Kuang 8568fc4e5d Remove cppjieba (#2664)
This PR removes the cppjieba dependency from the sherpa-onnx project by replacing its usage with character-based text processing. The main purpose is to simplify the codebase by eliminating the need for external jieba dictionary files and the cppjieba library.

- Replaces jieba-based word segmentation with UTF-8 character-level tokenization
- Removes all references to dict_dir and dictDir parameters across APIs
- Adds a new CharacterLexicon class to replace JiebaLexicon
2025-10-10 10:54:32 +08:00
Fangjun Kuang 68194c718c Add Parakeet TDT model for generating subtitles (#2649) 2025-10-07 13:39:11 +08:00
Fangjun Kuang 858b5052a2 Add C++ and Python support for T-one streaming Russian ASR models (#2575)
This PR adds support for T-one streaming Russian ASR models in both C++ and Python APIs. The T-one model is a CTC-based Russian speech recognition model with specific characteristics including float16 state handling, 300ms frame lengths, and 8kHz sampling rate.

- Added new OnlineToneCtcModel implementation with specialized processing for T-one models
- Integrated T-one support into the existing CTC model pipeline and Python bindings
- Added Python example and test scripts for the new functionality
2025-09-09 12:07:34 +08:00
Wei Kangandyaozengwei c149696cb3 Add Zipvoice (#2487)
Co-authored-by: yaozengwei <yaozengwei@outlook.com>
2025-08-27 19:50:00 +08:00
Brad Murray 06ae4a7c15 Add tdt duration to APIs (#2514) 2025-08-21 10:55:04 +08:00
AlexWhisperandwangmh 6b1ddbd2cd Alex/feat add python example (#2490)
Co-authored-by: wangmh <minghu.wang@shenyiai.net>
2025-08-14 20:44:38 +08:00
Fangjun Kuang 9122c9d272 Add Python API for KittenTTS. (#2466) 2025-08-08 15:01:43 +08:00
Fangjun Kuang a77ba48d6c Support returning the current speech segment for VAD. (#2397)
A new method and property were introduced in the VoiceActivityDetector C++ and Python APIs to 
provide access to the current speech segment as soon as speech is detected, rather than only 
after the segment completes.
2025-07-15 12:05:33 +08:00
Fangjun Kuang b376ad3a7c Add Java/Kotlin API and Android support for ten-vad (#2389) 2025-07-12 19:55:37 +08:00
Fangjun Kuang 19ac7d5b4e Add C++ and Python support for ten-vad (#2377)
This PR adds support for the TEN VAD model alongside the existing Silero VAD in both C++ and Python interfaces.

- Introduces TenVadModelConfig with Python bindings and integrates it into VadModelConfig.
- Implements TenVadModel in C++ and extends the factory (VadModel::Create) and detector logic to choose between Silero and TEN VAD.
- Updates build files (CMake), fixes a spelling typo, and extends the Python example script to demonstrate --ten-vad-model.
2025-07-11 21:19:29 +08:00
Askars Salimbajevs f0960342ad Add LODR support to online and offline recognizers (#2026)
This PR integrates LODR (Level-Ordered Deterministic Rescoring) support from Icefall into both online and offline recognizers, enabling LODR for LM shallow fusion and LM rescore.

- Extended OnlineLMConfig and OfflineLMConfig to include lodr_fst, lodr_scale, and lodr_backoff_id.
- Implemented LodrFst and LodrStateCost classes and wired them into RNN LM scoring in both online and offline code paths.
- Updated Python bindings, CLI entry points, examples, and CI test scripts to accept and exercise the new LODR options.
2025-07-09 16:23:46 +08:00
Fangjun Kuang 0e738c356c Add C++ runtime and Python API for NeMo Canary models (#2352) 2025-07-07 17:03:49 +08:00
Fangjun Kuang 3bf986d08d Support non-streaming zipformer CTC ASR models (#2340)
This PR adds support for non-streaming Zipformer CTC ASR models across 
multiple language bindings, WebAssembly, examples, and CI workflows.

- Introduces a new OfflineZipformerCtcModelConfig in C/C++, Python, Swift, Java, Kotlin, Go, Dart, Pascal, and C# APIs
- Updates initialization, freeing, and recognition logic to include Zipformer CTC in WASM and Node.js
- Adds example scripts and CI steps for downloading, building, and running Zipformer CTC models

Model doc is available at
https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/icefall/zipformer.html
2025-07-04 15:57:07 +08:00
Fangjun Kuang d57e4f84de Add Python API for source separation (#2283) 2025-06-05 20:44:26 +08:00
Fangjun Kuang 028b8f2718 Add C++ example for streaming ASR with SenseVoice. (#2199) 2025-05-11 00:23:32 +08:00
Fangjun Kuang 53518efd2f Add real-time speech recognition example for SenseVoice. (#2197) 2025-05-10 00:50:40 +08:00
Fangjun Kuang 4a833a7547 Fix displaying streaming speech recognition results for Python. (#2196) 2025-05-09 21:48:49 +08:00
Fangjun Kuang 51f8824219 Add homonphone replacer example for Python API. (#2161) 2025-04-29 15:59:34 +08:00
Fangjun Kuang f64c58342b Support replacing homonphonic phrases (#2153) 2025-04-27 15:31:11 +08:00
Fangjun Kuang 95ba6b4039 Generate subtitles with FireRedAsr models (#2112) 2025-04-10 10:35:24 +08:00
Fangjun Kuang 0de7e1b9f0 Add C++ and Python API for Dolphin CTC models (#2085) 2025-04-02 19:09:00 +08:00
Fangjun Kuang 0aacf02dd8 Add C++ runtime for vocos (#2014) 2025-03-17 17:05:15 +08:00
Fangjun Kuang 5d2d792b1d Add Python API for speech enhancement GTCRN models (#1978) 2025-03-10 19:02:17 +08:00
luffy 4e83b3473b speaker-identification-with-vad-non-streaming-asr.py Lack of support for sense_voice. (#1884) 2025-02-18 12:34:47 +08:00
Fangjun Kuang 316424b382 Add C++ and Python API for FireRedASR AED models (#1867) 2025-02-16 22:45:24 +08:00
JV_X ce7c03b086 Modify the model used (#1855)
non_streaming_server.py cannot use streaming models
2025-02-13 15:08:04 +08:00
Fangjun Kuang c84a833863 Add C++ and Python API for Kokoro 1.0 multilingual TTS model (#1795) 2025-02-06 22:57:13 +08:00
Fangjun Kuang 8b989a851c Fix keyword spotting. (#1689)
Reset the stream right after detecting a keyword
2025-01-20 16:41:10 +08:00
Fangjun Kuang ffc6b480a0 Add C++ and Python API for Kokoro TTS models. (#1715) 2025-01-16 14:24:51 +08:00
Fangjun Kuang a4365dad82 Avoid adding tail padding for VAD in generate-subtitles.py (#1674) 2025-01-03 10:37:39 +08:00
Fangjun Kuang f457baea42 Support Matcha-TTS models using espeak-ng (#1672) 2025-01-02 13:46:43 +08:00
Fangjun Kuang 2c2926af7d Add C++ runtime for Matcha-TTS (#1627) 2024-12-31 12:44:14 +08:00
Fangjun Kuang 268d562135 Add TeleSpeech CTC to non_streaming_server.py (#1649) 2024-12-26 11:11:03 +08:00
goddamnVincent 47a2dd4cf8 'update20241203' (#1589)
add '--modeling-unit' and "--bpe-vocab" to /sherpa-onnx/python-api-examples/streaming_server.py make it specifiable.
2024-12-04 09:22:24 +08:00