forked from Picovoice/porcupine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
copy_test_resources.sh
executable file
·30 lines (22 loc) · 1012 Bytes
/
copy_test_resources.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
LIB_DIR="../../lib"
RESOURCE_DIR="../../resources"
ASSETS_DIR="./assets/test_resources"
echo "Creating test resources asset directory"
mkdir -p ${ASSETS_DIR}
echo "Copying test audio samples..."
mkdir -p ${ASSETS_DIR}/audio_samples
cp ${RESOURCE_DIR}/audio_samples/*.wav ${ASSETS_DIR}/audio_samples
echo "Copying test keyword files..."
mkdir -p ${ASSETS_DIR}/keyword_files
cp ${RESOURCE_DIR}/keyword_files/android/*.ppn ${ASSETS_DIR}/keyword_files/
cp ${RESOURCE_DIR}/keyword_files/ios/*.ppn ${ASSETS_DIR}/keyword_files/
for d in ${RESOURCE_DIR}/keyword_files_*; do
LANGUAGE=$(echo "${d}" | cut -d'_' -f3)
cp ${RESOURCE_DIR}/keyword_files_${LANGUAGE}/android/*.ppn ${ASSETS_DIR}/keyword_files/
cp ${RESOURCE_DIR}/keyword_files_${LANGUAGE}/ios/*.ppn ${ASSETS_DIR}/keyword_files/
done
echo "Copying test model files..."
mkdir -p ${ASSETS_DIR}/model_files
cp ${LIB_DIR}/common/*.pv ${ASSETS_DIR}/model_files
echo "Copying test data file..."
cp ${RESOURCE_DIR}/.test/test_data.json ${ASSETS_DIR}