Rename audio transcribe script
This commit is contained in:
parent
ba9a776867
commit
bb26b8ceff
|
@ -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)
|
||||
|
|
|
@ -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 <filename> <output name w/ extension> <optional: sample rate. Defaults to 44100> <optional: channel count. Defaults to 2> <optional: start time HH:MM:SS, use empty string or 0 for start> <optional: end time HH:MM:SS, use empty string or 0 for no value>${NORMAL}\n"
|
||||
printf "${BOLD}${RED}Usage: transcode-audio <filename> <output name w/ extension> <optional: sample rate. Defaults to 44100> <optional: channel count. Defaults to 2> <optional: start time HH:MM:SS, use empty string or 0 for start> <optional: end time HH:MM:SS, use empty string or 0 for no value>${NORMAL}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user