mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-13 12:38:08 +00: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:
@ -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)) {
|
||||
|
Reference in New Issue
Block a user