Commit Graph
2160 Commits
Author SHA1 Message Date
Fangjun Kuang af2d8d81db Release v2.0.1 (#4115) v2.0.1 2026-10-26 22:57:12 +08:00
Fangjun Kuang 96255a1bb2 Add Pascal API for VoxLock (#4114) 2026-10-26 21:50:15 +08:00
Fangjun Kuang 7c5d107813 Add Rust API for VoxLock (#4112) 2026-10-26 21:49:34 +08:00
Fangjun Kuang 436c059fd3 Add Dart API for VoxLock (#4111) 2026-10-26 21:47:08 +08:00
Fangjun Kuang 52d85d3da1 Add Go API for VoxLock (#4110) 2026-10-26 21:36:46 +08:00
Fangjun Kuang 37ce81d5a0 Add Swift API for VoxLock (#4109) 2026-10-26 21:34:12 +08:00
Fangjun Kuang b17952620d Fix CI failures (#4113) 2026-10-26 21:27:40 +08:00
Fangjun Kuang 8b5ff1aa5e Add C# API for VoxLock (#4108) 2026-10-26 19:44:14 +08:00
Fangjun Kuang 687a26126c Add Java and Kotlin API for VoxLock (#4107) 2026-10-26 19:40:49 +08:00
Fangjun Kuang 42e1e0d077 Add JavaScript (WebAssembly) API for VoxLock (#4106) 2026-10-26 19:33:06 +08:00
Fangjun Kuang cb2071f22f Add JavaScript (node-addon) API for VoxLock (#4105) 2026-10-26 18:49:01 +08:00
Fangjun Kuang 1ec9807f1e Add C/CXX API for VoxLock (#4104) 2026-10-26 17:21:30 +08:00
Stef cc92083394 Keep the STFT convs of Kokoro in float32 when quantizing to int8 (#4087)
The Kokoro decoder's generator computes the phase of its forward STFT
with atan2(imag, real), which the exported graph implements as an
unguarded imag / real followed by Atan. imag and real are produced by
two Conv nodes. quantize_dynamic also quantized these two convs; at DC
and Nyquist the quantized imag is exactly 0, and with int8 arithmetic
real can become exactly 0 there as well, giving 0 / 0 = NaN.

On macOS arm64 the NaN spreads over the whole output, so short pieces of
text come back as all-NaN audio. On x64 the following
DynamicQuantizeLinear happens to drop the NaN, which hides the problem
but does not remove it.

Pass the two convs as nodes_to_exclude, for v1.0 and v1.1-zh. v0.19
computes the STFT without Conv nodes and is not affected.

The released int8 models kokoro-int8-multi-lang-v1_0 and
kokoro-int8-multi-lang-v1_1 need to be regenerated with this change.

Fixes #4086
2026-10-26 17:14:46 +08:00
Cassian433 da549ed597 Add OfflineRecognizer.createAsync() to the Dart API (#4070) 2026-10-26 17:13:01 +08:00
Hassan Kazi 49f4c887da Use librosa-style fbank for streaming NeMo CTC models (#4092) 2026-10-26 16:48:34 +08:00
Fangjun Kuang 5f97192eb9 Add Python API for VoxLock (#4102) 2026-10-26 16:31:50 +08:00
Fangjun Kuang 5a26343944 Upload VoxLock models and test data (#4101) 2026-10-26 12:27:43 +08:00
Manickavela 532f1b5a8a Add CLAUDE.md with build, test and architecture guidance (#4099) 2026-10-25 12:20:55 +08:00
Arbaz Siddiqui fa0d247a14 Add VoxLock target-speaker voice isolation to the speech denoisers (#4085)
VoxLock keeps the voice of one speaker (the caller) and removes the other
voices. It runs in the offline and online speech denoisers next to GTCRN
and DPDFNet, with two ONNX models: an enroll model that runs once on a
voice sample of the caller and a chunk model that runs on each chunk of
the audio and carries the LSTM state.

Without a voice sample, the offline denoiser uses the loudest 3 seconds
in the first 15 seconds of the input, and the online denoiser passes
audio through until it has heard 3 seconds of speech. A voice sample can
be given with --speech-denoiser-voxlock-voice-sample.

The voice sample is optional, so instead of exiting, log a warning and
take the voice sample from the input audio as if none was given.
2026-10-25 08:43:19 +08:00
Hassan Kazi c65f321699 Fix decoder positions of generated tokens in Canary greedy search (#4097)
The prompt is fed at positions 0..n-1, but generated tokens were fed at
1, 2, ... instead of n, n+1, ..., overlapping the prompt. Feed them at
decoder_input.size() + i - 1, as NeMo's GreedySequenceGenerator does.

Fixes #4096
2026-10-24 16:50:59 +08:00
Fangjun Kuang 88204440c2 Fix publishing flutter packages (#4091) 2026-10-23 23:48:11 +08:00
Fangjun Kuang 8abb7c8f87 Release v2.0.0 (#4090) v2.0.0 2026-10-23 20:32:33 +08:00
Fangjun Kuang bad60aa0b5 Fix Ascend CI (#4089) 2026-10-23 20:09:01 +08:00
Fangjun Kuang 12b4f4af2f Add tauri example for Doubao ASR (#4083) 2026-10-23 14:36:20 +08:00
DR1N0 36342561cb docs: add Loud Caption to projects using sherpa-onnx (#4074) 2026-10-22 23:44:45 +08:00
sunerpy 1cad51be77 Add Voltip to 'Projects using sherpa-onnx' (#4081) 2026-10-22 23:42:20 +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 51ec64f7c4 Build wheels for Python 3.15gg (#4080) 2026-10-22 15:17:57 +08:00
Fangjun Kuang a9193276e4 Fix building Flutter APPs for macOS (#4078) 2026-10-22 13:44:57 +08:00
Fangjun Kuang ce949db9dd Fix word boundaries, OOV words and Unicode handling in lexicon TTS (#4075) 2026-10-22 12:16:36 +08:00
Hassan Kazi 96bdb8ebc7 Validate speaker embedding dimensions before releasing the GIL (#4077) 2026-10-22 09:24:07 +08:00
Kyozzz a63f82130d Use NeMo's additive log-zero guard for NeMo mel features (#3999)
NeMo's AudioToMelSpectrogramPrefab computes log(x + 2**-24), while the
shared fbank extractor applies a hard floor, log(max(x, FLT_EPSILON)).
On quiet recordings a large share of the mel bins sit at that floor and
per-feature normalization turns them into constant columns the model
never saw in training, which degrades accuracy a lot (issue #3997).

For NeMo models (nemo_normalize_type is set), disable use_log_fbank and
apply log(x + 2**-24) to the raw mel energies in GetFrames() before the
per-feature normalization. Other models keep the existing behavior.

Bump the dependency and select the additive guard with eps = FLT_EPSILON / 2 for NeMo fbank models. The manual log pass in GetFrames() is no longer needed, which also keeps MFCC models such as TeleSpeech untouched.
2026-10-21 11:48:14 +08:00
Hassan Kazi 6c09898685 Check the embedding size in the Python SpeakerEmbeddingManager methods (#4048) 2026-10-21 10:05:52 +08:00
Hassan Kazi bebb29ff81 Fix omnilingual ASR aborting on input shorter than 400 samples (#4043)
The wav2vec2-style convolutional front end of omnilingual ASR models needs at
least 400 samples. For shorter input onnxruntime throws an Ort::Exception from
DecodeStream that nothing catches, so sherpa-onnx-offline and C API users abort,
Python users get a RuntimeError, and a batch passed to DecodeStreams loses the
results of every stream. Empty input also reached f.size() / feat_dim with
feat_dim == 0. Return an empty result for such input instead.
2026-10-21 10:03:55 +08:00
Hassan Kazi 1d6eba7b93 Feed the VAD one window at a time in vad-microphone.py and vad-alsa.py (#4050)
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.
2026-10-21 10:02:04 +08:00
Fangjun Kuang a83acee682 Fix typos in the project. (#4073) 2026-10-21 09:57:49 +08:00
Emmanuel BORGES 8b08f74dc4 docs: add VocaRead to projects using sherpa-onnx (#4041) 2026-10-21 09:55:45 +08:00
Stef 51aaac5a46 jni: Fix strings returned to Java for characters outside the BMP (#4064) 2026-10-20 19:08:03 +08:00
losewayy 2e3968f5b5 Forward provider config keys to the CUDA execution provider (#3982) (#3985) 2026-10-20 18:58:43 +08:00
Fangjun Kuang bddf3a0118 Refactor building wheels for Linux armv7 (#4071) 2026-10-20 18:44:24 +08:00
Stef 5fec9c9b09 jni: Fix TTS for characters outside the BMP (#4062) 2026-10-20 18:28:53 +08:00
Sergio Fernández 432e8dfc34 Add akou to 'Projects using sherpa-onnx' (#4039) 2026-10-20 18:09:46 +08:00
Hulk 0dc72bcd1a Fix offline CTC timestamps after filtering special tokens (#4018) 2026-10-20 18:03:22 +08:00
Hulk b461064406 Fix JSON escaping in online and offline recognition results (#4017) 2026-10-20 18:02:27 +08:00
dxhome 005dcdc8c6 Add SmartVoice to projects using sherpa-onnx (#4016) 2026-10-20 17:59:29 +08:00
Hulk d81998df3f Support per-stream FunASR Nano prompt options (#4012) 2026-10-20 17:57:36 +08:00
Anthony b3735832a9 Fix SplitUtf8 reading past the end of a truncated UTF-8 sequence (#4010)
A lead byte announcing a 2-4 byte character near the end of the input was
copied as a whole character even when fewer bytes remained, reading past
the end of the string. This happens for TTS text that ends in the middle
of a character, which reaches SplitUtf8 through the lexicon front ends.
Treat such a lead byte like any other invalid byte and skip it.
2026-10-20 17:43:06 +08:00
olerast e1cecafb73 Add Suflyor to 'Projects using sherpa-onnx' (#4001) 2026-10-20 17:39:56 +08:00
Mohammad Hijjawi 1bca6ae4e4 Fix malformed SRT timestamps in generate-subtitles.py (#4009)
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.
2026-10-20 17:36:51 +08:00
Pratik Gandhi 6571533b28 README: fix decibri integration guide link (#3992) 2026-10-20 17:33:00 +08:00