Set whisper thread count based on the model
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user