whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

stream : output only completed lines of text in saved file.

Open dmahurin opened this issue 1 year ago • 2 comments

This change only outputs the completed lines to the text file, the lines that are later overwritten are not output. This allows stream to be better used for dictation.

dmahurin avatar Mar 17 '23 14:03 dmahurin

This breaks the "real-time" stream usage. For example see the videos here:

https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.nvim

ggerganov avatar Mar 22 '23 19:03 ggerganov

The change has been amended to use std::flush, which allows the nvim operation.

An additional change is added to output the current incomplete line on interrupt.

Note, with these changes, the nvim configuration could also be updated to allow multiline entry (removing the tail -n 1 newline deletion)

dmahurin avatar Mar 25 '23 09:03 dmahurin