Loading experiments/characterization/BS1534-20/config_directivity.cfg 0 → 100644 +10 −0 Original line number Diff line number Diff line [directivitySetting] directivityCount = 1; [directivityPattern:0] directivity = [0.0, 180.0, 0.1] [distanceAttenuation] maxDist = 15; refDist = 0.5; rolloffFactor = 1; experiments/characterization/BS1534-20/proc_Exp.bash 0 → 100644 +109 −0 Original line number Diff line number Diff line #!/bin/bash -x PROC=proc OUTDIR=scenes INDIR=input INSF=48 OUTSF=48 PSF=48 INSF_HZ="$INSF"000 OUTSF_HZ="$OUTSF"000 PSF_HZ="$PSF"000 WLEN=$(($OUTSF_HZ/10)) # Input files in concatenation order files=`ls $INDIR/*.wav` # Tools RESAMPAUDIO=ResampAudio COPYAUDIO=CopyAudio INFOAUDIO=InfoAudio ASTRIP=astrip.exe IVAS_COD=./IVAS_cod.exe IVAS_DEC=./IVAS_dec.exe IVAS_REND=./IVAS_rend.exe CUT=bin/cut BSL=bin/bsl TMP="TMP"`date +%s%N` ################### Definition of test conditions ################### #conditions="REF" conditions="REF ANCH3k5 CUT64_3DOF CUT512_3DOF CUT64_6DOF CUT512_6DOF" # Conditions as functions # $1 input signal, 48 kHz wav ISM4 # $2 output signal, 48 kHz wav BINAURAL function REF { # Direct $IVAS_REND -if ISM4 -of BINAURAL -i $1 -im $1.0.csv $1.1.csv $1.2.csv $1.3.csv -T $1.ht.csv -o $2 -render_config config_directivity.cfg } function ANCH3k5 { # 3.5 kHz anchor local CF CF=`echo $PSF_HZ | gawk '{print 3500/$1}'` $RESAMPAUDIO -i 1 -f cutoff=$CF $1 $2 } function ANCH7k { # 7 kHz anchor local CF CF=`echo $PSF_HZ | gawk '{print 7000/$1}'` REF $1 TMP1.wav $RESAMPAUDIO -i 1 -f cutoff=$CF TMP1.wav $2 } function CUT64_6DOF { # CUT64 <input> <output> $IVAS_COD -ism +4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 64000 48 $1 TMP.bs $IVAS_DEC -render_config config_directivity.cfg -T $1.ht.csv BINAURAL 48 TMP.bs $2 } function CUT512_6DOF { # CUT64 <input> <output> $IVAS_COD -ism +4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 512000 48 $1 TMP.bs $IVAS_DEC -render_config config_directivity.cfg -T $1.ht.csv BINAURAL 48 TMP.bs $2 } function CUT64_3DOF { # CUT64 <input> <output> cut -f1-4 -d',' $1.ht.csv > TMP.ht.csv $IVAS_COD -ism 4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 64000 48 $1 TMP.bs $IVAS_DEC -T TMP.ht.csv BINAURAL 48 TMP.bs $2 } function CUT512_3DOF { # CUT64 <input> <output> cut -f1-4 -d',' $1.ht.csv > TMP.ht.csv $IVAS_COD -ism 4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 512000 48 $1 TMP.bs $IVAS_DEC -T TMP.ht.csv BINAURAL 48 TMP.bs $2 } ################### Main processing function ################### # Create output and processing folder mkdir -p $OUTDIR mkdir -p $PROC for f in $files;do BASE=`basename $f .wav` mkdir -p $OUTDIR/$BASE # Duplicate input N_SAMPLES=`$INFOAUDIO $f | grep "No. samples" | cut -f2 -d':' | tr -d '[:space:]'` N_START=$((N_SAMPLES+1)) N_MD=`wc -l $f.0.csv | cut -f1 -d' '` N_HT=`wc -l $f.ht.csv | cut -f1 -d' '` $COPYAUDIO -C $f $f $PROC/$BASE.2.wav for i in 0 1 2 3;do cat $f.$i.csv $f.$i.csv > $PROC/$BASE.2.wav.$i.csv done cat $f.ht.csv $f.ht.csv > $PROC/$BASE.2.wav.ht.csv for cond in $conditions;do # Process condition $cond $PROC/$BASE.2.wav $PROC/$BASE.2.$cond.wav # Cut the output file $COPYAUDIO -F noheader $PROC/$BASE.2.$cond.wav $PROC/$BASE.2.$cond.pcm $ASTRIP -start $N_START -blk 2 -wlen $WLEN $PROC/$BASE.2.$cond.pcm $PROC/$BASE.2.$cond.cut.pcm $COPYAUDIO -F WAVE-NOEX -P integer16,,$OUTSF_HZ,,2 $PROC/$BASE.2.$cond.cut.pcm $OUTDIR/$BASE/"$cond"_"$BASE".wav done done Loading
experiments/characterization/BS1534-20/config_directivity.cfg 0 → 100644 +10 −0 Original line number Diff line number Diff line [directivitySetting] directivityCount = 1; [directivityPattern:0] directivity = [0.0, 180.0, 0.1] [distanceAttenuation] maxDist = 15; refDist = 0.5; rolloffFactor = 1;
experiments/characterization/BS1534-20/proc_Exp.bash 0 → 100644 +109 −0 Original line number Diff line number Diff line #!/bin/bash -x PROC=proc OUTDIR=scenes INDIR=input INSF=48 OUTSF=48 PSF=48 INSF_HZ="$INSF"000 OUTSF_HZ="$OUTSF"000 PSF_HZ="$PSF"000 WLEN=$(($OUTSF_HZ/10)) # Input files in concatenation order files=`ls $INDIR/*.wav` # Tools RESAMPAUDIO=ResampAudio COPYAUDIO=CopyAudio INFOAUDIO=InfoAudio ASTRIP=astrip.exe IVAS_COD=./IVAS_cod.exe IVAS_DEC=./IVAS_dec.exe IVAS_REND=./IVAS_rend.exe CUT=bin/cut BSL=bin/bsl TMP="TMP"`date +%s%N` ################### Definition of test conditions ################### #conditions="REF" conditions="REF ANCH3k5 CUT64_3DOF CUT512_3DOF CUT64_6DOF CUT512_6DOF" # Conditions as functions # $1 input signal, 48 kHz wav ISM4 # $2 output signal, 48 kHz wav BINAURAL function REF { # Direct $IVAS_REND -if ISM4 -of BINAURAL -i $1 -im $1.0.csv $1.1.csv $1.2.csv $1.3.csv -T $1.ht.csv -o $2 -render_config config_directivity.cfg } function ANCH3k5 { # 3.5 kHz anchor local CF CF=`echo $PSF_HZ | gawk '{print 3500/$1}'` $RESAMPAUDIO -i 1 -f cutoff=$CF $1 $2 } function ANCH7k { # 7 kHz anchor local CF CF=`echo $PSF_HZ | gawk '{print 7000/$1}'` REF $1 TMP1.wav $RESAMPAUDIO -i 1 -f cutoff=$CF TMP1.wav $2 } function CUT64_6DOF { # CUT64 <input> <output> $IVAS_COD -ism +4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 64000 48 $1 TMP.bs $IVAS_DEC -render_config config_directivity.cfg -T $1.ht.csv BINAURAL 48 TMP.bs $2 } function CUT512_6DOF { # CUT64 <input> <output> $IVAS_COD -ism +4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 512000 48 $1 TMP.bs $IVAS_DEC -render_config config_directivity.cfg -T $1.ht.csv BINAURAL 48 TMP.bs $2 } function CUT64_3DOF { # CUT64 <input> <output> cut -f1-4 -d',' $1.ht.csv > TMP.ht.csv $IVAS_COD -ism 4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 64000 48 $1 TMP.bs $IVAS_DEC -T TMP.ht.csv BINAURAL 48 TMP.bs $2 } function CUT512_3DOF { # CUT64 <input> <output> cut -f1-4 -d',' $1.ht.csv > TMP.ht.csv $IVAS_COD -ism 4 $1.0.csv $1.1.csv $1.2.csv $1.3.csv 512000 48 $1 TMP.bs $IVAS_DEC -T TMP.ht.csv BINAURAL 48 TMP.bs $2 } ################### Main processing function ################### # Create output and processing folder mkdir -p $OUTDIR mkdir -p $PROC for f in $files;do BASE=`basename $f .wav` mkdir -p $OUTDIR/$BASE # Duplicate input N_SAMPLES=`$INFOAUDIO $f | grep "No. samples" | cut -f2 -d':' | tr -d '[:space:]'` N_START=$((N_SAMPLES+1)) N_MD=`wc -l $f.0.csv | cut -f1 -d' '` N_HT=`wc -l $f.ht.csv | cut -f1 -d' '` $COPYAUDIO -C $f $f $PROC/$BASE.2.wav for i in 0 1 2 3;do cat $f.$i.csv $f.$i.csv > $PROC/$BASE.2.wav.$i.csv done cat $f.ht.csv $f.ht.csv > $PROC/$BASE.2.wav.ht.csv for cond in $conditions;do # Process condition $cond $PROC/$BASE.2.wav $PROC/$BASE.2.$cond.wav # Cut the output file $COPYAUDIO -F noheader $PROC/$BASE.2.$cond.wav $PROC/$BASE.2.$cond.pcm $ASTRIP -start $N_START -blk 2 -wlen $WLEN $PROC/$BASE.2.$cond.pcm $PROC/$BASE.2.$cond.cut.pcm $COPYAUDIO -F WAVE-NOEX -P integer16,,$OUTSF_HZ,,2 $PROC/$BASE.2.$cond.cut.pcm $OUTDIR/$BASE/"$cond"_"$BASE".wav done done