Created
July 26, 2019 21:20
-
-
Save nukeador/9704f1beaffa29ed9c003c4fe525d147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You need two csv files with the links to the vendor wav files | |
# vendor1.csv should have urls in the 5th column | |
# vendor2.csv should have urls in the 13th column | |
rm vendor1.audios.txt | |
rm vendor2.audios.txt | |
mkdir -p audios | |
awk -F "\"*,\"*" '{print $5}' vendor1.csv | shuf -n20 >> vendor1.audios.txt | |
awk -F "\"*,\"*" '{print $13}' vendor2.csv | shuf -n20 >> vendor2.audios.txt | |
cd audios | |
echo -e 'Audios are being downloaded, please wait...\n\n' | |
wget -q -i ../vendor1.audios.txt | |
wget -q -i ../vendor2.audios.txt | |
echo 'Average duration: ' | |
soxi -D *.wav | awk '{ total += $1; count++ } END { print total/count }' | |
rm *.wav |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment