Snap
Browse files- vps_clustering_benchmark.py +10 -6
vps_clustering_benchmark.py
CHANGED
@@ -1,10 +1,6 @@
|
|
1 |
-
import os
|
2 |
-
import json
|
3 |
import datasets
|
4 |
import pandas as pd
|
5 |
import numpy as np
|
6 |
-
from typing import List
|
7 |
-
from tqdm import tqdm
|
8 |
|
9 |
logger = datasets.logging.get_logger(__name__)
|
10 |
|
@@ -48,6 +44,7 @@ class VPClusteringBenchmark(datasets.GeneratorBasedBuilder):
|
|
48 |
version=VERSION,
|
49 |
description="Conversy Benchmark for ML models evaluation",
|
50 |
features=["segment_id", "filename", "speaker", "duration", "vp",
|
|
|
51 |
"segment_clean"],
|
52 |
data_url=_HF_REPO_PATH,
|
53 |
nb_data_shards=1)
|
@@ -64,6 +61,10 @@ class VPClusteringBenchmark(datasets.GeneratorBasedBuilder):
|
|
64 |
"speaker": datasets.Value("string"),
|
65 |
"duration": datasets.Value("float32"),
|
66 |
"segment_clean": datasets.Value("bool"),
|
|
|
|
|
|
|
|
|
67 |
"vp": datasets.Sequence(datasets.Value("float32"))
|
68 |
})
|
69 |
return datasets.DatasetInfo(
|
@@ -95,6 +96,9 @@ class VPClusteringBenchmark(datasets.GeneratorBasedBuilder):
|
|
95 |
"speaker": row["speaker"],
|
96 |
"duration": row["duration"],
|
97 |
"segment_clean": row["segment_clean"],
|
98 |
-
"
|
99 |
-
"
|
|
|
|
|
|
|
100 |
}
|
|
|
|
|
|
|
1 |
import datasets
|
2 |
import pandas as pd
|
3 |
import numpy as np
|
|
|
|
|
4 |
|
5 |
logger = datasets.logging.get_logger(__name__)
|
6 |
|
|
|
44 |
version=VERSION,
|
45 |
description="Conversy Benchmark for ML models evaluation",
|
46 |
features=["segment_id", "filename", "speaker", "duration", "vp",
|
47 |
+
"start", "end", "readable_start", "readable_end",
|
48 |
"segment_clean"],
|
49 |
data_url=_HF_REPO_PATH,
|
50 |
nb_data_shards=1)
|
|
|
61 |
"speaker": datasets.Value("string"),
|
62 |
"duration": datasets.Value("float32"),
|
63 |
"segment_clean": datasets.Value("bool"),
|
64 |
+
"start": datasets.Value("float32"),
|
65 |
+
"end": datasets.Value("float32"),
|
66 |
+
"readable_start": datasets.Value("string"),
|
67 |
+
"readable_end": datasets.Value("string"),
|
68 |
"vp": datasets.Sequence(datasets.Value("float32"))
|
69 |
})
|
70 |
return datasets.DatasetInfo(
|
|
|
96 |
"speaker": row["speaker"],
|
97 |
"duration": row["duration"],
|
98 |
"segment_clean": row["segment_clean"],
|
99 |
+
"start": row['start'],
|
100 |
+
"end": row['end'],
|
101 |
+
"readable_start": row['readable_start'],
|
102 |
+
"readable_end": row['readable_end'],
|
103 |
+
"vp": np.asarray(row["vp"], dtype=np.float32)
|
104 |
}
|