first pass at synth script to put everything back together

master
David 2019-12-08 12:55:17 +10:30
parent 03722ac424
commit 62c5474cf6
1 changed files with 17 additions and 0 deletions

17
synth.sh 100755
View File

@ -0,0 +1,17 @@
#!/bin/bash -x
# David Dec 2019
#
# Putting everything back together to synthesise speech
PATH=$PATH:~/codec2/build_linux/src:~/codec2/build_linux/misc
if [ "$#" -ne 1 ]; then
echo "usage: ./synth.sh rawFile"
fi
speech=$1
x=$(basename $speech)
base="${x%.*}"
out_model=out.model
sox -t .sw -r 8000 -c 1 $speech -t .sw - trim 0 3 | c2sim - --modelout - | est_n0 -a $out_model > $base'_comb.model'
sox -t .sw -r 8000 -c 1 $speech -t .sw - trim 0 3 | c2sim - --modelin $base'_comb.model' -o $base'_out.raw'