summaryrefslogtreecommitdiffstats
path: root/Examples/main/params.h
diff options
context:
space:
mode:
authorKonstantin <const@const.me>2023-01-16 14:52:43 +0100
committerKonstantin <const@const.me>2023-01-16 14:52:43 +0100
commit8c4603c73675958efc960fbd4bb599a2909d106a (patch)
tree714dc6fc9a1672d5fd7f89676b97e10959662abc /Examples/main/params.h
parent990a8d0dbaefc996244097397259e92758b15cce (diff)
Source codes
Diffstat (limited to 'Examples/main/params.h')
-rw-r--r--Examples/main/params.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/Examples/main/params.h b/Examples/main/params.h
new file mode 100644
index 0000000..9eb2b04
--- /dev/null
+++ b/Examples/main/params.h
@@ -0,0 +1,38 @@
+#pragma once
+#include <vector>
+#include <string>
+
+// command-line parameters
+struct whisper_params
+{
+ uint32_t n_threads;
+ uint32_t n_processors = 1;
+ uint32_t offset_t_ms = 0;
+ uint32_t offset_n = 0;
+ uint32_t duration_ms = 0;
+ uint32_t max_context = UINT_MAX;
+ uint32_t max_len = 0;
+
+ float word_thold = 0.01f;
+
+ bool speed_up = false;
+ bool translate = false;
+ bool diarize = false;
+ bool output_txt = false;
+ bool output_vtt = false;
+ bool output_srt = false;
+ bool output_wts = false;
+ bool print_special = false;
+ bool print_colors = true;
+ bool no_timestamps = false;
+
+ std::string language = "en";
+ std::wstring model = L"models/ggml-base.en.bin";
+ std::vector<std::wstring> fname_inp;
+
+ whisper_params();
+
+ bool parse( int argc, wchar_t* argv[] );
+};
+
+void whisper_print_usage( int argc, wchar_t** argv, const whisper_params& params ); \ No newline at end of file