I have the following, working BASH script, which I run on a Mac Pro 2010/Mojarve OS:
#!/bin/bash c=0 cnt=0 # count up wav files cnt=$(find /hummdinger/LoCI/LoCI_orig/VO/WAV_Processed/ -name "*.wav" | wc -l) echo "there are $cnt .wav voice samples." # go through and run rhubarb on them for f in $(find /hummdinger/LoCI/LoCI_orig/VO/WAV_Processed/ -name "*.wav") do c=$((c+1)) echo "$c of $cnt"; f=$(basename "$f" .wav) /hummdinger/LoCI/LoCI_orig/TSV/rhubarb-lip-sync-1.10.0-osx/rhubarb /hummdinger/LoCI/LoCI_orig/VO/WAV_Processed/"$f".wav -o /hummdinger/LoCI/LoCI_orig/LOCI_GAME_FILES/Compiled/Windows/sync/"$f".tsv done;
It takes a list of WAV files, goes through each, scans the file and then produces output and stores the generated TSV files somewhere else. The point of 'rhubarb' is to produce lip-sync information from a recording (the WAV files). etc. etc. blah blah.
The one problem with this script is it takes ~10-12 HOURS to run over about 3,000 wav files. On my crappier, non-ECC ram, one-time-it-corrupted-the-whole-lot-and-I-made-a-vow-to-never-use-it-again Mac Mini 2018, it took about 3 hours.
But this is a Mac Pro, meaning though it's old (2010), but it's very reliable and has 12x Xeons. This is pretty low intensity work, so I'm missing out on that extra juice by making it single processor. I just want to get this script working with 10-15-30 threads, and hopefully this will speed it up and it'll be done in an hour or less; not most of the day.
My thoughts are: divide the directory of WAVs into groups of (total_files/15), put these listings in file1-15.txt, then read each one back and process it in 15 separate threads. But that's about as far as I've gotten :P
Can anyone help with making this a muti-process script? I'm an amateur and made this script with help from reddit.