ggerganov commited on
Commit
8f1a93e
·
unverified ·
1 Parent(s): 679d38e

main, stream : remove --verbose flag (#178)

Browse files
examples/main/main.cpp CHANGED
@@ -60,7 +60,6 @@ struct whisper_params {
60
  float word_thold = 0.01f;
61
 
62
  bool speed_up = false;
63
- bool verbose = false;
64
  bool translate = false;
65
  bool output_txt = false;
66
  bool output_vtt = false;
@@ -107,9 +106,7 @@ bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
107
  params.word_thold = std::stof(argv[++i]);
108
  } else if (arg == "-su" || arg == "--speed-up") {
109
  params.speed_up = true;
110
- } else if (arg == "-v" || arg == "--verbose") {
111
- params.verbose = true;
112
- } else if (arg == "--translate") {
113
  params.translate = true;
114
  } else if (arg == "-l" || arg == "--language") {
115
  params.language = argv[++i];
@@ -165,8 +162,7 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params)
165
  fprintf(stderr, " -ml N, --max-len N maximum segment length in characters (default: %d)\n", params.max_len);
166
  fprintf(stderr, " -wt N, --word-thold N word timestamp probability threshold (default: %f)\n", params.word_thold);
167
  fprintf(stderr, " -su, --speed-up speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
168
- fprintf(stderr, " -v, --verbose verbose output\n");
169
- fprintf(stderr, " --translate translate from source language to english\n");
170
  fprintf(stderr, " -otxt, --output-txt output result in a text file\n");
171
  fprintf(stderr, " -ovtt, --output-vtt output result in a vtt file\n");
172
  fprintf(stderr, " -osrt, --output-srt output result in a srt file\n");
 
60
  float word_thold = 0.01f;
61
 
62
  bool speed_up = false;
 
63
  bool translate = false;
64
  bool output_txt = false;
65
  bool output_vtt = false;
 
106
  params.word_thold = std::stof(argv[++i]);
107
  } else if (arg == "-su" || arg == "--speed-up") {
108
  params.speed_up = true;
109
+ } else if (arg == "-tr" || arg == "--translate") {
 
 
110
  params.translate = true;
111
  } else if (arg == "-l" || arg == "--language") {
112
  params.language = argv[++i];
 
162
  fprintf(stderr, " -ml N, --max-len N maximum segment length in characters (default: %d)\n", params.max_len);
163
  fprintf(stderr, " -wt N, --word-thold N word timestamp probability threshold (default: %f)\n", params.word_thold);
164
  fprintf(stderr, " -su, --speed-up speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
165
+ fprintf(stderr, " -tr, --translate translate from source language to english\n");
 
166
  fprintf(stderr, " -otxt, --output-txt output result in a text file\n");
167
  fprintf(stderr, " -ovtt, --output-vtt output result in a vtt file\n");
168
  fprintf(stderr, " -osrt, --output-srt output result in a srt file\n");
examples/stream/stream.cpp CHANGED
@@ -44,7 +44,6 @@ struct whisper_params {
44
  int32_t audio_ctx = 0;
45
 
46
  bool speed_up = false;
47
- bool verbose = false;
48
  bool translate = false;
49
  bool no_context = true;
50
  bool print_special_tokens = false;
@@ -77,9 +76,7 @@ bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
77
  params.audio_ctx = std::stoi(argv[++i]);
78
  } else if (arg == "-su" || arg == "--speed-up") {
79
  params.speed_up = true;
80
- } else if (arg == "-v" || arg == "--verbose") {
81
- params.verbose = true;
82
- } else if (arg == "--translate") {
83
  params.translate = true;
84
  } else if (arg == "-kc" || arg == "--keep-context") {
85
  params.no_context = false;
@@ -125,8 +122,7 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params)
125
  fprintf(stderr, " -mt N, --max_tokens N maximum number of tokens per audio chunk (default: %d)\n", params.max_tokens);
126
  fprintf(stderr, " -ac N, --audio_ctx N audio context size (default: %d, 0 - all)\n", params.audio_ctx);
127
  fprintf(stderr, " -su, --speed-up speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
128
- fprintf(stderr, " -v, --verbose verbose output\n");
129
- fprintf(stderr, " --translate translate from source language to english\n");
130
  fprintf(stderr, " -kc, --keep-context keep text context from earlier audio (default: false)\n");
131
  fprintf(stderr, " -ps, --print_special print special tokens\n");
132
  fprintf(stderr, " -nt, --no_timestamps do not print timestamps\n");
 
44
  int32_t audio_ctx = 0;
45
 
46
  bool speed_up = false;
 
47
  bool translate = false;
48
  bool no_context = true;
49
  bool print_special_tokens = false;
 
76
  params.audio_ctx = std::stoi(argv[++i]);
77
  } else if (arg == "-su" || arg == "--speed-up") {
78
  params.speed_up = true;
79
+ } else if (arg == "-tr" || arg == "--translate") {
 
 
80
  params.translate = true;
81
  } else if (arg == "-kc" || arg == "--keep-context") {
82
  params.no_context = false;
 
122
  fprintf(stderr, " -mt N, --max_tokens N maximum number of tokens per audio chunk (default: %d)\n", params.max_tokens);
123
  fprintf(stderr, " -ac N, --audio_ctx N audio context size (default: %d, 0 - all)\n", params.audio_ctx);
124
  fprintf(stderr, " -su, --speed-up speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
125
+ fprintf(stderr, " -tr, --translate translate from source language to english\n");
 
126
  fprintf(stderr, " -kc, --keep-context keep text context from earlier audio (default: false)\n");
127
  fprintf(stderr, " -ps, --print_special print special tokens\n");
128
  fprintf(stderr, " -nt, --no_timestamps do not print timestamps\n");