Skip to content

Commit ce7422b

Browse files
committed
Added assertion to check speakers map was found
1 parent e5a5b87 commit ce7422b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/fastspeech2_libritts/fastspeech2_dataset.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
f0_load_fn=np.load,
6060
energy_load_fn=np.load,
6161
mel_length_threshold=0,
62-
speakers_map
62+
speakers_map=None
6363
):
6464
"""Initialize dataset.
6565
@@ -98,6 +98,8 @@ def __init__(
9898
== len(energy_files)
9999
), f"Number of charactor, mel, duration, f0 and energy files are different"
100100

101+
assert speakers_map == None, f"No speakers map found. Did you set --dataset_mapping?"
102+
101103
if ".npy" in charactor_query:
102104
suffix = charactor_query[1:]
103105
utt_ids = [os.path.basename(f).replace(suffix, "") for f in charactor_files]

0 commit comments

Comments
 (0)