mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-08-12 15:27:27 +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() {
|
print_help() {
|
||||||
echo "################################################################################"
|
cat << 'EOF'
|
||||||
echo "Usage: ./examples/yt-wsp.sh <video_url>"
|
Usage:
|
||||||
echo "# See configurable env variables in the script; there are many!"
|
MODEL_PATH=<model> \
|
||||||
echo "# This script will produce an MP4 muxed file in the working directory; it will"
|
WHISPER_EXECUTABLE=<whisper-cli> \
|
||||||
echo "# be named for the title and id of the video."
|
WHISPER_LANG=en \
|
||||||
echo "# passing in https://youtu.be/VYJtb2YXae8 produces a file named";
|
WHISPER_THREAD_COUNT=<int> \
|
||||||
echo "# 'Why_we_all_need_subtitles_now-VYJtb2YXae8-res.mp4'"
|
./examples/yt-wsp.sh <video_url>
|
||||||
echo "# Requirements: ffmpeg yt-dlp whisper.cpp"
|
|
||||||
echo "################################################################################"
|
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() {
|
check_requirements() {
|
||||||
|
Reference in New Issue
Block a user