source: gs3-installations/mars/trunk/sites/mars/collect/amc-essentia/02-GENERATE-ALL-ESSENTIA-CSV-FEATURE-FILES.sh@ 36966

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

Changed to use the name frame time-slice version

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#!/bin/bash
2
3
4# essentia-extractor-all-mp3-with-profile.sh import `pwd`/essentia.profile
5
6
7# In changing the following line to look for .mp3 and .m4a files, this script is now identical to the DEAM version
8# ** NOTE 1: the 'find import ...' statement is adjusted slightly to be "*.csv" rather than "[0-9]*.csv"
9# ** NOTE 2: the AUDIO-TO-ESSENTIA-CSV-FEATURE-FILE.sh script does, however, use a modified essentia-xxx.profile file
10
11find import \( -name "*.mp3" -o -name "*.m4a" \) -print -exec ./AUDIO-FRAME-TO-ESSENTIA-CSV-FEATURE-FILE.pl 3 6 {} \;
12
13
14if [ -f CSV-CHECK.txt ] ; then
15 echo "**** Not runnign CSV field header check as CSV-CHECK.txt already exits"
16 echo "**** If you want to trigger a check: "
17 echo "**** rm CSV-CHECK.txt"
18 echo "**** Then run again:"
19 echo "**** $0"
20else
21 echo "**** Checking number of fields to CSV files"
22
23
24# for f in import/[0-9]*.csv ; do
25# echo "Checking: $f"
26# wc_output=`head -n 1 $f | tr ',' '\n' | wc`
27# echo "$wc_output $f" >> CSV-CHECK.txt
28# done
29
30 find import -name "*.csv" | xargs -I % \
31 sh -c 'echo Checking: %; \
32 wc_output=`head -n 1 % | tr "," "\n" | wc`; \
33 echo $wc_output % >> CSV-CHECK.txt'
34
35
36fi
37echo
38echo "****"
39echo "* 'wc' count of CSV headers output to: CSV-CHECK.txt"
40echo "* For example:"
41echo "* cat CSV-CHECK.txt | sort | less"
42echo "****"
43echo
Note: See TracBrowser for help on using the repository browser.