Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit c024464

Browse files
authored
Merge pull request #2640 from lissyx/train-8k
Add 8kHz training test coverage
2 parents 2d47855 + 581515e commit c024464

File tree

251 files changed

+1585
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+1585
-546
lines changed

bin/run-tc-ldc93s1_new.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ldc93s1_dir="./data/smoke_test"
66
ldc93s1_csv="${ldc93s1_dir}/ldc93s1.csv"
77

88
epoch_count=$1
9+
audio_sample_rate=$2
910

1011
if [ ! -f "${ldc93s1_dir}/ldc93s1.csv" ]; then
1112
echo "Downloading and preprocessing LDC93S1 example data, saving in ${ldc93s1_dir}."
@@ -25,4 +26,5 @@ python -u DeepSpeech.py --noshow_progressbar --noearly_stop \
2526
--max_to_keep 1 --checkpoint_dir '/tmp/ckpt' \
2627
--learning_rate 0.001 --dropout_rate 0.05 --export_dir '/tmp/train' \
2728
--lm_binary_path 'data/smoke_test/vocab.pruned.lm' \
28-
--lm_trie_path 'data/smoke_test/vocab.trie'
29+
--lm_trie_path 'data/smoke_test/vocab.trie' \
30+
--audio_sample_rate ${audio_sample_rate}

bin/run-tc-ldc93s1_tflite.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set -xe
55
ldc93s1_dir="./data/smoke_test"
66
ldc93s1_csv="${ldc93s1_dir}/ldc93s1.csv"
77

8+
audio_sample_rate=$1
9+
810
if [ ! -f "${ldc93s1_dir}/ldc93s1.csv" ]; then
911
echo "Downloading and preprocessing LDC93S1 example data, saving in ${ldc93s1_dir}."
1012
python -u bin/import_ldc93s1.py ${ldc93s1_dir}
@@ -20,6 +22,7 @@ python -u DeepSpeech.py --noshow_progressbar \
2022
--export_dir '/tmp/train_tflite' \
2123
--lm_binary_path 'data/smoke_test/vocab.pruned.lm' \
2224
--lm_trie_path 'data/smoke_test/vocab.trie' \
25+
--audio_sample_rate ${audio_sample_rate} \
2326
--export_tflite
2427

2528
mkdir /tmp/train_tflite/en-us
@@ -30,5 +33,6 @@ python -u DeepSpeech.py --noshow_progressbar \
3033
--export_dir '/tmp/train_tflite/en-us' \
3134
--lm_binary_path 'data/smoke_test/vocab.pruned.lm' \
3235
--lm_trie_path 'data/smoke_test/vocab.trie' \
36+
--audio_sample_rate ${audio_sample_rate} \
3337
--export_language 'Fake English (fk-FK)' \
3438
--export_zip
91.4 KB
Binary file not shown.

taskcluster/.build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ build:
2424
convert_graphdef: ''
2525
benchmark_model_bin: ''
2626
tensorflow_git_desc: 'TensorFlow: v1.14.0-21-ge77504a'
27+
test_model_task: ''

taskcluster/darwin-opt-base.tyml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ payload:
3737
maxRunTime: { $eval: to_int(build.maxRunTime) }
3838

3939
env:
40-
$let:
41-
training: { $eval: as_slugid("test-training_upstream-linux-amd64-py36m-opt") }
42-
in:
43-
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
44-
DEEPSPEECH_TEST_MODEL: https://community-tc.services.mozilla.com/api/queue/v1/task/${training}/artifacts/public/output_graph.pb
40+
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
4541

4642
# There is no VM yet running tasks on OSX
4743
# so one should install by hand:

taskcluster/linux-opt-base.tyml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ then:
3333
image: "ubuntu:14.04"
3434

3535
env:
36-
$let:
37-
training: { $eval: as_slugid("test-training_upstream-linux-amd64-py36m-opt") }
38-
in:
39-
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
40-
DEEPSPEECH_TEST_MODEL: https://community-tc.services.mozilla.com/api/queue/v1/task/${training}/artifacts/public/output_graph.pb
36+
TENSORFLOW_BUILD_ARTIFACT: ${build.tensorflow}
4137

4238
command:
4339
- "/bin/bash"

taskcluster/tc-android-apk-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ api_level=$2
77

88
source $(dirname "$0")/tc-tests-utils.sh
99

10+
# Android test code only supports 16kHz and hard-coded filename
11+
ldc93s1_sample_filename='LDC93S1.wav'
12+
1013
model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite}
1114
model_name=$(basename "${model_source}")
1215

taskcluster/tc-android-ds-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ api_level=$2
77

88
source $(dirname "$0")/tc-tests-utils.sh
99

10+
bitrate=$3
11+
set_ldc_sample_filename "${bitrate}"
12+
1013
model_source=${DEEPSPEECH_TEST_MODEL//.pb/.tflite}
1114
model_name=$(basename "${model_source}")
1215
export DATA_TMP_DIR=${ANDROID_TMP_DIR}/ds

taskcluster/tc-cpp-ds-tests-prod.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -xe
44

55
source $(dirname "$0")/tc-tests-utils.sh
66

7+
bitrate=$1
8+
set_ldc_sample_filename "${bitrate}"
9+
710
model_source=${DEEPSPEECH_PROD_MODEL}
811
model_name=$(basename "${model_source}")
912

@@ -16,4 +19,4 @@ export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH
1619

1720
check_tensorflow_version
1821

19-
run_prod_inference_tests
22+
run_prod_inference_tests "${bitrate}"

taskcluster/tc-cpp-ds-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -xe
44

55
source $(dirname "$0")/tc-tests-utils.sh
66

7+
bitrate=$1
8+
set_ldc_sample_filename "${bitrate}"
9+
710
download_material "${TASKCLUSTER_TMP_DIR}/ds"
811

912
export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH

0 commit comments

Comments
 (0)