Both examples passed each 0.1 s read straight to accept_waveform(), which expects
window-sized input. Buffer the reads and feed window_size samples per call, as the
other VAD examples do.
The timestamps were built as str(timedelta(seconds=t))[:-3]. That only
works when t has a fractional part: for a whole number of seconds
str(timedelta) has no ".ffffff" suffix, so the slice cuts off the
seconds instead, e.g. a segment starting at 0 s was written as
"0:00 --> 0:00:01,500". Hours were also written with a single digit,
while SRT expects HH:MM:SS,mmm.
Format the timestamps explicitly as HH:MM:SS,mmm for both the .srt
and the .txt output.
Fixes#3731
espeak-ng and piper-phonemize are no longer built into sherpa-onnx.
Text frontends are now:
- **lexicon** — built in, no extra dependency
- **phonemize** — phonemize outside sherpa-onnx (e.g. [piper-phonemize](https://github.com/csukuangfj/piper-phonemize)) and pass the result in. That library is GPL, so it stays optional: sherpa-onnx is GPL-free after this PR.
## API
- `SherpaOnnxGenerationConfig` gains `phoneme_codepoints` and `tokens` (mutually exclusive alternatives to `text`)
- `data_dir` on the TTS model configs is deprecated and ignored; the ABI slot is kept
- all bindings updated: C/C++, Python, Java, Kotlin, Go, Rust, C#, Swift, Pascal, Dart/Flutter, node-addon, WASM, HarmonyOS
* Add subtitle generation Python API example for Doubao ASR.
generate-subtitles-doubao.py uses silero-vad/ten-vad for segmentation and
the Doubao bigmodel recording-file recognition API for ASR. Audio segments
are sent as base64 encoded wav data, so no public URL is needed. Results
are written to <input>.srt and <input>.txt.
Also for generate-subtitles.py:
- Add --max-duration-seconds to process only the first N seconds of the
input file
- Refuse to run if <input>.srt or <input>.txt already exists
check_args() referenced args.num_active_paths, but this script defines the
flag as --max-active-paths (and consumes args.max_active_paths), so
--decoding-method modified_beam_search crashed with AttributeError at startup.
This pull request expands the capabilities of sherpa-onnx by integrating offline Qwen3-ASR models. It provides the necessary infrastructure, including model loading, configuration, and a specialized tokenizer, to enable accurate speech recognition for these models. The addition of C, C++, and Python examples ensures ease of adoption for developers looking to leverage Qwen3-ASR in their applications.
This pull request enhances the Python API examples for Text-to-Speech by introducing dedicated scripts for ZipVoice TTS. It provides users with clear, runnable demonstrations of both standard zero-shot synthesis and real-time audio playback during generation. The changes also streamline the example structure by removing an older, more generic script and deprecating an outdated API function, promoting the use of a more modern GenerationConfig approach.
This PR adds online (streaming) speech denoising support for GTCRN alongside existing DPDFNet support, and updates multi-language bindings/examples to expose and validate the new capability.
This pull request enhances the speech processing capabilities of sherpa-onnx by integrating DPDFNet models for speech enhancement. It introduces both offline and streaming denoising functionalities, supporting various model profiles and sample rates. This expansion provides users with more advanced and flexible options for improving audio quality in diverse applications, from real-time communication to post-processing of recordings.
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.
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.
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.
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.
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.
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
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.
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.
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
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
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