Skip to content

Commit

Permalink
fix previous errors in s2st.sh in commit 0f5cb96
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-sensei committed Apr 16, 2024
1 parent faf0426 commit 3b29374
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions egs2/TEMPLATE/s2st1/s2st.sh
Original file line number Diff line number Diff line change
Expand Up @@ -485,10 +485,6 @@ if ! "${skip_data_prep}"; then
fi
utils/copy_data_dir.sh --validate_opts --non-print data/"${dset}" "${data_feats}${_suf}/${dset}"

# Even if use_tgt_lang is false for training, it is required for test set evaluation
if [ ${use_tgt_lang} = false ] && [ "${dset}" != "${train_set}" ] && [ "${dset}" != "${train_set}" ]; then
expand_utt_extra_files="${expand_utt_extra_files} text.${tgt_lang}"
fi

# expand the utt_extra_files for multi-references
expand_utt_extra_files=""
Expand All @@ -500,6 +496,11 @@ if ! "${skip_data_prep}"; then
done
done

# Even if use_tgt_lang is false for training, it is required for test set evaluation
if [ ${use_tgt_lang} = false ] && [ "${dset}" != "${train_set}" ] && [ "${dset}" != "${train_set}" ]; then
expand_utt_extra_files="${expand_utt_extra_files} text.${tgt_lang}"
fi

echo "${expand_utt_extra_files}"
utils/fix_data_dir.sh --utt_extra_files "${expand_utt_extra_files}" "${data_feats}${_suf}/${dset}"
for extra_file in ${expand_utt_extra_files}; do
Expand Down Expand Up @@ -726,6 +727,7 @@ if ! "${skip_data_prep}"; then
exit 2
fi

# TODO(Lai Jiang): remove from the filtered wav files instead of original
# # Remove empty text
# for utt_extra_file in ${utt_extra_files}; do
# <${data_feats}/org/${dset}/${utt_extra_file} \
Expand Down

0 comments on commit 3b29374

Please sign in to comment.