Skip to content

Commit

Permalink
Added LibROSA installation guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manohar Vohra committed Sep 3, 2019
1 parent c36906d commit e71570e
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion SampleRNN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,51 @@ Once complete, let us install the library now:
python3 setup.py develop
```

## Additional Packages Needed
To be able to run the SampleRNN application, the PYNQ OS is still missing some packages (i.e. LibROSA). The following are steps to install them.

To begin with, download the LLVM 6.0.1 source code from [here](http://releases.llvm.org/download.html#6.0.1) and copy it onto the board, preferably in a Downloads folder. Unzip the file:
```sh
sudo su
tar -xf llvm-6.0.1.src.tar.gz
```
Create a new directory and configure the LLVM build:
```sh
mkdir llvm_build
cd llvm_build
tmux
cmake ~/Downloads/llvm-6.0.1.src -DLLVM_TARGETS_TO_BUILD="ARM" -DCMAKE_BUILD_TYPE="Release"
```
Begin the build:
```sh
cmake --build . -- -j1
```
Install once the build finishes and restart the board:
```sh
cmake --build . --target install
shutdown -r now
```
Install additional packages, in this order as some packages which are installed with others need to be a different version to work:
```sh
sudo su
pip3 install librosa==0.6.1
pip3 install llvmlite==0.24.0
pip3 install numba==0.39.0
shutdown -r now
```
To test if this was successful, we should be able to import the package now:
```sh
sudo su
python3
import librosa
```

## Running SampleRNN
Once PyTorch is ported, the SampleRNN repo can be cloned, the steps can be followed on the repo but executed with the following command and **profiling.py** file, which is compatible with the accelerators designed and also profiles the application to monitor performance:
```sh
python3 profiling.py --exp TEST64 --frame_size 16 4 --n_rnn 2 --dataset piano --cuda False --sample_length 16000 --dim 64
```
This command generates one second of audio @ 16000Hz


## PYNQ-Z1 Image
An image file with PyTorch v0.4.1 on PYNQ OS v2.3 can be downloaded from [here](). This also includes SampleRNN files.

0 comments on commit e71570e

Please sign in to comment.