2022-10-25 17:23:39 +00:00
|
|
|
# main
|
|
|
|
|
|
|
|
This is the main example demonstrating most of the functionality of the Whisper model.
|
|
|
|
It can be used as a reference for using the `whisper.cpp` library in other projects.
|
|
|
|
|
|
|
|
```
|
|
|
|
./main -h
|
|
|
|
|
2022-11-25 17:06:56 +00:00
|
|
|
usage: ./main [options] file0.wav file1.wav ...
|
2022-10-30 15:11:37 +00:00
|
|
|
|
2022-11-25 17:06:56 +00:00
|
|
|
options:
|
2023-02-04 07:45:52 +00:00
|
|
|
-h, --help [default] show this help message and exit
|
|
|
|
-t N, --threads N [4 ] number of threads to use during computation
|
|
|
|
-p N, --processors N [1 ] number of processors to use during computation
|
|
|
|
-ot N, --offset-t N [0 ] time offset in milliseconds
|
|
|
|
-on N, --offset-n N [0 ] segment index offset
|
|
|
|
-d N, --duration N [0 ] duration of audio to process in milliseconds
|
|
|
|
-mc N, --max-context N [-1 ] maximum number of text context tokens to store
|
|
|
|
-ml N, --max-len N [0 ] maximum segment length in characters
|
2023-11-27 10:04:08 +00:00
|
|
|
-sow, --split-on-word [false ] split on word rather than on token
|
2023-02-04 07:45:52 +00:00
|
|
|
-bo N, --best-of N [5 ] number of best candidates to keep
|
2023-11-27 10:04:08 +00:00
|
|
|
-bs N, --beam-size N [5 ] beam size for beam search
|
2023-02-04 07:45:52 +00:00
|
|
|
-wt N, --word-thold N [0.01 ] word timestamp probability threshold
|
|
|
|
-et N, --entropy-thold N [2.40 ] entropy threshold for decoder fail
|
|
|
|
-lpt N, --logprob-thold N [-1.00 ] log probability threshold for decoder fail
|
2023-11-27 10:04:08 +00:00
|
|
|
-debug, --debug-mode [false ] enable debug mode (eg. dump log_mel)
|
2023-02-04 07:45:52 +00:00
|
|
|
-tr, --translate [false ] translate from source language to english
|
|
|
|
-di, --diarize [false ] stereo audio diarization
|
2023-11-27 10:04:08 +00:00
|
|
|
-tdrz, --tinydiarize [false ] enable tinydiarize (requires a tdrz model)
|
2023-02-04 07:45:52 +00:00
|
|
|
-nf, --no-fallback [false ] do not use temperature fallback while decoding
|
|
|
|
-otxt, --output-txt [false ] output result in a text file
|
|
|
|
-ovtt, --output-vtt [false ] output result in a vtt file
|
|
|
|
-osrt, --output-srt [false ] output result in a srt file
|
2023-11-27 10:04:08 +00:00
|
|
|
-olrc, --output-lrc [false ] output result in a lrc file
|
2023-02-04 07:45:52 +00:00
|
|
|
-owts, --output-words [false ] output script for generating karaoke video
|
2023-11-27 10:04:08 +00:00
|
|
|
-fp, --font-path [/System/Library/Fonts/Supplemental/Courier New Bold.ttf] path to a monospace font for karaoke video
|
2023-02-04 07:45:52 +00:00
|
|
|
-ocsv, --output-csv [false ] output result in a CSV file
|
2023-03-22 19:37:36 +00:00
|
|
|
-oj, --output-json [false ] output result in a JSON file
|
2023-11-27 10:04:08 +00:00
|
|
|
-ojf, --output-json-full [false ] include more information in the JSON file
|
2023-02-04 07:45:52 +00:00
|
|
|
-of FNAME, --output-file FNAME [ ] output file path (without file extension)
|
|
|
|
-ps, --print-special [false ] print special tokens
|
|
|
|
-pc, --print-colors [false ] print colors
|
|
|
|
-pp, --print-progress [false ] print progress
|
2023-11-27 10:04:08 +00:00
|
|
|
-nt, --no-timestamps [false ] do not print timestamps
|
2023-02-04 07:45:52 +00:00
|
|
|
-l LANG, --language LANG [en ] spoken language ('auto' for auto-detect)
|
2023-11-27 10:04:08 +00:00
|
|
|
-dl, --detect-language [false ] exit after automatically detecting language
|
2023-02-04 07:45:52 +00:00
|
|
|
--prompt PROMPT [ ] initial prompt
|
|
|
|
-m FNAME, --model FNAME [models/ggml-base.en.bin] model path
|
|
|
|
-f FNAME, --file FNAME [ ] input WAV file path
|
2023-11-27 10:04:08 +00:00
|
|
|
-oved D, --ov-e-device DNAME [CPU ] the OpenVINO device used for encode inference
|
|
|
|
-ls, --log-score [false ] log best decoder scores of tokens
|
|
|
|
-ng, --no-gpu [false ] disable GPU
|
2022-10-25 17:23:39 +00:00
|
|
|
```
|