Commit Graph
145 Commits
Author SHA1 Message Date
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
JiayuXuandxujiayu 0d6bf52844 fix: support both old and new websockets request headers format (#1588)
Co-authored-by: xujiayu <xujiayu@kaihong.com>
2024-12-03 17:22:12 +08:00
VEPandVEP 4fab3f2e2f Revert: [#1521] No need to reset sample-buffer (#1524)
Co-authored-by: VEP <517138883@qq.com>
2024-11-08 21:28:04 +08:00
VEPandVEP f94cca71cf Fix: Reset sample-buffer after processing (#1521)
Co-authored-by: VEP <517138883@qq.com>
2024-11-08 19:04:34 +08:00
彭震东 72dc68c8fa fix typo (#1488) 2024-10-28 21:30:18 +08:00
Fangjun Kuang 669f5ef441 Add C++ runtime and Python APIs for Moonshine models (#1473) 2024-10-26 14:34:07 +08:00
Peakyxh 2b40079faf Add speaker identification with VAD and non-streaming ASR using ALSA (#1463) 2024-10-24 22:04:51 +08:00
Fangjun Kuang 8535b1d3bb Python API for speaker diarization. (#1400) 2024-10-09 14:13:26 +08:00
Fangjun Kuang e7ffcbd677 Add APIs about max speech duration in VAD for various programming languages (#1349) 2024-09-14 12:30:13 +08:00
Fangjun Kuang 1423ddb1f0 Support specifying max speech duration for VAD. (#1348) 2024-09-14 10:57:46 +08:00
Lim Yao Chong 3bffc24d64 Add Python binding for online punctuation models (#1312) 2024-09-09 10:26:53 +08:00
Fangjun Kuang 857cb5075c Fix typos (#1330) 2024-09-09 10:22:42 +08:00