Skip to content

Commit

Permalink
add --recompile support
Browse files Browse the repository at this point in the history
  • Loading branch information
cjpais committed Jul 7, 2024
1 parent 5b09314 commit 37c5046
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion whisper.cpp/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ void whisper_print_usage(int /*argc*/, char ** argv, const whisper_params & para
fprintf(stderr, " --port PORT, [%-7d] Port number for the server\n", sparams.port);
fprintf(stderr, " --public PATH, [%-7s] Path to the public folder\n", sparams.public_path.c_str());
fprintf(stderr, " --request-path PATH, [%-7s] Request path for all requests\n", sparams.request_path.c_str());
fprintf(stderr, " --convert, [%-7s] Convert audio to WAV, requires ffmpeg on the server", sparams.ffmpeg_converter ? "true" : "false");
fprintf(stderr, " --convert, [%-7s] Convert audio to WAV, requires ffmpeg on the server\n", sparams.ffmpeg_converter ? "true" : "false");
fprintf(stderr, " --recompile [%-7s] Force GPU support to be recompiled at runtime if possible.", FLAG_recompile ? "true" : "false");
fprintf(stderr, "\n");
}

Expand Down Expand Up @@ -189,6 +190,7 @@ bool whisper_params_parse(int argc, char ** argv, whisper_params & params, serve
else if ( arg == "--public") { sparams.public_path = argv[++i]; }
else if ( arg == "--request-path") { sparams.request_path = argv[++i]; }
else if ( arg == "--convert") { sparams.ffmpeg_converter = true; }
else if ( arg == "--recompile") { FLAG_recompile = true; }
else {
fprintf(stderr, "error: unknown argument: %s\n", arg.c_str());
whisper_print_usage(argc, argv, params, sparams);
Expand Down Expand Up @@ -475,6 +477,7 @@ void get_req_parameters(const Request & req, whisper_params & params)
{
params.temperature_inc = std::stof(req.get_file_value("temperature_inc").content);
}
// if (req.has_file)
}

} // namespace
Expand Down

0 comments on commit 37c5046

Please sign in to comment.