source: main/trunk/model-sites-dev/mars/collect/amc-essentia/AUDIO-TO-ESSENTIA-CSV-FEATURE-FILE.sh--DEPRECATED@ 34771

Last change on this file since 34771 was 34771, checked in by davidb, 3 years ago

deprecated for this collection -- superceeded by AUDIO-FRAME-TO-ESSENTIA-CSV-FEATURE-FILE.pl

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/bash
2
3# ****
4# The only change to this file (from the DEAM version)
5# is to add on '_essentiafeatures' to the root filename used
6
7audio_file=$1
8json_file=${audio_file%.*}_essentiafeatures.json
9csv_file=${audio_file%.*}_essentiafeatures.csv
10
11profile_file=`pwd`/essentia-2013-2014.profile
12
13# knock out any arrays in the JSON extracted features file
14ignore_fields="\
15 lowlevel.barkbands.* \
16 lowlevel.erbbands.* \
17 lowlevel.gfcc.* \
18 lowlevel.melbands.* \
19 lowlevel.melbands128.* \
20 lowlevel.mfcc.* \
21\
22 lowlevel.spectral_contrast_coeffs.* \
23 lowlevel.spectral_contrast_valleys.* \
24\
25 metadata.* \
26\
27 rhythm.beats_loudness_band_ratio.* \
28 rhythm.beats_position.* \
29 rhythm.bpm_histogram.* \
30\
31 tonal.hpcp.* \
32 tonal.chords_histogram.* \
33 tonal.thpcp.*"
34
35if [ ! -f $json_file ] ; then
36
37 echo "******"
38 echo "* Running Essentia music extractor"
39 echo "* on input file: $audio_file"
40 echo "* with profile: $profile_file"
41 echo "* generating output: $json_file"
42 echo "****"
43 essentia_streaming_extractor_music $audio_file $json_file $profile_file
44
45 echo "*"
46 echo "******"
47
48else
49 echo "* Skipping extraction of JSON features as $json_file already exists"
50fi
51
52if [ ! -f $csv_file ] ; then
53
54 echo "******"
55 echo "* Running Essentia JSON to CSV convertor on $json_file"
56
57 json_to_csv.py -i $json_file -o $csv_file --add-filename --ignore $ignore_fields
58 echo "******"
59else
60 echo "* Skipping JSON to CSV conversion as $csv_file already exists"
61fi
62
63
64
Note: See TracBrowser for help on using the repository browser.