File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash -x
2+ # test_2020x.sh
3+ # David Rowe Feb 2022
4+ #
5+ # Script to support testing experimental 2020A and 2020B modes and 700E control.
6+
7+ CODEC2_PATH=$HOME /codec2
8+ PATH=$PATH :$CODEC2_PATH /build_linux/src:$CODEC2_PATH /build_linux/misc
9+ FADING_DIR=$CODEC2_PATH /build_linux/unittest
10+ No_AWGN=-20
11+ No_Multipath=-25
12+
13+ function run_sim() {
14+ fullfile=$1
15+ filename=$( basename -- " $fullfile " )
16+ extension=" ${filename##* .} "
17+ filename=" ${filename% .* } "
18+ mode=$2
19+ if [ " $mode " == " 700E" ] || [ " $mode " == " 700D" ]; then
20+ rateHz=8000
21+ else
22+ rateHz=16000
23+ fi
24+ clip=$3
25+ if [ " $clip " == " clip" ]; then
26+ clipflag=1
27+ else
28+ clipflag=0
29+ fi
30+ channel=$4
31+ if [ " $channel " == " awgn" ]; then
32+ channel_opt=" "
33+ No=$No_AWGN
34+ else
35+ channel_opt=' --' ${channel}
36+ No=$No_Multipath
37+ fi
38+
39+ freedv_tx ${mode} ${fullfile} - --clip ${clipflag} | \
40+ ch - - --No $No ${channel_opt} --fading_dir ${FADING_DIR} | \
41+ freedv_rx ${mode} - - | \
42+ sox -t .s16 -r ${rateHz} -c 1 - ${filename} _${mode} _${clip} _${channel} .wav
43+ }
44+
45+ run_sim ~ /LPCNet/wav/peter.wav 2020 noclip awgn
46+ run_sim ~ /codec2/wav/big_dog.wav 700E clip mpp
You can’t perform that action at this time.
0 commit comments