whisper.cpp
whisper.cpp copied to clipboard
stream: add `file_mode` option
Related issue: https://github.com/ggml-org/whisper.cpp/issues/1056
Add a --file_mode option to the stream example. This feature works together with the --file option.
-
raw: Writes every iteration, so it captures pre‑newline interim tokens, which are continuously overwritten on the terminal. (noisy, current behavior) -
newline: Buffers and writes only at the newline boundary, This drops all pre-newline tokens and records only the finalized line.- With a high
n_new_linevalue (large length/step), this mode behaves quite differently from raw. - With a low
n_new_linevalue, the difference is smaller.
- With a high
Origin issue mentioned clearing last line of file. This might be implemented with overwrite mode in the future.