#! /bin/bash

# set the folder
myFolder=/lol/hahadata0/NOISE/


declare myRandomFile=""$(find $myFolder -type f \( -name "*.wav" -or  -name "*.mp4"  -name "*.m4a" -or -name "*.mp3" -or -name "*.flac"-or -name "*.ogg" \) -printf "%p\n" | sed 's/^.\///' | shuf -n 1)""

echo $myRandomFile

#cp "$myRandomFile" .

ffmpeg -i "$myRandomFile" -vn -ar 22050 -ac 1 -b:a 32k poopy_noise_file.mp3
#while read filename; do
#    ffmpeg -i "$filename" -vn -ar 44100 -ac 2 -b:a 112k "$filename".mp3
#done < disfile
