yt-wsp.sh : improve usage instructions

This commit is contained in:
Georgi Gerganov 2022-12-07 22:12:08 +02:00
parent 575c53dc41
commit 47afb93c3c
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -2,7 +2,15 @@
# Small shell script to more easily automatically download and transcribe live stream VODs. # Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp # This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./yt-wsp help` to print help info. # Use `./examples/yt-wsp.sh help` to print help info.
#
# Sample usage:
#
# git clone https://github.com/ggerganov/whisper.cpp
# cd whisper.cpp
# make
# ./examples/yt-wsp.sh https://www.youtube.com/watch?v=1234567890
#
# MIT License # MIT License
@ -43,7 +51,7 @@ cleanup() {
} }
print_help() { print_help() {
echo "Usage: ./yt-wsp <video_url>" echo "Usage: ./examples/yt-wsp.sh <video_url>"
echo "See configurable env variables in the script" echo "See configurable env variables in the script"
echo "This will produce an MP4 muxed file called res.mp4 in the working directory" echo "This will produce an MP4 muxed file called res.mp4 in the working directory"
echo "Requirements: ffmpeg yt-dlp whisper" echo "Requirements: ffmpeg yt-dlp whisper"
@ -65,7 +73,14 @@ check_requirements() {
if ! command -v "$WHISPER_EXECUTABLE" &>/dev/null; then if ! command -v "$WHISPER_EXECUTABLE" &>/dev/null; then
WHISPER_EXECUTABLE="./main" WHISPER_EXECUTABLE="./main"
if ! command -v "$WHISPER_EXECUTABLE" &>/dev/null; then if ! command -v "$WHISPER_EXECUTABLE" &>/dev/null; then
echo "Whisper is required (https://github.com/ggerganov/whisper.cpp)." echo "Whisper is required (https://github.com/ggerganov/whisper.cpp):"
echo "Sample usage:"
echo ""
echo " git clone https://github.com/ggerganov/whisper.cpp"
echo " cd whisper.cpp"
echo " make"
echo " ./examples/yt-wsp.sh https://www.youtube.com/watch?v=1234567890"
echo ""
exit 1 exit 1
fi fi
fi fi