Mercurial > hg > chourdakisreiss2016
view experiment-reverb/code/segmentation3.py @ 2:c87a9505f294 tip
Added LICENSE for code, removed .wav files
author | Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk> |
---|---|
date | Sat, 30 Sep 2017 13:25:50 +0100 |
parents | 246d5546657c |
children |
line wrap: on
line source
# -*- coding: utf-8 -*- """ Created on Mon Jun 8 16:17:12 2015 @author: Emmanouil Theofanis Chourdakis """ from sys import argv import msaf if __name__=="__main__": if len(argv) != 3: print("Incorrect number of arguments:") print("Usage: ") print("%s <input> <output_folder>") print("") print("Arguments:") print("<input>\tThe input filename. Can be .wav, .mp3, etc...") print("<output_folder>\tThe output where the segmented parts will reside") sys.exit(-1) else: print("[II] Loading libraries") import essentia from essentia import Pool from essentia.standard import * import yaml # reqyures matplotlib from pylab import * #requires numpy from numpy import * #requires scikit-learn from sklearn.metrics import pairwise_distances d = {} v = {} fname = argv[1] name = fname.split('.')[-2].split('/')[-1] outdir = argv[2] print "[II] Processing using foote (200)..." estimations = msaf.process(fname)