• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3
4case $# in
5    3) FEATURES=$1; FOLDER=$2; PYTHON=$3;;
6    *) echo "run_inference_test.sh <features file> <output folder> <python path>"; exit;;
7esac
8
9
10SCRIPTFOLDER=$(dirname "$0")
11
12mkdir -p $FOLDER/inference_test
13
14# update checkpoints
15for fn in $(find $FOLDER -type f -name "checkpoint*.pth")
16do
17    tmp=$(basename $fn)
18    tmp=${tmp%.pth}
19    epoch=${tmp#checkpoint_epoch_}
20    echo "running inference with checkpoint $fn..."
21    $PYTHON $SCRIPTFOLDER/../test_lpcnet.py $FEATURES $fn $FOLDER/inference_test/output_epoch_${epoch}.wav
22done
23