noflm commited on
Commit
f2e2266
1 Parent(s): c1ac263

fix config

Browse files
Files changed (1) hide show
  1. EliteVoiceProject.py +14 -12
EliteVoiceProject.py CHANGED
@@ -15,10 +15,12 @@
15
  """Elite Voice Project"""
16
 
17
  import csv
18
- import json
19
  import os
 
20
 
21
  import datasets
 
 
22
 
23
  _CITATION = """\
24
  @InProceedings{elitevoiceproject:dataset,
@@ -36,7 +38,7 @@ _BASE_URL = "https://huggingface.co/datasets/Elite35P-Server/EliteVoiceProject/r
36
 
37
  _AUDIO_URL = _BASE_URL + "audio/{platform}/{split}/{platform}_{split}_{version}.tar"
38
 
39
- _TRANSCRIPT_URL = _BASE_URL + "transcript/{platform}/{split}/{platform}_{split}_{version}.tsv"
40
 
41
 
42
  class EliteVoiceProjectConfig(datasets.BuilderConfig):
@@ -64,7 +66,7 @@ class EliteVoiceProject(datasets.GeneratorBasedBuilder):
64
  name=platporm,
65
  version='0.0.1',
66
  language='Japanese',
67
- release_date='2022-12-06',
68
  )
69
  for platporm in ["twitter", "youtube", "youtube"]
70
  ]
@@ -98,7 +100,7 @@ class EliteVoiceProject(datasets.GeneratorBasedBuilder):
98
 
99
  audio_urls = {}
100
  #splits = ("twitter", "youtube", "twitch", "test")
101
- splits = ["train", "test"]
102
  for split in splits:
103
  audio_urls[split] = [
104
  _AUDIO_URL.format(platform=platporm, split=split, version=version)
@@ -131,19 +133,19 @@ class EliteVoiceProject(datasets.GeneratorBasedBuilder):
131
  def _generate_examples(self, local_extracted_archive_paths, archives, meta_path):
132
  data_fields = list(self._info().features.keys())
133
  metadata = {}
134
- with open(meta_path, encoding="utf-8") as f:
135
- reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
136
  for row in tqdm(reader, desc="Reading metadata..."):
137
  if not row["path"].endswith(".mp3"):
138
  row["path"] += ".mp3"
139
  # accent -> accents in CV 8.0
140
- if "accents" in row:
141
- row["accent"] = row["accents"]
142
- del row["accents"]
143
  # if data is incomplete, fill with empty values
144
- for field in data_fields:
145
- if field not in row:
146
- row[field] = ""
147
  metadata[row["path"]] = row
148
 
149
  for i, audio_archive in enumerate(archives):
 
15
  """Elite Voice Project"""
16
 
17
  import csv
 
18
  import os
19
+ import json
20
 
21
  import datasets
22
+ from datasets.utils.py_utils import size_str
23
+ from tqdm import tqdm
24
 
25
  _CITATION = """\
26
  @InProceedings{elitevoiceproject:dataset,
 
38
 
39
  _AUDIO_URL = _BASE_URL + "audio/{platform}/{split}/{platform}_{split}_{version}.tar"
40
 
41
+ _TRANSCRIPT_URL = _BASE_URL + "transcript/{platform}/{split}/{platform}_{split}_{version}.csv"
42
 
43
 
44
  class EliteVoiceProjectConfig(datasets.BuilderConfig):
 
66
  name=platporm,
67
  version='0.0.1',
68
  language='Japanese',
69
+ release_date='2022-12-08',
70
  )
71
  for platporm in ["twitter", "youtube", "youtube"]
72
  ]
 
100
 
101
  audio_urls = {}
102
  #splits = ("twitter", "youtube", "twitch", "test")
103
+ splits = ("train", "test")
104
  for split in splits:
105
  audio_urls[split] = [
106
  _AUDIO_URL.format(platform=platporm, split=split, version=version)
 
133
  def _generate_examples(self, local_extracted_archive_paths, archives, meta_path):
134
  data_fields = list(self._info().features.keys())
135
  metadata = {}
136
+ with open(meta_path, newline='', encoding="utf-8") as f:
137
+ reader = csv.DictReader(f)
138
  for row in tqdm(reader, desc="Reading metadata..."):
139
  if not row["path"].endswith(".mp3"):
140
  row["path"] += ".mp3"
141
  # accent -> accents in CV 8.0
142
+ #if "accents" in row:
143
+ # row["accent"] = row["accents"]
144
+ # del row["accents"]
145
  # if data is incomplete, fill with empty values
146
+ #for field in data_fields:
147
+ # if field not in row:
148
+ # row[field] = ""
149
  metadata[row["path"]] = row
150
 
151
  for i, audio_archive in enumerate(archives):