diff --git a/bin/transcribe-audio b/bin/transcribe-audio index 20fa6fc..55ae5de 100644 --- a/bin/transcribe-audio +++ b/bin/transcribe-audio @@ -45,7 +45,7 @@ output_name_without_ext="$2" model="$3" threads=$4 -# 4 seems to be the sweet spot. +# 4 seems to be the sweet spot for most models, except medium might be faster with 8. default_thread_count=4 if [[ $input_wav == "" || $output_name_without_ext == "" || $model == "" ]]; then diff --git a/bin/transcribe-video b/bin/transcribe-video index e426b2d..3803ca6 100644 --- a/bin/transcribe-video +++ b/bin/transcribe-video @@ -46,7 +46,14 @@ extract-16bit-wav-from-video "$input_video" "$wav_name" if [[ $? == 1 ]]; then exit 1; fi for model in "$@"; do - transcribe-audio "$wav_name" "$output_name_without_ext" "${model}" + # Tweak thread count based on model size. + thread_count=4 + if [[ $model == "medium" ]]; then + thread_count=8 + fi + + transcribe-audio "$wav_name" "$output_name_without_ext" "${model}" $thread_count + if [[ $? == 1 ]]; then printf "${RED}${BOLD}Saving the audio file \"$wav_name\" in case you want to reuse it for debugging.\n${NORMAL}" exit 1