Created
April 4, 2019 13:48
-
-
Save acetylSv/b31fe9a34ff3ce1a1ccea93aefded214 to your computer and use it in GitHub Desktop.
silence segmentation using auditok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for var in $@ | |
do | |
# for auditok to process a file | |
# -e : energy threshlod | |
# -d : discard silence period | |
# -s : min-length of a continuos silence | |
# -n : min-length of a segment | |
# -m : max-length of a segment | |
# -M : only process the first M seconds of the file | |
echo "processing file : $var" | |
mkdir ${var/.wav} | |
auditok -i $var -o "${var/.wav}"_seg_{N}.wav -d -e 50 -n 1 -m 15 | |
for num in $(seq 1 500) | |
do | |
file="${var/.wav}"_seg_"${num}".wav | |
if [ -f "$file" ] | |
then | |
mv "$file" ${var/.wav} | |
fi | |
done | |
done | |
echo "Process done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment