]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
examples : Remove leading space from txt output (#3921)
authorCappuccino <redacted>
Sat, 11 Jul 2026 15:53:59 +0000 (23:53 +0800)
committerGitHub <redacted>
Sat, 11 Jul 2026 15:53:59 +0000 (17:53 +0200)
commit080bbbe85230f624f0b52127f1ae1218247989f9
tree07ed85a6655cb534b9813d9814416187e6fc7a1c
parent7695a5331230c585f5ce92291c4256973985ae5a
examples : Remove leading space from txt output (#3921)

* Fix #587: Remove leading space from txt output

The BPE tokenizer used by Whisper produces tokens with leading spaces,
causing each line in the txt output to start with an unwanted space.

This fix strips leading whitespace (spaces and tabs) from each segment
when writing to txt output files, improving the readability of the
transcription output.

Fixes: https://github.com/ggml-org/whisper.cpp/issues/587
examples/cli/cli.cpp