summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2018-06-16 11:53:41 +0200
committerjules@lens <julescarbon@gmail.com>2018-06-16 11:53:41 +0200
commit4c7ec7996256844a90b2187a3fea40a7e037b161 (patch)
tree9b029688190e5d2d644e4d8612749df92c00bf8d
parent410afb65bc350242d5ba248fb6a082db4d14e23b (diff)
needed to install LAME!
-rw-r--r--README.md4
-rwxr-xr-xlatest.pl12
-rwxr-xr-xmix.sh8
3 files changed, 16 insertions, 8 deletions
diff --git a/README.md b/README.md
index 4d39632..a7c3839 100644
--- a/README.md
+++ b/README.md
@@ -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:
diff --git a/latest.pl b/latest.pl
index 3eef1a2..b135e1d 100755
--- a/latest.pl
+++ b/latest.pl
@@ -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;
}
diff --git a/mix.sh b/mix.sh
index 48e499b..484e750 100755
--- a/mix.sh
+++ b/mix.sh
@@ -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