-
Notifications
You must be signed in to change notification settings - Fork 39
/
decode_aho.sh
executable file
·44 lines (36 loc) · 1.31 KB
/
decode_aho.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash -
#===============================================================================
#
# FILE: decode_aho.sh
#
# USAGE: ./decode_aho.sh params_dir basename
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: YOUR NAME (),
# ORGANIZATION:
# CREATED: 09/11/16 18:14
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
# Run predictions
python decode_prediction.py
#PARAMS_DIR="$1"
PARAMS_DIR='data/test/predicted/SF1-TF1'
while read BASENAME <&3; do
#BASENAME="$2"
# Convert parameters to float data
echo 'Convert parameters to float data'
x2x +af ${PARAMS_DIR}/${BASENAME}.vf.dat > ${PARAMS_DIR}/${BASENAME}.vf
x2x +af ${PARAMS_DIR}/${BASENAME}.lf0.dat > ${PARAMS_DIR}/${BASENAME}.lf0
cat ${PARAMS_DIR}/${BASENAME}.mcp.dat | do_columns.pl -c 1 | x2x +af > ${PARAMS_DIR}/${BASENAME}.mcp
mkdir -p ${PARAMS_DIR}/wav
# Decode parameters
echo 'Decode parameters'
ahodecoder16_64 ${PARAMS_DIR}/${BASENAME}.lf0 ${PARAMS_DIR}/${BASENAME}.mcp ${PARAMS_DIR}/${BASENAME}.vf ${PARAMS_DIR}/wav/${BASENAME}.wav
echo "Finished ${BASENAME}"
done 3< 'data/test/basenames.list'