From fe85cfeb43094e0ec1f1599fbe48fef763b365a0 Mon Sep 17 00:00:00 2001 From: alkazap <58758264+alkazap@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:11:45 +0900 Subject: [PATCH] Fixed bug causing "Unknown speaker!" Judging by assertion (line 115) and speaker access (line 117) statements, I think on line 111 the intention was to create a dictionary from the list of speakers {speaker.id: speaker for speaker in speakers}, but instead a set of tuples {(speaker.id, speaker) for speaker in speakers} was created, causing assert speaker in speakers to fail. I fixed it accordingly. --- data/ami/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/ami/utils.py b/data/ami/utils.py index cb671070..2ff5fac9 100644 --- a/data/ami/utils.py +++ b/data/ami/utils.py @@ -108,7 +108,7 @@ def get_fid2length(train_file): def full_records(speakers, fid2length, subset_name=None): all_records = [] - speakers = {(speaker.id, speaker) for speaker in speakers} + speakers = {speaker.id: speaker for speaker in speakers} for fid, length in fid2length: speaker = fid.split("_")[2]