diff options
| -rwxr-xr-x | get.pl | 7 | ||||
| -rwxr-xr-x | process_fns | 11 |
2 files changed, 13 insertions, 5 deletions
@@ -9,9 +9,11 @@ foreach my $s (@ARGV){ if ($s =~ /^http/) { if ($s =~ /(wav|aiff?|flac|mp3|opus)$/i) { my $fn = `basename $s`; + print "downloading $fn\n"; system('/usr/bin/wget', $s); system('/usr/bin/perl', 'dataset.pl', $fn); } else { + print "youtube-dl $s\n"; my $yt = `youtube-dl --extract-audio --audio-format flac -o "%(title)s.%(ext)s" $s`; my @partz = split("\n", $yt); foreach $part (@partz) { @@ -38,9 +40,14 @@ foreach my $s (@ARGV){ } } else { if ($s !~/\..*$/) { $s .= ".wav"; } + print "downloading $s\n"; system('/usr/bin/wget', 'https://neural:spawn5@asdf.us/neural/' . $s); system('/usr/bin/perl', 'dataset.pl', $s); } + open(my $fd, ">>../run_slap.sh"); + print $fd "standard $fn"; + close $fn; + $fn = undef; } diff --git a/process_fns b/process_fns index 0cbdeee..cef738d 100755 --- a/process_fns +++ b/process_fns @@ -1,12 +1,13 @@ # workon samplernn function generate () { - exp_name=$1 + exp_name=${1%.*} n_samples=$2 sample_rate=$3 duration=$4 let sample_length=$3*$4 + sleep 0.1 echo "" echo "###################################################" echo "###################################################" @@ -30,14 +31,14 @@ function generate () { --n_samples $n_samples \ --epoch_limit 1 \ --resume True - sleep 1 } function gen_len () { - exp_name=$1 + exp_name=${1%.*} n_samples=$2 sample_rate=$3 sample_length=$4 + sleep 0.1 echo "" echo "###################################################" echo "###################################################" @@ -63,13 +64,14 @@ function gen_len () { --resume True } function run () { - exp_name=$1 + exp_name=${1%.*} epoch_limit=$2 n_samples=$3 sample_rate=$4 duration=$5 let sample_length=$4*$5 + sleep 0.1 echo "" echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" @@ -93,7 +95,6 @@ function run () { --keep_old_checkpoints False \ --epoch_limit $epoch_limit \ --resume True - sleep 1 } function standard () { dataset=$1 |
