#!/bin/bash if ! [ -f "${1}" ] then echo "File ${1} not found" exit 1 fi # Base name NAME=$( basename "${1}" .sln ) if ! [ -f "${NAME}.sln" ] then echo "File ${NAME}.sln not found" exit 1 fi echo "Converting ${NAME}.sln" sox -t raw -r 8000 -e signed-integer -b 16 -c 1 "${NAME}.sln" "${NAME}.wav"