view test/regression.sh @ 137:109c3a2ad930 vamp-fft-revision

Make use of new Vamp FFT interface. This reduces the runtime of the regression test from 5.7 to 2.2 seconds on this machine, but it does need the right version of the SDK, which is currently only available in the vampipe branch.
author Chris Cannam
date Fri, 19 Aug 2016 13:26:40 +0100
parents 2c73618b4067
children
line wrap: on
line source
#!/bin/bash

set -eu

testdir=$(dirname "$0")

if ! sonic-annotator -v >/dev/null ; then
    echo "No sonic-annotator available in PATH, skipping regression test"
    exit 0
fi

echo "Running regression test..."

( time ( VAMP_PATH="$testdir/.." sonic-annotator \
	 -d vamp:pyin:pyin:smoothedpitchtrack \
	 -w csv --csv-stdout --csv-omit-filename \
	 "$testdir/../testdata/bob_02.wav" \
	 > "$testdir/obtained.csv" \
	 2> "$testdir/log.txt" ) ) 2>&1 | \
    grep -i real | \
    sed 's/^real/Elapsed time/'

if ! cmp -s "$testdir/expected.csv" "$testdir/obtained.csv" ; then
    echo "*** FAILED, diff follows:"
    sdiff -w78 "$testdir/expected.csv" "$testdir/obtained.csv"
else
    echo "Succeeded"
fi