Update libriheavy.py
Browse files- libriheavy.py +2 -19
libriheavy.py
CHANGED
@@ -72,7 +72,7 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
|
|
72 |
}
|
73 |
),
|
74 |
"mel_spectrogram": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
75 |
-
"attributes": datasets.
|
76 |
{
|
77 |
"pitch": datasets.Sequence(datasets.Value("float32")),
|
78 |
"energy": datasets.Sequence(datasets.Value("float32")),
|
@@ -80,7 +80,7 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
|
|
80 |
"srmr": datasets.Sequence(datasets.Value("float32")),
|
81 |
}
|
82 |
),
|
83 |
-
"overall_attributes": datasets.
|
84 |
{
|
85 |
"pitch": datasets.Value("float32"),
|
86 |
"energy": datasets.Value("float32"),
|
@@ -171,23 +171,6 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
|
|
171 |
if utterance_id == sorted(list(text.keys()))[-1]:
|
172 |
continue
|
173 |
npz_item = npz[str(utterance_id)].item()
|
174 |
-
print(
|
175 |
-
npz_item["d_vector"][0].shape,
|
176 |
-
{
|
177 |
-
"attributes": {
|
178 |
-
"pitch": npz_item["pitch"][0],
|
179 |
-
"energy": npz_item["energy"][0],
|
180 |
-
"snr": npz_item["snr"][0],
|
181 |
-
"srmr": npz_item["srmr"][0],
|
182 |
-
},
|
183 |
-
"overall_attributes": {
|
184 |
-
"pitch": npz_item["overall_pitch"],
|
185 |
-
"energy": npz_item["overall_energy"],
|
186 |
-
"snr": npz_item["overall_snr"],
|
187 |
-
"srmr": npz_item["overall_srmr"],
|
188 |
-
},
|
189 |
-
}
|
190 |
-
)
|
191 |
result = {
|
192 |
"id": chunk["speaker_id"] + "_" + utterance_id,
|
193 |
"speaker_id": chunk["speaker_id"],
|
|
|
72 |
}
|
73 |
),
|
74 |
"mel_spectrogram": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
75 |
+
"attributes": datasets.Features(
|
76 |
{
|
77 |
"pitch": datasets.Sequence(datasets.Value("float32")),
|
78 |
"energy": datasets.Sequence(datasets.Value("float32")),
|
|
|
80 |
"srmr": datasets.Sequence(datasets.Value("float32")),
|
81 |
}
|
82 |
),
|
83 |
+
"overall_attributes": datasets.Features(
|
84 |
{
|
85 |
"pitch": datasets.Value("float32"),
|
86 |
"energy": datasets.Value("float32"),
|
|
|
171 |
if utterance_id == sorted(list(text.keys()))[-1]:
|
172 |
continue
|
173 |
npz_item = npz[str(utterance_id)].item()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
result = {
|
175 |
"id": chunk["speaker_id"] + "_" + utterance_id,
|
176 |
"speaker_id": chunk["speaker_id"],
|