Commit Graph
102 Commits
Author SHA1 Message Date
Fangjun Kuang 8abb7c8f87 Release v2.0.0 (#4090) 2026-10-23 20:32:33 +08:00
Fangjun Kuang f2e01fe8e3 Widen VAD sample positions to int64_t to fix long-stream SIGSEGV. (#4079)
Fixes #3635

It is for v2.0.0 and breaks the ABI.

CircularBuffer::head_ and tail_ are absolute sample counters that grow
forever. As int32_t they overflow after 2^31 samples (~37 h at 16 kHz);
tail_ % capacity then goes negative and std::copy() writes to an invalid
iterator, crashing long-running VAD streams.

Widen every absolute stream position to int64_t. Counts and capacities
(Push/Pop/Get's n, Size(), capacity) stay int32_t — they are bounded by
buffer memory, not stream duration.
2026-10-22 23:39:59 +08:00
Fangjun Kuang a83acee682 Fix typos in the project. (#4073) 2026-10-21 09:57:49 +08:00
Fangjun Kuang db749e7225 Add tests for the windows arm64 npm package (#4069) 2026-10-20 15:42:34 +08:00
Fangjun Kuang 0b3647632f Remove espeak-ng and piper-phonemize from sherpa-onnx (#4055)
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
2026-10-20 11:09:04 +08:00
Fangjun Kuang 11afbd009a Release v1.13.8 (#3945) 2026-09-10 21:52:45 +08:00
Fangjun Kuang b0899d95ee Add confidence computation support for speaker diarization to JNI. (#3943) 2026-09-10 17:10:54 +08:00
Fangjun Kuang 917bed95c8 Release v1.13.7 (#3909) 2026-09-01 12:48:05 +08:00
Fangjun Kuang 1cb484af5e Release v1.13.6 (#3879) 2026-08-18 13:59:39 +08:00
Julian Pscheid 3e40933895 Expose the pyannote window shift ratio in the C API and language bindings (#3870) 2026-08-13 19:26:44 +08:00
Fangjun Kuang 99dcbfe760 Fix building android and java examples (#3866) 2026-08-11 17:54:38 +08:00
Fangjun Kuang 3dc7c569f3 Release v1.13.5 (#3863) 2026-08-11 14:43:30 +08:00
Fangjun Kuang 02b3e424ba Update onnxruntime to v1.27.1 (#3861) 2026-08-11 11:14:09 +08:00
danielr-ceva 42a2b681ba Add support for latest DPDFNet models and offline attenuation limit (#3824) 2026-08-10 20:37:58 +08:00
Fangjun Kuang ccdaef8bba Add API to get onnxruntime version. (#3810) 2026-07-28 14:02:43 +08:00
Fangjun Kuang 546df6f963 Test Java API on Windows arm64 (#3801) 2026-07-24 19:11:20 +08:00
Fangjun Kuang 881ce3078f Simplify build.gradle.kts for java api examples. (#3788) 2026-07-24 17:01:43 +08:00
Fangjun Kuang 24a84a910a Refactor building and testing Java API (#3786) 2026-07-23 14:12:31 +08:00
Fangjun Kuang 9d15a282aa Add Java API examples with gradle (#3784) 2026-07-22 19:36:59 +08:00
Fangjun Kuang a3b58a159e Add maven examples for Java API (#3783) 2026-07-22 18:47:01 +08:00
matiaslin 2aafc63247 Add OfflineDiacritization JAVA bindings (#3669) 2026-06-12 09:49:40 +08:00
Wasser1462 e2557bbfe1 Support Supertonic 3 TTS (#3605) 2026-05-13 09:21:45 +08:00
Fangjun Kuang 99206ad98d Add Java and Kotlin API for Cohere Transcribe (#3461)
This pull request introduces support for the Cohere Transcribe model across the Java and Kotlin APIs. Key changes include the addition of the OfflineCohereTranscribeModelConfig class, updated JNI bindings to handle the new configuration, and new example scripts and source files for both languages.
2026-04-03 10:53:23 +08:00
Wasser1462 36a29236f9 Add hotwords support for Qwen3-ASR (#3434) 2026-04-01 15:35:34 +08:00
Fangjun Kuang 66d979b167 Add Java API and Kotlin API for Qwen3 ASR (#3420)
This pull request expands the capabilities of the sherpa-onnx project by integrating the Qwen3 ASR model. It provides new Java and Kotlin APIs, complete with example usage, allowing developers to easily incorporate offline Qwen3 ASR into their applications. The changes include necessary configuration structures, build script updates, and JNI bindings to ensure seamless functionality across platforms.
2026-03-26 15:49:32 +08:00
Fangjun Kuang 926152b958 Refactor VITS to use the new Generate API (#3365) 2026-03-19 20:34:52 +08:00
Fangjun Kuang e03a13fbec Refactor KittenTTS to use the new Generate API (#3364) 2026-03-19 18:58:39 +08:00
Fangjun Kuang ed5127c040 Refactor Kokoro TTS to use the new Generate API (#3363) 2026-03-19 18:57:48 +08:00
Fangjun Kuang b3624a8c64 Refactor MatchaTTS to use the new Generate API. (#3362)
This pull request streamlines the MatchaTTS API by introducing a consolidated GenerationConfig object for text-to-speech generation parameters. This change affects examples across various programming languages, ensuring a more consistent and extensible interface for controlling speech synthesis attributes like speaker, speed, and silence. The refactoring simplifies future enhancements and reduces parameter sprawl in API calls.
2026-03-19 18:35:11 +08:00
Fangjun Kuang 286d693d37 Add Kotlin and Java API for ZipVoice models (#3344) 2026-03-18 13:31:38 +08:00
Fangjun Kuang 45fb4f5f0b Add online speech denoiser for GTCRN and examples (#3324)
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.
2026-03-17 11:56:56 +08:00
danielr-ceva 807c496f4c Add DPDFNet speech denoiser support for offline and streaming (#3276)
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.
2026-03-16 14:53:12 +08:00
Fangjun Kuang 26a55b16d7 Small fixes to JNI wrappers (#3298) 2026-03-13 16:22:01 +08:00
Fangjun Kuang abaf2860bb Fix typos in the project (#3293) 2026-03-12 11:10:55 +08:00
Fangjun Kuang 3ca8943d61 Add Java and Kotlin API for Supertonic TTS (#3289)
This pull request enhances the Text-to-Speech capabilities by integrating the Supertonic TTS model into the existing Java and Kotlin APIs. It provides developers with new tools and clear examples to generate speech from text using this model, expanding the range of available TTS options and simplifying their adoption within Java and Kotlin projects.
2026-03-12 00:05:25 +08:00
Fangjun Kuang 01e76fedce Add Kotlin and Java APIs for Moonshine v2 models (#3237)
Adds Android-side configuration and packaging support for Moonshine v2 (merged decoder) models so Kotlin/JNI and Java consumers can use the new model layout and ship additional language variants.

Changes:

- Extend Moonshine offline model config to include a v2 mergedDecoder model path and wire it through JNI.
- Add Moonshine v2 quantized model presets (idx 51–60) for multiple languages in the Kotlin offline model selector.
- Update Moonshine v2 export script + APK model list + GitHub Actions workflow to include new model variants and streamline publishing.
2026-02-27 19:23:12 +08:00
Fangjun Kuang ad53853fea Update language bindings for FireRedASR CTC models (#3224)
Added offline FireRedASR CTC model support with runnable examples and demos across all language bindings (C/C++, Dart, .NET, Flutter, Go, Java, Kotlin, Node.js, Pascal, Rust, Swift, WebAssembly).
2026-02-26 18:07:07 +08:00
Fangjun Kuang d25adcaaea Add Go API for PocketTTS (#3153)
This pull request significantly expands the Go API for Text-to-Speech by adding support for PocketTTS. It introduces new configuration options for audio generation, allowing developers to fine-tune synthesis parameters. Furthermore, it provides practical examples for both basic TTS conversion and real-time audio playback, making it easier to integrate and experiment with PocketTTS in Go applications.
2026-02-06 16:09:32 +08:00
Fangjun Kuang 8dc6244e9d Refactor JNI (#3107)
This pull request significantly refactors the Java Native Interface (JNI) layer for the `sherpa-onnx` library, primarily enhancing the `OfflineTts` component. The changes introduce more robust error handling in various API constructors by validating native object initialization. Furthermore, the callback mechanism for Text-to-Speech operations has been streamlined, offering more convenient `java.util.function.Consumer` based interfaces in Java while simplifying the underlying C++ JNI implementation.

### Highlights

* **Improved Error Handling in Constructors**: Added `IllegalArgumentException` throws in constructors of several `sherpa-onnx` Java API classes (e.g., `AudioTagging`, `KeywordSpotter`, `OfflineTts`) if the native object creation (`newFromFile`) returns a null pointer (0). This makes the API more robust by failing fast on invalid configurations.
* **Streamlined Offline TTS Callbacks**: The `OfflineTts` class now provides new `generateWithCallback` and `generateWithConfigAndCallback` overloads that accept `java.util.function.Consumer<float[]>` for simpler, more idiomatic Java callback usage. This reduces boilerplate for users who only need to consume audio samples.
* **Simplified JNI Callback Implementation**: The native C++ code (`offline-tts.cc`) has been refactored to remove separate handling for `Consumer` and `Function` interfaces. All callbacks are now handled uniformly through the `OfflineTtsCallback` interface, simplifying the JNI bridge logic.
* **Removed Unused Imports and Code**: The `PocketTts.java` example file was cleaned up by removing unused `Consumer` and `Function` imports and simplifying lambda expressions, reflecting the changes in the `OfflineTts` API.
* **Added `getNumSpeakers()` to `OfflineTts`**: A new method `getNumSpeakers()` was added to the `OfflineTts` class, providing access to the number of speakers supported by the TTS engine.
2026-01-29 10:32:46 +08:00
Fangjun Kuang 7167fd312c Add Java and Kotlin API for PocketTTS (#3095) 2026-01-28 17:17:45 +08:00
Fangjun Kuang e4c046ab81 Add Kotlin and Java API for FunASR Nano models (#3030) 2026-01-12 18:22:14 +08:00
Fangjun Kuang 1f124600f5 Add Kotlin and Java API for Google MedAsr model (#2956) 2025-12-29 12:53:00 +08:00
Fangjun Kuang 0f647d3242 Add Koltin and Java API for Omnilingual ASR CTC models (#2783) 2025-11-13 19:03:01 +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 7e42ba2c0c Add various languge bindings for Wenet non-streaming CTC models (#2584)
This PR adds support for Wenet non-streaming CTC models to sherpa-onnx by introducing the SherpaOnnxOfflineWenetCtcModelConfig struct and integrating it across all language bindings and APIs. The implementation follows the same pattern as other CTC model types like Zipformer CTC.

- Introduces SherpaOnnxOfflineWenetCtcModelConfig struct with a single model field for the ONNX model path
- Adds the new config to SherpaOnnxOfflineModelConfig and updates all language bindings (C++, Pascal, Kotlin, Java, Go, C#, Swift, JavaScript, etc.)
- Provides comprehensive examples and tests across all supported platforms and languages
2025-09-10 18:52:18 +08:00
Fangjun Kuang 686b909e2f Add various language bindings for streaming T-one Russian ASR models (#2576)
This PR adds support for streaming T-one Russian ASR models across various language bindings in the sherpa-onnx library. The changes enable T-one CTC (Connectionist Temporal Classification) model integration by adding new configuration structures and example implementations.

- Introduces OnlineToneCtcModelConfig structures across all language bindings (C, C++, Swift, Java, Kotlin, Go, etc.)
- Adds T-one CTC model support to WASM implementations for both ASR and keyword spotting
- Provides comprehensive example implementations demonstrating T-one model usage in multiple programming languages
2025-09-09 16:51:18 +08:00
Fangjun Kuang 7c9d071ef7 Simplify the usage of our non-Android Java API (#2533)
This PR simplifies the usage of the non-Android Java API by providing platform-specific JAR files that include native shared libraries, eliminating the need for users to manually manage native dependencies.

- Refactored LibraryUtils.java to support multiple library loading methods including extracting from JAR resources
- Added build infrastructure to create platform-specific native library JAR files
- Introduced debug capabilities and improved error handling for library loading
2025-08-26 20:13:07 +08:00
Fangjun Kuang bfbd603342 Add Kotlin and Java API for KittenTTS (#2461) 2025-08-07 22:19:11 +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 103e93d9f6 Add Java and Kotlin API for NeMo Canary models (#2359)
Add support for the NeMo Canary model in both Java and Kotlin APIs, wiring it through
JNI and updating examples and CI.

- Introduce OfflineCanaryModelConfig in Kotlin and Java with builder patterns
- Extend OfflineRecognizer to accept and apply the new canary config via setConfig
- Update JNI binding (GetOfflineConfig) and getOfflineModelConfig mapping (type 32), 
   plus examples and CI workflows
2025-07-08 13:45:26 +08:00