add phones
Browse files- libriheavy.py +10 -0
libriheavy.py
CHANGED
@@ -63,6 +63,13 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
|
|
63 |
"word": datasets.Value("string"),
|
64 |
}
|
65 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
"mel_spectrogram": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
67 |
}
|
68 |
),
|
@@ -154,6 +161,9 @@ class Libriheavy(datasets.GeneratorBasedBuilder):
|
|
154 |
"word_segments": [
|
155 |
{"start": segment[0], "end": segment[1], "word": segment[2]} for segment in utterance["word_segments"]
|
156 |
],
|
|
|
|
|
|
|
157 |
"mel_spectrogram": npz[str(utterance_id)].item()["mel"][0][0],
|
158 |
}
|
159 |
yield chunk["speaker_id"] + "_" + utterance_id, result
|
|
|
63 |
"word": datasets.Value("string"),
|
64 |
}
|
65 |
),
|
66 |
+
"phone_segments": datasets.Sequence(
|
67 |
+
{
|
68 |
+
"start": datasets.Value("int32"),
|
69 |
+
"end": datasets.Value("int32"),
|
70 |
+
"phone": datasets.Value("string"),
|
71 |
+
}
|
72 |
+
),
|
73 |
"mel_spectrogram": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
74 |
}
|
75 |
),
|
|
|
161 |
"word_segments": [
|
162 |
{"start": segment[0], "end": segment[1], "word": segment[2]} for segment in utterance["word_segments"]
|
163 |
],
|
164 |
+
"phone_segments": [
|
165 |
+
{"start": segment[0], "end": segment[1], "word": segment[2]} for segment in utterance["phone_segments"]
|
166 |
+
],
|
167 |
"mel_spectrogram": npz[str(utterance_id)].item()["mel"][0][0],
|
168 |
}
|
169 |
yield chunk["speaker_id"] + "_" + utterance_id, result
|