summaryrefslogtreecommitdiffstats
path: root/Examples/main/params.h
blob: 9eb2b048aedd7fc0df35b51462dba87ab7ccac61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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 );