diff options
| -rw-r--r-- | README.md | 4 | ||||
| -rwxr-xr-x | latest.pl | 12 | ||||
| -rwxr-xr-x | mix.sh | 8 |
3 files changed, 16 insertions, 8 deletions
@@ -10,6 +10,10 @@ It's based on the reference implementation in Theano: https://github.com/soroush This code requires Python 3.5+ and PyTorch 0.1.12+. Installation instructions for PyTorch are available on their website: http://pytorch.org/. You can install the rest of the dependencies by running `pip install -r requirements.txt`. +``` +sudo apt install lame ffmpeg sox +``` + ## Datasets We provide a script for creating datasets from YouTube single-video mixes. It downloads a mix, converts it to wav and splits it into equal-length chunks. To run it you need youtube-dl (a recent version; the latest version from pip should be okay) and ffmpeg. To create an example dataset - 4 hours of piano music split into 8 second chunks, run: @@ -8,10 +8,10 @@ our $opt_v; # print log for all files our $opt_n; # name/tag for file our $opt_e; # endpoint for cortex upload getopts('lave:n:'); -print "n: $opt_n\n"; -print "v: $opt_v\n"; -print "e: $opt_e\n"; -print "l: $opt_l\n"; +print STDERR "n: $opt_n\n"; +print STDERR "v: $opt_v\n"; +print STDERR "e: $opt_e\n"; +print STDERR "l: $opt_l\n"; our $matches = 0; if (scalar @ARGV) { @@ -26,6 +26,7 @@ sub process($){ my ($dir) = @_; my @exp = split(":", $dir); my $name = $exp[4]; + my $dataset = $name; my $ep; my $path = "results/" . $dir . "/"; my $chex = $path . "checkpoints/"; @@ -96,7 +97,8 @@ sub process($){ print "\n"; print $name . ", $c samples\n"; print "\n"; - system('/bin/bash', 'mix.sh', $path, $name, $opt_e, $epoch_num); + print "$path $name $opt_e $dataset $epoch_num\n"; + system('/bin/bash', 'mix.sh', $path, $name, $opt_e, $dataset, $epoch_num); return 0; } @@ -1,14 +1,15 @@ #!/bin/bash -if [ "$#" -ne 4 ]; then - echo "Usage: $0 <results/exp\:experiment> render_name endpoint epoch" +if [ "$#" -ne 5 ]; then + echo "Usage: $0 <results/exp\:experiment> render_name endpoint dataset epoch" exit fi dir=$1 name=$2 endpoint=$3 -epoch=$4 +dataset=$4 +epoch=$5 now=`date +'%Y%m%d'` echo "rendering $name" @@ -33,6 +34,7 @@ else -F "module=samplernn" \ -F "activity=train" \ -F "generated=true" \ + -F "dataset=$dataset" \ -F "epoch=$epoch" \ -F "file=@./output/$name.mp3" \ $endpoint |
