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:
Felix 2023-11-21 20:36:10 +01:00 committed by GitHub
parent 46f5b6cb08
commit 9ac88f2b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)) {