annotate audio_onset_detection/onsetsds/onsetsds.sh @ 86:01f69f1d5d3c tip

Add further archive versions
author Chris Cannam
date Thu, 01 Aug 2019 17:54:05 +0100
parents 51f28d65d7f6
children
rev   line source
Chris@39 1 #!/bin/bash
Chris@39 2 # runs sonic annotator using the specified transform file (-t)
Chris@39 3 # input file: $1
Chris@39 4 # output file: $2
Chris@39 5
Chris@39 6 mydir=`dirname "$0"`
Chris@39 7 infile="$1"
Chris@39 8 outfile="$2"
Chris@39 9
Chris@39 10 if [ t"$infile" = "t" ] || [ t"$outfile" = "t" ]; then
Chris@39 11 echo "Usage: $0 infile.wav outfile.txt"
Chris@39 12 exit 2
Chris@39 13 fi
Chris@39 14
Chris@39 15 echo "Processing input WAV file $infile, writing results to $outfile..." 1>&2
Chris@39 16
Chris@39 17 VAMP_PATH="$mydir" sonic-annotator \
Chris@39 18 -t "$mydir"/onsetsds.ttl \
Chris@39 19 -w csv --csv-stdout --csv-separator ';' \
Chris@39 20 "$infile" \
Chris@39 21 | cut -d';' -f2 \
Chris@39 22 > "$outfile"
Chris@39 23