#!/bin/sh
./stophark.sh
usleep 100000
DATE_SUFFIX=`date +%F-%H%M%S`
echo "sox -t raw -r 16k -e signed -b 24 -c 8 $DATE_SUFFIX.raw $DATE_SUFFIX.wav" > /tmp/convert_$DATE_SUFFIX.sh
cat /hark/hark-ody_recording_template_new.conf | sed -E "s/<FILE>/$DATE_SUFFIX/g" > /hark/hark-ody_recording.conf
./vsserver -d /dev/obd -f /tmp/$DATE_SUFFIX.can &
/hark/hark_flac --config /hark/hark-ody_recording.conf

