update
Browse files
examples/vm_sound_classification/run.sh
CHANGED
@@ -2,13 +2,14 @@
|
|
2 |
|
3 |
: <<'END'
|
4 |
|
5 |
-
sh run.sh --stage
|
6 |
-
--filename_patterns "E:/
|
7 |
-
E:/
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
sh run.sh --stage 0 --stop_stage 1 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification3 \
|
10 |
-
--filename_patterns "E:/programmer/asr_datasets/voicemail/wav_finished/en-US/wav_finished/*/*.wav \
|
11 |
-
E:/programmer/asr_datasets/voicemail/wav_finished/id-ID/wav_finished/*/*.wav" \
|
12 |
|
13 |
sh run.sh --stage 2 --stop_stage 2 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification3
|
14 |
sh run.sh --stage 3 --stop_stage 3 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification3
|
|
|
2 |
|
3 |
: <<'END'
|
4 |
|
5 |
+
sh run.sh --stage 0 --stop_stage 1 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification4-ch16 \
|
6 |
+
--filename_patterns "E:/Users/tianx/HuggingDatasets/vm_sound_classification/data/wav_finished/wav_finished/en-US/wav_finished/*/*.wav \
|
7 |
+
E:/Users/tianx/HuggingDatasets/vm_sound_classification/data/wav_finished/id-ID/wav_finished/*/*.wav" \
|
8 |
+
|
9 |
+
sh run.sh --stage 2 --stop_stage 2 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification4-ch16 \
|
10 |
+
--filename_patterns "E:/Users/tianx/HuggingDatasets/vm_sound_classification/data/wav_finished/wav_finished/en-US/wav_finished/*/*.wav \
|
11 |
+
E:/Users/tianx/HuggingDatasets/vm_sound_classification/data/wav_finished/id-ID/wav_finished/*/*.wav" \
|
12 |
|
|
|
|
|
|
|
13 |
|
14 |
sh run.sh --stage 2 --stop_stage 2 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification3
|
15 |
sh run.sh --stage 3 --stop_stage 3 --system_version windows --file_folder_name file_dir --final_model_name vm_sound_classification3
|
examples/vm_sound_classification/step_3_train_model.py
CHANGED
@@ -83,6 +83,13 @@ class CollateFunction(object):
|
|
83 |
array = sample["waveform"]
|
84 |
label = sample["label"]
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
array_list.append(array)
|
87 |
label_list.append(label)
|
88 |
|
|
|
83 |
array = sample["waveform"]
|
84 |
label = sample["label"]
|
85 |
|
86 |
+
l = len(array)
|
87 |
+
if l < 16000:
|
88 |
+
delta = int(16000 - l)
|
89 |
+
array = np.concatenate([array, np.zeros(shape=(delta,), dtype=np.float32)], axis=-1)
|
90 |
+
if l > 16000:
|
91 |
+
array = array[:16000]
|
92 |
+
|
93 |
array_list.append(array)
|
94 |
label_list.append(label)
|
95 |
|