Blame view
egs/apiai_decode/s5/download-model.sh
809 Bytes
8dcb6dfcb first commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#!/bin/bash # Downlaods Api.ai chain model into exp/api.ai-model/ (will replace one if exists) DOWNLOAD_URL="https://github.com/api-ai/api-ai-english-asr-model/releases/download/1.0/api.ai-kaldi-asr-model.zip" echo "Downloading model" wget -N $DOWNLOAD_URL || ( echo "Unable to download model: $DOWNLOAD_URL" && exit 1 ); echo "Unpacking model" unzip api.ai-kaldi-asr-model.zip || ( echo "Unable to extract api.ai-kaldi-asr-model.zip" && exit 1 ); echo "Moving model to exp/api.ai-model/" if [ ! -d exp ]; then mkdir exp; fi; if [ -d exp/api.ai-model ]; then echo "Found existing model, removing"; rm -rf exp/api.ai-model/ fi mv api.ai-kaldi-asr-model exp/api.ai-model || ( echo "Unable to move model to exp/" && exit 1 ) echo "Model is ready to use use recognize-wav.sh to do voice recognition" |