]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
main, stream : remove --verbose flag (#178)
authorGeorgi Gerganov <redacted>
Thu, 24 Nov 2022 15:52:04 +0000 (17:52 +0200)
committerGeorgi Gerganov <redacted>
Thu, 24 Nov 2022 15:52:04 +0000 (17:52 +0200)
examples/main/main.cpp
examples/stream/stream.cpp

index a1b98253ea837a95e25cdcf26d8e0fd8590367c4..d9b86d30e452f437a172994722a34b2dcf6b62e0 100644 (file)
@@ -60,7 +60,6 @@ struct whisper_params {
     float word_thold = 0.01f;
 
     bool speed_up             = false;
-    bool verbose              = false;
     bool translate            = false;
     bool output_txt           = false;
     bool output_vtt           = false;
@@ -107,9 +106,7 @@ bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
             params.word_thold = std::stof(argv[++i]);
         } else if (arg == "-su" || arg == "--speed-up") {
             params.speed_up = true;
-        } else if (arg == "-v" || arg == "--verbose") {
-            params.verbose = true;
-        } else if (arg == "--translate") {
+        } else if (arg == "-tr" || arg == "--translate") {
             params.translate = true;
         } else if (arg == "-l" || arg == "--language") {
             params.language = argv[++i];
@@ -165,8 +162,7 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params)
     fprintf(stderr, "  -ml N,    --max-len N      maximum segment length in characters (default: %d)\n", params.max_len);
     fprintf(stderr, "  -wt N,    --word-thold N   word timestamp probability threshold (default: %f)\n", params.word_thold);
     fprintf(stderr, "  -su,      --speed-up       speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
-    fprintf(stderr, "  -v,       --verbose        verbose output\n");
-    fprintf(stderr, "            --translate      translate from source language to english\n");
+    fprintf(stderr, "  -tr,      --translate      translate from source language to english\n");
     fprintf(stderr, "  -otxt,    --output-txt     output result in a text file\n");
     fprintf(stderr, "  -ovtt,    --output-vtt     output result in a vtt file\n");
     fprintf(stderr, "  -osrt,    --output-srt     output result in a srt file\n");
index 9efc83cdb6edea816b1b55cab465351e9fba95bc..f43fbcc7f158ab50cc6fdb82e325137c9241ffbd 100644 (file)
@@ -44,7 +44,6 @@ struct whisper_params {
     int32_t audio_ctx  = 0;
 
     bool speed_up             = false;
-    bool verbose              = false;
     bool translate            = false;
     bool no_context           = true;
     bool print_special_tokens = false;
@@ -77,9 +76,7 @@ bool whisper_params_parse(int argc, char ** argv, whisper_params & params) {
             params.audio_ctx = std::stoi(argv[++i]);
         } else if (arg == "-su" || arg == "--speed-up") {
             params.speed_up = true;
-        } else if (arg == "-v" || arg == "--verbose") {
-            params.verbose = true;
-        } else if (arg == "--translate") {
+        } else if (arg == "-tr" || arg == "--translate") {
             params.translate = true;
         } else if (arg == "-kc" || arg == "--keep-context") {
             params.no_context = false;
@@ -125,8 +122,7 @@ void whisper_print_usage(int argc, char ** argv, const whisper_params & params)
     fprintf(stderr, "  -mt N,    --max_tokens N   maximum number of tokens per audio chunk (default: %d)\n", params.max_tokens);
     fprintf(stderr, "  -ac N,    --audio_ctx N    audio context size (default: %d, 0 - all)\n", params.audio_ctx);
     fprintf(stderr, "  -su,      --speed-up       speed up audio by factor of 2 (faster processing, reduced accuracy, default: %s)\n", params.speed_up ? "true" : "false");
-    fprintf(stderr, "  -v,       --verbose        verbose output\n");
-    fprintf(stderr, "            --translate      translate from source language to english\n");
+    fprintf(stderr, "  -tr,      --translate      translate from source language to english\n");
     fprintf(stderr, "  -kc,      --keep-context   keep text context from earlier audio (default: false)\n");
     fprintf(stderr, "  -ps,      --print_special  print special tokens\n");
     fprintf(stderr, "  -nt,      --no_timestamps  do not print timestamps\n");