opus/dnn/download_model.sh
Timothy B. Terriberry 48a7e25032 Abort download_model.sh on errors.
Otherwise, in addition to preventing autogen.sh from failing
 cleanly, the touch command at the end creates a spurious file
 named 'src/nnet_data.[ch]' (because the globbing fails if the
 files do not already exist).
2021-11-10 19:15:58 -05:00

12 lines
226 B
Bash
Executable file

#!/bin/sh
set -e
model=lpcnet_data-$1.tar.gz
if [ ! -f $model ]; then
echo "Downloading latest model"
wget https://media.xiph.org/lpcnet/data/$model
fi
tar xvf $model
touch src/nnet_data.[ch]
mv src/*.[ch] .