Load FLEURS dataset audio files and transcripts. Parses the test.tsv file to extract audio file paths and transcriptions for the English language subset. Returns: Tuple[list, list]: A tuple containing: - List of audio file paths from test directo
(self)
| 434 | """ |
| 435 | |
| 436 | def load(self) -> Tuple[list, list]: |
| 437 | """Load FLEURS dataset audio files and transcripts. |
| 438 | |
| 439 | Parses the test.tsv file to extract audio file paths and transcriptions |
| 440 | for the English language subset. |
| 441 | |
| 442 | Returns: |
| 443 | Tuple[list, list]: A tuple containing: |
| 444 | - List of audio file paths from test directory |
| 445 | - List of corresponding transcript strings |
| 446 | """ |
| 447 | with open(f"{self.root_dir}/test.tsv", "r") as f: |
| 448 | file_text = [line.split("\t")[1:3] for line in f] |
| 449 | audio_files, transcript_texts = zip(*file_text) |
| 450 | audio_files = [f"{self.root_dir}/test/{f}" for f in audio_files] |
| 451 | return list(audio_files), list(transcript_texts) |
| 452 | |
| 453 | |
| 454 | class VoxPopuliLoader(BaseDatasetLoader): |
nothing calls this directly
no outgoing calls
no test coverage detected