mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-11-07 08:34:37 +01:00
Close file after writing in server application (#1533)
Fix of mistake leaving file open while reading it again as wav
This commit is contained in:
parent
46f5b6cb08
commit
9ac88f2b57
@ -456,6 +456,7 @@ int main(int argc, char ** argv) {
|
||||
// write file to temporary file
|
||||
std::ofstream temp_file{filename, std::ios::binary};
|
||||
temp_file << audio_file.content;
|
||||
temp_file.close();
|
||||
|
||||
// read wav content into pcmf32
|
||||
if (!::read_wav(filename, pcmf32, pcmf32s, params.diarize)) {
|
||||
|
Loading…
Reference in New Issue
Block a user