Mercurial > hg > chourdakisreiss2016
view experiment-reverb/code/segmentation3.py @ 0:246d5546657c
initial commit, needs cleanup
author | Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk> |
---|---|
date | Wed, 14 Dec 2016 13:15:48 +0000 |
parents | |
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)