Code Monkey home page Code Monkey logo

audio-tagging-toolkit's Introduction

Mac Installation

Install Audio Tagging Toolkit using pip:

pip install git+git://github.com/hipstas/audio-tagging-toolkit.git

Next we will install ffmpeg, a command-line tool for audio and video encoding. First we will install several media codecs and command-line tools, then we will download ffmpeg's source code and compile it before installing. If you've previously installed ffmpeg using Homebrew, uninstall that copy before we begin:

brew uninstall ffmpeg

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

Install Ubuntu dependencies:

apt-get update -y && apt-get upgrade -y
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
sudo apt-get -y install swig
sudo apt-get -y install libpulse-dev

pip install -U pip
pip install virtualenv

#Install FFmpeg with MP3 support (at your own risk):

sudo add-apt-repository -y ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get -y install ffmpeg

Now install Audio Tagging Toolkit using pip:

pip install git+git://github.com/hipstas/audio-tagging-toolkit.git

Script examples via bash

  • Locate applause in single file, with non-applause segments labeled "Speaker Name" and a 2-second buffer on either side of each transition:
cd /path/to/audio-tagging-toolkit

python FindApplause.py -c -b 2 -l "Speaker Name" -i /path/to/audio.mp3
  • Batch applause classification with CSV output, default 1-second buffer, and label for non-applause regions:
cd /path/to/audio-tagging-toolkit

python FindApplause.py -c -b -l "Speaker Name" /path/to/directory/
  • Diarize a single file:
cd /path/to/audio-tagging-toolkit

python Diarize.py -b -c -i /Users/mclaugh/Desktop/attktest/Creeley-Robert_33_A-Note_Rockdrill-2.mp3
  • Batch Diarize:
cd /path/to/audio-tagging-toolkit

python Diarize.py -b -c /Users/mclaugh/Desktop/attktest/
  • Excerpt a class:
cd /Users/mclaugh/Dropbox/WGBH_ARLO_Project/audio-tagging-toolkit/

for f in /Volumes/Turcich-2012/AAPB_Test_Haystack/*_king_gradientboosting.csv; do
base=$(basename """$f""" _king_gradientboosting.csv)
python ExcerptClass.py -i """/Volumes/Turcich-2012/AAPB_Test_Haystack/$base.mp3""" -t """$f""" -e 0 -o "/Volumes/Turcich-2012/AAPB_excerpt_output/";
done

for f in /Volumes/Turcich-2012/AAPB_Test_Haystack/*_king_gradientboosting.csv; do
base=$(basename """$f""" _king_gradientboosting.csv)
python ExcerptClass.py -i """/Volumes/Turcich-2012/AAPB_Test_Haystack/$base.mp4""" -t """$f""" -e 0 -o "/Volumes/Turcich-2012/AAPB_excerpt_output/";
done
  • Excerpt from MP4s only:
cd /Users/mclaugh/Dropbox/WGBH_ARLO_Project/audio-tagging-toolkit/

for f in /Volumes/Turcich-2012/AAPB_Test_Haystack/*.mp4; do
base=$(basename """$f""" .mp4)
command="""python ExcerptClass.py -i "/Volumes/Turcich-2012/AAPB_Test_Haystack/$base.mp4" -t "/Volumes/Turcich-2012/AAPB_Test_Haystack/${base}_king_gradientboosting.csv" -e 0 -o "/Volumes/Turcich-2012/AAPB_excerpt_output/" """;
echo $command
eval $command;
done
  • Launch QuickCheck script to rapidly review applause/speaker labels in Sonic Visualiser:
cd /path/to/audio-tagging-toolkit
python QuickCheck.py -a -v -i /path/to/audio/files
  • QuickCheck diarization mode:
cd /path/to/audio-tagging-toolkit
python QuickCheck.py -d -v -i /path/to/audio/files
  • Assign random tags:
python RandomTags.py -s 3 -n 3 -e -i /path/to/example.mp3 -o /path/to/output_dir/

audio-tagging-toolkit's People

Contributors

stevemclaugh avatar

Watchers

 avatar  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.