We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a62717 commit 9d9e38fCopy full SHA for 9d9e38f
examples/server/server.cpp
@@ -677,7 +677,8 @@ int main(int argc, char ** argv) {
677
if (sparams.ffmpeg_converter) {
678
// if file is not wav, convert to wav
679
// write to temporary file
680
- const std::string temp_filename = "whisper_server_temp_file.wav";
+ const std::string temp_filename_base = std::tmpnam(nullptr);
681
+ const std::string temp_filename = temp_filename_base + ".wav";
682
std::ofstream temp_file{temp_filename, std::ios::binary};
683
temp_file << audio_file.content;
684
temp_file.close();
0 commit comments