server: default token_timestamps forces ~60-char mid-word line wrapping in all response formats (regression in v1.8.4)
Since v1.8.4, whisper-server force-splits transcription segments at roughly 60 characters — often
in the middle of a word — on every request and in every response format, unless the client opts out.
Anyone reading text from the default json response gets corrupted output. Still present on
current master.
Observed (default json response, Russian audio, large-v3): raw text comes back with breaks like
отк\nлючил («отключил»), сообщ\nение («сообщение»); reported downstream on German too
(sch\nalten for "schalten"). Up to v1.8.3, newlines appeared only at natural segment boundaries,
never inside a word.
Root cause (line refs on current master, identical to v1.9.1)
- The server has always forced
max_lento 60 when the request doesn't set it:wparams.max_len = params.max_len == 0 ? 60 : params.max_len;(examples/server/server.cpp:933).max_lensplitting only runs on the token-timestamps path (src/whisper.cpp:7674,:7722;whisper_wrap_segmentatsrc/whisper.cpp:6078), so this used to be inert for most formats. - Up to v1.8.3, token timestamps were enabled only for
verbose_json:wparams.token_timestamps = !params.no_timestamps && params.response_format == vjson_format; - #3679 (first shipped in v1.8.4) removed the format gate:
wparams.token_timestamps = !params.no_timestamps;. The goal was to let clients usemax_lenwith any output format — but combined with the forcedmax_len=60default, every request now has its segments wrapped at ~60 chars.split_on_worddefaults tofalse, so the split lands on a BPE-token boundary — mid-word in any language, and especially often in non-Latin scripts. - #3785 (v1.8.5) added a per-request
token_timestampsform field, but when it's absent the value falls back to!no_timestamps, i.e. still on (examples/server/server.cpp:558) — out-of-box behavior unchanged. examples/server/server.cppis identical between v1.9.1 and current master (checked 2026-08-03), so all of v1.8.4 … v1.9.1 and master are affected.
Repro
./build/bin/whisper-server -m models/ggml-large-v3.bin
curl http://127.0.0.1:8080/inference -F [email protected]
text contains \n injected around every 60-character mark; with non-Latin audio it reliably lands
mid-word. Start the server with --no-timestamps (or send -F token_timestamps=false, per #3785)
→ continuous text, matching v1.8.3.
Downstream impact
OpenWhispr upgraded its bundled server v1.8.3 → v1.9.1 and immediately got end-user reports of words
split apart in German and Russian (OpenWhispr/openwhispr#1348, OpenWhispr/openwhispr#1158); their fix
(OpenWhispr/openwhispr#1369) launches whisper-server with --no-timestamps. In our own self-hosted
pipeline roughly 60% of dictations over three weeks contained mid-word breaks; they disappear as soon
as --no-timestamps is passed.
Suggested fix
Only enable token timestamps (and the max_len=60 fallback) when something actually asks for them —
e.g. verbose_json, or an explicit max_len / token_timestamps / split_on_word in the request.
That keeps #3679's use case (client-requested wrapping for any format) while restoring clean default
output. Happy to provide audio samples or test a patch.
Possibly related (not duplicates): #2381 (segment-boundary \n ambiguity in verbose_json — this regression makes that ambiguity much worse), #3821 (another BPE-token-boundary splitting artifact, fixed by #3850), #3640 (feature request for controllable line width).