forked from coqui-ai/STT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun-librivox.sh
executable file
·40 lines (36 loc) · 1.48 KB
/
run-librivox.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
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
set -xe
if [ ! -f DeepSpeech.py ]; then
echo "Please make sure you run this from DeepSpeech's top level directory."
exit 1
fi;
if [ ! -d "${COMPUTE_DATA_DIR}" ]; then
COMPUTE_DATA_DIR="data"
fi;
# Warn if we can't find the train files
if [ ! -f "${COMPUTE_DATA_DIR}/librivox-train-clean-100.csv" ]; then
echo "Warning: It looks like you don't have the LibriSpeech corpus" \
"downloaded and preprocessed. Make sure \$COMPUTE_DATA_DIR points to the" \
"folder where the LibriSpeech data is located, and that you ran the" \
"importer script at bin/import_librivox.py before running this script."
fi;
if [ -d "${COMPUTE_KEEP_DIR}" ]; then
checkpoint_dir=$COMPUTE_KEEP_DIR
else
checkpoint_dir=$(python -c 'from xdg import BaseDirectory as xdg; print(xdg.save_data_path("deepspeech/librivox"))')
fi
python -u DeepSpeech.py \
--train_files "$COMPUTE_DATA_DIR/librivox-train-clean-100.csv,$COMPUTE_DATA_DIR/librivox-train-clean-360.csv,$COMPUTE_DATA_DIR/librivox-train-other-500.csv" \
--dev_files "$COMPUTE_DATA_DIR/librivox-dev-clean.csv,$COMPUTE_DATA_DIR/librivox-dev-other.csv" \
--test_files "$COMPUTE_DATA_DIR/librivox-test-clean.csv,$COMPUTE_DATA_DIR/librivox-test-other.csv" \
--train_batch_size 12 \
--dev_batch_size 12 \
--test_batch_size 12 \
--learning_rate 0.0001 \
--epoch 15 \
--display_step 5 \
--validation_step 5 \
--dropout_rate 0.30 \
--default_stddev 0.046875 \
--checkpoint_dir "$checkpoint_dir" \
"$@"