Softcatala / whisper-ctranslate2

Whisper command line client compatible with original OpenAI client based on CTranslate2.
MIT License
880 stars 75 forks source link

Issue with output redirection to R console using processx #72

Closed bakaburg1 closed 9 months ago

bakaburg1 commented 9 months ago

Hello,

I am encountering an issue when trying to redirect the output directly to the R console using the processx package. whisper-ctranslate2 runs successfully and prints output to the Unix terminal, but when I attempt to capture this output in R using process, I only receive the output once the process is wrapped, while before that, I just get an empty line.

Also redirecting to a file with whisper-ctranslate2 audio_file.mp3 > my_log_file.txt as workaround doesn't work, since the file stays empty until the very end of the process.

ChatGPT suggests it may be due to the buffering options of the command, but I'm not knowledgeable enough about unix terminal to find a solution (and gpt ones don't work either).

How should I proceed?

jordimas commented 9 months ago

Hello. whisper-ctranslate2 generates a txt, srt, json and other files as part of the transcription outcome. Use the TXT file generated, not the outcome show in console (which is only for reporting).

bakaburg1 commented 9 months ago

Hi, I wanted to use what's printed in the console just to check the output quality without waiting for it to be completed. As output I'm using the actual output file.