mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-09 18:58:31 +02:00
examples : update usage/help in yt-wsp.sh (#3251)
This commit updates the usage/help message to be more readable and include the environment variables available to set options.
This commit is contained in:
@ -80,15 +80,41 @@ cleanup() {
|
||||
}
|
||||
|
||||
print_help() {
|
||||
echo "################################################################################"
|
||||
echo "Usage: ./examples/yt-wsp.sh <video_url>"
|
||||
echo "# See configurable env variables in the script; there are many!"
|
||||
echo "# This script will produce an MP4 muxed file in the working directory; it will"
|
||||
echo "# be named for the title and id of the video."
|
||||
echo "# passing in https://youtu.be/VYJtb2YXae8 produces a file named";
|
||||
echo "# 'Why_we_all_need_subtitles_now-VYJtb2YXae8-res.mp4'"
|
||||
echo "# Requirements: ffmpeg yt-dlp whisper.cpp"
|
||||
echo "################################################################################"
|
||||
cat << 'EOF'
|
||||
Usage:
|
||||
MODEL_PATH=<model> \
|
||||
WHISPER_EXECUTABLE=<whisper-cli> \
|
||||
WHISPER_LANG=en \
|
||||
WHISPER_THREAD_COUNT=<int> \
|
||||
./examples/yt-wsp.sh <video_url>
|
||||
|
||||
Description:
|
||||
This script downloads a YouTube video, generates subtitles using Whisper,
|
||||
and muxes them into an MP4 output file.
|
||||
|
||||
Output:
|
||||
An MP4 file with embedded subtitles will be produced in the working directory.
|
||||
The file will be named using the video title and ID.
|
||||
Example:
|
||||
Input: https://youtu.be/VYJtb2YXae8
|
||||
Output: Why_we_all_need_subtitles_now-VYJtb2YXae8-res.mp4
|
||||
|
||||
Requirements:
|
||||
- ffmpeg
|
||||
- yt-dlp
|
||||
- whisper.cpp
|
||||
|
||||
Environment Variables:
|
||||
MODEL_PATH Path to the Whisper model (e.g., models/ggml-base.en.bin)
|
||||
WHISPER_EXECUTABLE Path to the Whisper CLI executable
|
||||
WHISPER_LANG Language code (e.g., 'en' for English)
|
||||
WHISPER_THREAD_COUNT Number of CPU threads to use
|
||||
|
||||
Tip:
|
||||
The script has many configurable environment variables.
|
||||
Review the source code to explore all options.
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
check_requirements() {
|
||||
|
Reference in New Issue
Block a user