Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESPnet-Spk part 3 - inference every epoch using EER #5314

Merged
merged 41 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e884009
add epoch wise inference using EER
Jungjee Jul 20, 2023
363b844
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 20, 2023
f8dc909
Merge branch 'master' into speaker2
Jungjee Jul 20, 2023
e5c4a6c
make dummy test trial for ci
Jungjee Jul 20, 2023
c1b9937
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 20, 2023
91a777f
make test_python work
Jungjee Jul 20, 2023
6316eed
Merge branch 'speaker2' of https://github.com/Jungjee/espnet into spe…
Jungjee Jul 20, 2023
d4238e4
Merge branch 'master' into speaker2
sw005320 Jul 20, 2023
447eb83
make test_integration2 work
Jungjee Jul 20, 2023
1833acb
Merge branch 'speaker2' of https://github.com/Jungjee/espnet into spe…
Jungjee Jul 20, 2023
04bb321
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 20, 2023
f0bacaa
Merge branch 'master' into speaker2
Jungjee Jul 21, 2023
e91c0e3
Add data augmentation for speaker taks
Emrys365 Jul 21, 2023
5586713
Merge branch 'speaker2' of github.com:Jungjee/espnet into speaker2
Emrys365 Jul 21, 2023
3708b6f
revoke undoed patch
Jungjee Jul 21, 2023
9cbf911
revoke undoed commit, make no da work
Jungjee Jul 21, 2023
0767537
undo revoked edits
Jungjee Jul 21, 2023
640f02d
Support mixing with variable number of noises
Emrys365 Jul 21, 2023
0cf57da
Merge branch 'speaker2' of https://github.com/Jungjee/espnet into spe…
Jungjee Jul 21, 2023
deebddf
fix minor bug in da
Jungjee Jul 21, 2023
323aceb
add arg
Jungjee Jul 21, 2023
a714aa4
add making scp files for DA
Jungjee Jul 21, 2023
1751ecd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 21, 2023
779cf76
reflects comments
Jungjee Jul 21, 2023
5672580
make symlink conf
Jungjee Jul 21, 2023
c51c773
add comment for speech2
Jungjee Jul 21, 2023
920b51c
Merge branch 'master' into speaker2
Jungjee Jul 21, 2023
dd51257
Add unit tests
Emrys365 Jul 21, 2023
b1088c1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 21, 2023
37f4ab4
Fix a bug in SPK preprocessor
Emrys365 Jul 21, 2023
19a09e0
Merge branch 'master' into speaker2
Jungjee Jul 21, 2023
ba66a76
fix minor bug, make ci model smaller
Jungjee Jul 22, 2023
9470be5
Update espnet2/spk/loss/aamsoftmax.py
Jungjee Jul 22, 2023
19d5d81
Update espnet2/train/spk_trainer.py
Jungjee Jul 22, 2023
267bfb4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2023
e5297a1
reflect @Emrys365 comments
Jungjee Jul 22, 2023
caa2a73
Merge branch 'master' into speaker2
Jungjee Jul 22, 2023
12fea27
reflect local changes
Jungjee Jul 22, 2023
9790e6d
Merge branch 'speaker2' of https://github.com/Jungjee/espnet into spe…
Jungjee Jul 22, 2023
9aaad7c
Merge branch 'master' into speaker2
Jungjee Jul 22, 2023
249bf6e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/test_integration_espnet2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ cd "${cwd}"
cd ./egs2/mini_an4/spk1
gen_dummy_coverage
echo "==== [ESPnet2] SPK ==="
./run.sh --ngpu 0 --stage 0 --stop-stage 4 --feats-type "raw" --spk_args "--max_epoch=1" --python "${python}"
./run.sh --ngpu 0 --stage 0 --stop-stage 4 --feats-type "raw_copy" --spk_args "--max_epoch=1" --python "${python}"
# Remove generated files in order to reduce the disk usage
rm -rf exp dump data
cd "${cwd}"
Expand Down
7 changes: 6 additions & 1 deletion egs2/mini_an4/spk1/local/data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ ${stage} -le 2 ] && [ ${stop_stage} -ge 2 ]; then
done

# make a dev set
utils/subset_data_dir.sh --first data/train 1 data/${train_dev}
utils/subset_data_dir.sh --first data/train 2 data/${train_dev}
n=$(($(wc -l < data/train/text) - 1))
utils/subset_data_dir.sh --last data/train ${n} data/${train_set}

Expand All @@ -78,6 +78,11 @@ EOF
awk '{print $1 " 1ch_16k"}' data/${x}/wav.scp > data/${x}/utt2category
done

# for spk task validation
for x in test test_seg ${train_set} ${train_dev}; do
python local/make_trial.py data/${x}/wav.scp data/${x}
done

find downloads/noise/ -iname "*.wav" | awk '{print "noise" NR " " $1}' > data/${train_set}/noises.scp
find downloads/rirs/ -iname "*.wav" | awk '{print "rir" NR " " $1}' > data/${train_set}/rirs.scp
fi
Expand Down
14 changes: 14 additions & 0 deletions egs2/mini_an4/spk1/local/make_trial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import sys, os

if __name__ == "__main__":
with open(sys.argv[1]) as f:
lines = f.readlines()

joint_key = lines[0].strip().split(" ")[0] + "*" + lines[1].strip().split(" ")[0]
with open(os.path.join(sys.argv[2], "trial.scp"), "w") as f:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to rename trial.scp to trial1.scp to make them more consistent.

f.write(joint_key+ " " + " ".join(lines[0].strip().split(" ")[1:]))
with open(os.path.join(sys.argv[2], "trial2.scp"), "w") as f:
f.write(joint_key+ " " + " ".join(lines[1].strip().split(" ")[1:]))
with open(os.path.join(sys.argv[2], "trial_label"), "w") as f:
f.write(joint_key + " 0")
Jungjee marked this conversation as resolved.
Show resolved Hide resolved