-
Notifications
You must be signed in to change notification settings - Fork 0
/
acoustics.sh
executable file
·28 lines (25 loc) · 983 Bytes
/
acoustics.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e
# Call example:
# ./acoustics.sh data/iriss_processed/TextGrid_final/ /storage/rsdo/korpus/MEZZANINE/iriss/ data/iriss_processed/csv
# Assign paths
textgrid_dir=$1 #./data/gos_processed/Artur-J/TextGrid_final
wav_dir=$2 #/storage/rsdo/korpus/GOS2.0/Artur-WAV
csv_dir=$3 #./data/gos_processed/Artur-J/csv
level=$4 # {phones, cnvrstl-syllables}
counter=0
for textgrid_file in $textgrid_dir/*.TextGrid; do
counter=$((counter + 1))
if [ $counter -ge 1 ]; then
base_name=$(basename $textgrid_file)
wav_file=$wav_dir/${base_name/.TextGrid/.wav}
csv_file=$csv_dir/${base_name/.TextGrid/.$level.csv}
echo -e "\nFiles ($counter):"
echo wav_file=\"$wav_file\"
echo textgrid_file=\"$textgrid_file\"
echo csv_file=\"$csv_file\"
echo -e "Performing acoustic measurements ..."
python acoustic_measurements.py $textgrid_file $wav_file $csv_file $level
#break
fi
done