Edmon02 commited on
Commit
8cf55a6
1 Parent(s): c2cc8cf

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -75
app.py DELETED
@@ -1,75 +0,0 @@
1
- from collections import defaultdict
2
- import os
3
- import json
4
- import csv
5
-
6
- import datasets
7
- import pandas as pd
8
-
9
-
10
- _DESCRIPTION = """
11
- A large-scale speech corpus for representation learning, semi-supervised learning and interpretation.
12
- """
13
-
14
- _CITATION = """
15
- @inproceedings{}
16
- """
17
-
18
- _HOMEPAGE = ""
19
-
20
- _LICENSE = ""
21
-
22
- _ASR_LANGUAGES = [
23
- "hy"
24
- ]
25
- _ASR_ACCENTED_LANGUAGES = [
26
- ""
27
- ]
28
-
29
- _LANGUAGES = _ASR_LANGUAGES + _ASR_ACCENTED_LANGUAGES
30
-
31
-
32
- class HySpeech(datasets.GeneratorBasedBuilder):
33
- """The VoxPopuli dataset."""
34
-
35
- VERSION = datasets.Version("1.1.0") # TODO: version
36
-
37
- DEFAULT_WRITER_BATCH_SIZE = 256
38
-
39
- def _info(self):
40
- features = datasets.Features(
41
- {
42
- "speaker_id": datasets.Value("string"),
43
- "audio": datasets.Audio(sampling_rate=16_000),
44
- "raw_text": datasets.Value("string"),
45
- "normalized_text": datasets.Value("string"),
46
- "gender": datasets.Value("string"), # TODO: ClassVar?
47
- "is_gold_transcript": datasets.Value("bool"),
48
- "accent": datasets.Value("string"),
49
- }
50
- )
51
- return datasets.DatasetInfo(
52
- description=_DESCRIPTION,
53
- features=features,
54
- homepage=_HOMEPAGE,
55
- license=_LICENSE,
56
- citation=_CITATION,
57
- )
58
-
59
- def _split_generators(self, dl_manager):
60
- pass
61
-
62
- def _generate_examples(self):
63
- csv_file_path = "segments_info.csv"
64
- df = pd.read_csv(csv_file_path)
65
-
66
- for idx, row in df.iterrows():
67
- yield idx, {
68
- "speaker_id": row['speaker_id'],
69
- "audio": row["audio_path"],
70
- "raw_text": row["raw_text"],
71
- "normalized_text": row["normalized_text"],
72
- "gender": row["gender"],
73
- "is_gold_transcript": True, # You may need to change this
74
- "accent": "None", # You may need to change this
75
- }