whisper.cpp/examples
texasich 27101c01dc
cli : merge tokens split across UTF-8 boundaries in JSON output (#3751)
* cli : merge tokens split across UTF-8 boundaries in JSON output

When a multi-byte UTF-8 codepoint (most commonly a CJK character, 3 bytes)
is split across multiple whisper tokens, the -ojf/--output-json-full
writer emitted each token's partial bytes as its own JSON string, producing
invalid UTF-8 that chokes downstream parsers.

Merge adjacent tokens in output_json whenever the accumulated text still
ends on an incomplete UTF-8 sequence. The merged entry keeps the first
token's id/p/t_dtw and extends t1 to the last absorbed token, which
matches how segment text is assembled elsewhere.

Refs #1798

* fix: address review — add braces for consistency, use full issue URL

- Add braces to if/else chain for codebase consistency
- Use full URL for issue #1798 reference

Review: @danbev

---------

Co-authored-by: texasich <texasich@users.noreply.github.com>
Co-authored-by: texasich <texasich@gmail.com>
2026-05-26 06:23:41 +02:00
..
addon.node
bench bench : sync submit-results URL to ggml-org (#3769) 2026-04-20 07:12:57 +02:00
bench.wasm bench : sync submit-results URL to ggml-org (#3769) 2026-04-20 07:12:57 +02:00
cli cli : merge tokens split across UTF-8 boundaries in JSON output (#3751) 2026-05-26 06:23:41 +02:00
command whisper : enable flash attention by default (#3441) 2025-09-30 15:47:20 +03:00
command.wasm
deprecation-warning
lsp examples : fix executable example targets (#3600) 2026-01-13 08:08:18 +01:00
python
quantize examples : fix executable example targets (#3600) 2026-01-13 08:08:18 +01:00
server common : fix server /inference fails to decode in-memory audio (regression) (#3818) 2026-05-22 08:27:35 +02:00
stream whisper : enable flash attention by default (#3441) 2025-09-30 15:47:20 +03:00
stream.wasm
sycl
talk-llama talk-llama : sync llama.cpp 2026-05-25 12:26:07 +03:00
vad-speech-segments examples : fix executable example targets (#3600) 2026-01-13 08:08:18 +01:00
wchess
whisper.android
whisper.android.java
whisper.nvim
whisper.objc
whisper.swiftui
whisper.wasm
CMakeLists.txt
coi-serviceworker.js
common-ggml.cpp examples : update to Q1_0 2026-05-01 13:07:33 +03:00
common-ggml.h
common-sdl.cpp
common-sdl.h
common-whisper.cpp common : fix server /inference fails to decode in-memory audio (regression) (#3818) 2026-05-22 08:27:35 +02:00
common-whisper.h common : fix server /inference fails to decode in-memory audio (regression) (#3818) 2026-05-22 08:27:35 +02:00
common.cpp
common.h
ffmpeg-transcode.cpp
generate-karaoke.sh
grammar-parser.cpp
grammar-parser.h
helpers.js
json.hpp
livestream.sh
miniaudio.h examples : update miniaudio library to 0.11.24 (#3672) 2026-02-27 11:15:15 +01:00
server.py
stb_vorbis.c
twitch.sh
yt-wsp.sh