diff --git a/dotfiles/bin/extract-audio-from-video b/dotfiles/bin/extract-audio-from-video index dd9a1ca..b4a53c0 100644 --- a/dotfiles/bin/extract-audio-from-video +++ b/dotfiles/bin/extract-audio-from-video @@ -1,9 +1,11 @@ #!/usr/bin/env bash -# Extracts audio from a video. It expects you to know what audio codecs the video container has, e.g. -# it's an mp4 video with aac and m4a audio. Just set the format to the appropriate extension. -# If you want to convert to a different format or you want to change the bit rate, channels, trim the audio, etc. -# then use extract-audio-from-video-and-transcode +# Extracts audio from a video. It expects you to know what audio codecs the +# video container has, e.g. it's an mp4 video with aac and m4a audio. Just set +# the format to the appropriate extension. +# +# If you want to convert to a different format or you want to change the sample +# rate, channel count, trim the audio, etc. then use transcode-audio. if which tput >/dev/null 2>&1; then ncolors=$(tput colors) diff --git a/dotfiles/bin/extract-audio-from-video-and-transcode b/dotfiles/bin/transcode-audio similarity index 78% rename from dotfiles/bin/extract-audio-from-video-and-transcode rename to dotfiles/bin/transcode-audio index a634295..d12b6e7 100644 --- a/dotfiles/bin/extract-audio-from-video-and-transcode +++ b/dotfiles/bin/transcode-audio @@ -1,7 +1,7 @@ #!/usr/bin/env bash -# Extracts audio from a video and transcodes it based on the supplied params. If you just want the audio -# from the video as-is then use extract-audio-from-video +# Transcodes audio from a video or audio source into a new audio file. If you +# just want the audio from a video as-is then use extract-audio-from-video if which tput >/dev/null 2>&1; then ncolors=$(tput colors) @@ -37,7 +37,7 @@ output_base=$(basename -- "$output_name") output_extension="${output_base##*.}" if [[ $filename == "" || $output_extension == "" || $output_extension == $output_base ]]; then - printf "${BOLD}${RED}Usage: extract-audio-from-video-and-transcode ${NORMAL}\n" + printf "${BOLD}${RED}Usage: transcode-audio ${NORMAL}\n" exit 1 fi diff --git a/dotfiles/bin/transcribe-video b/dotfiles/bin/transcribe-video index 735789a..d206aa4 100644 --- a/dotfiles/bin/transcribe-video +++ b/dotfiles/bin/transcribe-video @@ -47,7 +47,7 @@ fi channel_count=1 sample_rate=16000 -extract-audio-from-video-and-transcode "$input_video" "$wav_name" $sample_rate $channel_count $start_time $end_time +transcode-audio "$input_video" "$wav_name" $sample_rate $channel_count $start_time $end_time if [[ $? == 1 ]]; then exit 1; fi for model in "$@"; do