Code Monkey home page Code Monkey logo

audio-ml-introduction's Introduction

Workshop: Audio Machine Learning Introduction

Audio Software

Install the following programs for audio visualization and playback (available for macOS, Windows, and Linux).

Text Editor

Install a plaintext editor if you don't have one already.

Command Line Setup (Mac)

Launch Terminal in macOS, located at /Applications/Utilities/Terminal.app

If your current account doesn't have admin privileges, switch users by entering the following command (substituting the username of the admin account). Press return and enter your password at the prompt.

su your_admin_name

If you don't remember your admin username, the following command will list the users on your system.

ls /Users/

To install a bundle of command-line tools provided by Apple, paste the following line into the terminal window and press return. When prompted, click "Install," then "Agree."

xcode-select --install

Run the following command to install the Homebrew package manager. Enter your password at the prompt to proceed.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Next, enter this command to update Homebrew.

brew update

If Homebrew returns an error, enter the following command to give it the permissions it expects.

sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local

Python is installed by default in macOS, but we’ll want to install a fresh copy through Homebrew. This version includes the pip package manager and a few other tools Apple left out.

brew install python

brew link --overwrite python

Before we install our Python dependencies, let’s update pip. The -U option upgrades related components to their most recent versions.

pip install -U pip

Enter the following commands to install several required Python packages.

pip install -U jupyter numpy scipy matplotlib pandas sklearn pydub tqdm requests

pip install pyAudioAnalysis

Now install ffmpeg, a command-line tool for audio/video encoding. First we will install several media codecs, then we will download ffmpeg's source code and compile it before installing. Although it is faster to install ffmpeg through Homebrew, that version can't read or write MP3 files.

Enter the following commands one at a time; note that the first and fourth lines are very long. After the last command you will be prompted to enter your password.

brew install automake fdk-aac git lame libass libtool libvorbis libvpx opus sdl shtool texi2html theora wget x264 xvid yasm

git clone http://source.ffmpeg.org/git/ffmpeg.git ffmpeg

cd ffmpeg

./configure  --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid

make && sudo make install

While you wait for ffmpeg to compile (which may take 5 or 10 minutes), let's create a Jupyter notebook. Open a new terminal window by pressing ⌘+N or selecting "Shell > New Window > New Window with Settings - Novel" in the toolbar.

Now launch Jupyter by entering the following two commands. The first navigates to the desktop and the second launches Jupyter's local notebook server.

cd ~/Desktop

jupyter notebook

Leave this terminal window open as long as you're using Jupyter. You might want to minimize it.

The Jupyter interface should appear in a new browser window, displaying the files on your desktop. If it doesn't launch automatically, enter http://localhost:8888 in your browser's URL box.

Create a new Jupyter notebook via the dropdown menu at the upper left: File > New Noteboook > Python 2

If you've made it this far, you're done for now. We'll talk more about Jupyter during the workshop.

audio-ml-introduction's People

Contributors

stevemclaugh avatar tanyaclement avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.