Snap
Browse files- clustering_files.py +3 -5
clustering_files.py
CHANGED
|
@@ -48,7 +48,7 @@ class ClusteringFiles(datasets.GeneratorBasedBuilder):
|
|
| 48 |
features = datasets.Features(
|
| 49 |
{
|
| 50 |
"filename": datasets.Value("string"),
|
| 51 |
-
"segments":
|
| 52 |
{
|
| 53 |
"segment_id": datasets.Value("int32"),
|
| 54 |
"speaker": datasets.Value("string"),
|
|
@@ -60,7 +60,7 @@ class ClusteringFiles(datasets.GeneratorBasedBuilder):
|
|
| 60 |
"readable_end": datasets.Value("string"),
|
| 61 |
"vp": datasets.Sequence(datasets.Value("float32")),
|
| 62 |
}
|
| 63 |
-
|
| 64 |
})
|
| 65 |
return datasets.DatasetInfo(
|
| 66 |
description=description,
|
|
@@ -104,6 +104,4 @@ class ClusteringFiles(datasets.GeneratorBasedBuilder):
|
|
| 104 |
})
|
| 105 |
|
| 106 |
for idx, file_data in enumerate(files.values()):
|
| 107 |
-
|
| 108 |
-
segment["vp"] = segment["vp"].tolist()
|
| 109 |
-
yield idx, file_data
|
|
|
|
| 48 |
features = datasets.Features(
|
| 49 |
{
|
| 50 |
"filename": datasets.Value("string"),
|
| 51 |
+
"segments": [
|
| 52 |
{
|
| 53 |
"segment_id": datasets.Value("int32"),
|
| 54 |
"speaker": datasets.Value("string"),
|
|
|
|
| 60 |
"readable_end": datasets.Value("string"),
|
| 61 |
"vp": datasets.Sequence(datasets.Value("float32")),
|
| 62 |
}
|
| 63 |
+
]
|
| 64 |
})
|
| 65 |
return datasets.DatasetInfo(
|
| 66 |
description=description,
|
|
|
|
| 104 |
})
|
| 105 |
|
| 106 |
for idx, file_data in enumerate(files.values()):
|
| 107 |
+
yield idx, file_data
|
|
|
|
|
|