cdminix commited on
Commit
a58ee6e
·
1 Parent(s): 6f2e01b

remove scripts

Browse files
Files changed (2) hide show
  1. listening_test_results.py +0 -61
  2. to_parquet.py +0 -7
listening_test_results.py DELETED
@@ -1,61 +0,0 @@
1
- import os
2
- import csv
3
- import datasets
4
-
5
- _DESCRIPTION = """
6
- Subjective listening test results for TTS systems, including MOS, CMOS and SMOS ratings from multiple annotators.
7
- """
8
-
9
-
10
- class TTSDSSubjectiveConfig(datasets.BuilderConfig):
11
- """BuilderConfig for TTSDS Subjective."""
12
-
13
- def __init__(self, **kwargs):
14
- super().__init__(**kwargs)
15
-
16
-
17
- class TTSDSSubjective(datasets.GeneratorBasedBuilder):
18
- """TTSDS Subjective Listening Test Results."""
19
-
20
- VERSION = datasets.Version("1.0.0")
21
- BUILDER_CONFIGS = [
22
- TTSDSSubjectiveConfig(
23
- name="default",
24
- version=VERSION,
25
- description="Subjective listening test results",
26
- ),
27
- ]
28
-
29
- def _info(self):
30
- features = datasets.Features(
31
- {
32
- "audio": datasets.Value("string"),
33
- "dataset": datasets.Value("string"),
34
- "system": datasets.Value("string"),
35
- "rating_type": datasets.Value("string"),
36
- "value": datasets.Value("int32"),
37
- "annotator": datasets.Value("string"),
38
- "id": datasets.Value("string"),
39
- }
40
- )
41
- return datasets.DatasetInfo(
42
- description=_DESCRIPTION,
43
- features=features,
44
- )
45
-
46
- def _split_generators(self, dl_manager):
47
- data_path = dl_manager.download_and_extract("subjective_results.csv")
48
- return [
49
- datasets.SplitGenerator(
50
- name=datasets.Split.TEST,
51
- gen_kwargs={"filepath": data_path},
52
- ),
53
- ]
54
-
55
- def _generate_examples(self, filepath):
56
- with open(filepath, encoding="utf-8") as f:
57
- reader = csv.DictReader(f)
58
- for idx, row in enumerate(reader):
59
- # Convert value to int
60
- row["value"] = int(row["value"])
61
- yield idx, row
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
to_parquet.py DELETED
@@ -1,7 +0,0 @@
1
- from datasets import load_dataset
2
- from pathlib import Path
3
-
4
- dataset = load_dataset("listening_test_results.py", split="test")
5
-
6
- Path("parquet").mkdir(exist_ok=True)
7
- dataset.to_parquet("parquet/ttsds_subjective.parquet")