Skip to content

Lab 0. Setting up

David Goedicke edited this page Jul 6, 2022 · 1 revision

Join the workshop Discord group, ccrma_nn4a

The invite code for the workshop Discord is: (contact us for a new link)

You can either use the online Discord page (https://discordapp.com/) or download the app.

This provides a way for workshop members to share links, ask questions or message one another.

Getting Set-up

Before we can get started, we need to download a few things. First, we need to download the project files we will use for this workshop. The following step-by-step instructions will guide you through making a git account, forking the repository and cloning it to your computer.

Before we start, please make sure that git is installed. There is the GitHub Desktop version and the regular git.

Fork and then Clone

  1. Before we start, you need a GitHub account, so please go to github.com/join and create one if you don't have one yet.
  2. Login to your new or existing GitHub account.
  3. Navigate to this repository and fork on the fork button in the top right corner. Fork More help This will create your own copy of the repository under your account.
  4. Now open your command line or terminal.
  5. Make a folder on your local computer for this workshop. So if you e.g. want to create, a folder called e.g. NN4A you would write a function like mkdir NN4A and then hit return. 5 Now enter your new folder by typing cd NN4A. Change NN4A to whatever you named the folder in the previous command.
  6. Now clone the forked version of this repository. You can do this with the command git clone http://github.com/<<<YourGithubUserName>>>/RealtimeAudioClassification.git Remember to replace <<<YourGithubUserName>>> with your GitHub username.
  7. If you now navigate into the folder with cd RealtimeAudioClassification and run ls (dir on Windows) you should see the project files like e.g. 00_Setup, 01_Spectrum Generation, 02_Training.

Here is a cheat sheet if you need help with UNIX commands.

Here is another GitHub cheat sheet and a GIT Command Line cheat sheet.

Installing software tools and libraries

Before we can use these project files, we have to install a few tools and software libraries.

  1. Install Jupyter Notebooks. (Skip this step if you already have Jupyter Notebooks installed.)
  2. Start Jupyter notebooks in the RealtimeAudioClassification folder that you recently cloned.
  3. Within Jupyter, navigate to the folder 00_Setup and open the Notebook inside. The notebook is called Setup.ipynb.
  4. Follow the steps inside that notebook to install and test the software libraries we need for this workshop.

How to use Jupyter Notebooks

Jupyter Notebooks are the main "IDE" that we will be using in this workshop. Jupyter Notebooks is great to try out different code snippets, and to selectively debug the code you are writing.

Everything in these notebooks resolves around cells. The current active cell has a blue or green stripe on the left side. (Why green or blue? Look here!) Normally a cell contains a section of code that is executed together. For example, we often define each function in its own cell.

Example Image of how a cell looks like.

You can edit the code that is in that cell by clicking into the cell.

To run the code in the cell, you can click on the button on the top that says >| Run or press down shift + return at the same time on your keyboard.

This will run this cell and select the cell below. If you want to run multiple cells in succession, you can press shift + return a few times to quickly run the whole notebook.

If you followed the setup steps to install the packages and download the data-set, then we can proceed in running the relevant code.

Download datasets

For the first lab, we will use our very own Cats-Vs-Dogs dataset. Download the dataset here: Cats vs Dogs.

After downloading the dataset, unzip and move the files to the AudioData/ folder in your workshop repository folder. Any Dataset you might want to train on later should also go in the AudioData folder to make the easiest use of the existing scripts.