From be4f70bc7ed8ecfa89bf8545ae80f84a55b0ed26 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin <jmvalin@amazon.com> Date: Mon, 4 Oct 2021 15:51:06 -0400 Subject: [PATCH] split model downloading away from autogen.sh --- dnn/autogen.sh | 7 +------ dnn/download_model.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 dnn/download_model.sh diff --git a/dnn/autogen.sh b/dnn/autogen.sh index 5ee3cc8ab..0d6da7c3b 100755 --- a/dnn/autogen.sh +++ b/dnn/autogen.sh @@ -7,12 +7,7 @@ test -n "$srcdir" && cd "$srcdir" #SHA1 of the first commit compatible with the current model commit=b7d25ac - -if [ ! -f lpcnet_data-$commit.tar.gz ]; then - echo "Downloading latest model" - wget https://media.xiph.org/lpcnet/data/lpcnet_data-$commit.tar.gz -fi -tar xvf lpcnet_data-$commit.tar.gz +./download_model.sh $commit echo "Updating build configuration files for lpcnet, please wait...." diff --git a/dnn/download_model.sh b/dnn/download_model.sh new file mode 100755 index 000000000..36f513ceb --- /dev/null +++ b/dnn/download_model.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +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 + +mv src/*.[ch] . -- GitLab