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 69339af commit 0079740Copy full SHA for 0079740
examples/server/server.cpp
@@ -219,6 +219,8 @@ void check_ffmpeg_availibility() {
219
bool convert_to_wav(const std::string & temp_filename, std::string & error_resp) {
220
std::ostringstream cmd_stream;
221
std::string converted_filename_temp = temp_filename + "_temp.wav";
222
+ // Remove possible leftover ffmpeg temp file from a previous failed conversion
223
+ remove(converted_filename_temp.c_str());
224
cmd_stream << "ffmpeg -i \"" << temp_filename << "\" -ar 16000 -ac 1 -c:a pcm_s16le \"" << converted_filename_temp << "\" 2>&1";
225
std::string cmd = cmd_stream.str();
226
0 commit comments