phdkhanh2507 commited on
Commit
317abbb
·
verified ·
1 Parent(s): 117d256

Update transcribed-vietnamese-audio.py

Browse files
Files changed (1) hide show
  1. transcribed-vietnamese-audio.py +3 -5
transcribed-vietnamese-audio.py CHANGED
@@ -18,7 +18,7 @@ _HOMEPAGE = "https://github.com/tanthinhdt/vietnamese-av-asr"
18
  _MAIN_REPO_PATH = "datasets/phdkhanh2507/transcribed-vietnamese-audio"
19
  _REPO_URL = "https://huggingface.co/{}/resolve/main"
20
  _URLS = {
21
- "meta": f"{_REPO_URL}/metadata/".format(_MAIN_REPO_PATH) + "{channel}.parquet",
22
  }
23
 
24
  _CONFIGS = ["all"]
@@ -58,7 +58,7 @@ class TranscribedVietnameseAudio(datasets.GeneratorBasedBuilder):
58
  "id": datasets.Value("string"),
59
  "chunk_id": datasets.Value("string"),
60
  "video_fps": datasets.Value("int8"),
61
- "audio_fps": datasets.Value("int8"),
62
  "transcript": datasets.Value("string"),
63
  })
64
 
@@ -80,7 +80,7 @@ class TranscribedVietnameseAudio(datasets.GeneratorBasedBuilder):
80
  config_names = _CONFIGS[1:] if self.config.name == "all" else [self.config.name]
81
 
82
  metadata_paths = dl_manager.download(
83
- [_URLS["meta"].format(channel=channel) for channel in config_names]
84
  )
85
 
86
  return [
@@ -99,8 +99,6 @@ class TranscribedVietnameseAudio(datasets.GeneratorBasedBuilder):
99
  """
100
  Generate examples from metadata.
101
  :param metadata_paths: Paths to metadata.
102
- :param audio_dict: Paths to directory containing audios.
103
- :param transcript_dict: Paths to directory containing transcripts.
104
  :yield: Example.
105
  """
106
  dataset = datasets.load_dataset(
 
18
  _MAIN_REPO_PATH = "datasets/phdkhanh2507/transcribed-vietnamese-audio"
19
  _REPO_URL = "https://huggingface.co/{}/resolve/main"
20
  _URLS = {
21
+ "meta": f"{_REPO_URL}/metadata/".format(_MAIN_REPO_PATH) + "{id}.parquet",
22
  }
23
 
24
  _CONFIGS = ["all"]
 
58
  "id": datasets.Value("string"),
59
  "chunk_id": datasets.Value("string"),
60
  "video_fps": datasets.Value("int8"),
61
+ "audio_fps": datasets.Value("int64"),
62
  "transcript": datasets.Value("string"),
63
  })
64
 
 
80
  config_names = _CONFIGS[1:] if self.config.name == "all" else [self.config.name]
81
 
82
  metadata_paths = dl_manager.download(
83
+ [_URLS["meta"].format(id=id) for id in config_names]
84
  )
85
 
86
  return [
 
99
  """
100
  Generate examples from metadata.
101
  :param metadata_paths: Paths to metadata.
 
 
102
  :yield: Example.
103
  """
104
  dataset = datasets.load_dataset(