lightningRalf / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
0 stars 0 forks source link

/examples/command missing code for writing to file #85

Open lightningRalf opened 1 year ago

lightningRalf commented 1 year ago

the -f option is incomplete in this example. fname_out is missing something like this, found in the stream example:

https://github.com/ggerganov/whisper.cpp/blob/5b9e59bc07dd76320354f2af6be29f16dbcb21e7/examples/stream/stream.cpp#LL202C1-L209C6

std::ofstream fout;
if (params.fname_out.length() > 0) {
    fout.open(params.fname_out);
    if (!fout.is_open()) {
        fprintf(stderr, "%s: failed to open output file '%s'!\n", __func__, params.fname_out.c_str());
        return 1;
    }
}