Load VoxPopuli audio files and transcripts. Parses the ASR test TSV file to extract audio file paths and normalized transcript texts for English parliamentary speech. Returns: Tuple[list, list]: A tuple containing: - List of audio file paths (WAV
(self)
| 472 | """ |
| 473 | |
| 474 | def load(self) -> Tuple[list, list]: |
| 475 | """Load VoxPopuli audio files and transcripts. |
| 476 | |
| 477 | Parses the ASR test TSV file to extract audio file paths and normalized |
| 478 | transcript texts for English parliamentary speech. |
| 479 | |
| 480 | Returns: |
| 481 | Tuple[list, list]: A tuple containing: |
| 482 | - List of audio file paths (WAV format) |
| 483 | - List of corresponding normalized transcript strings |
| 484 | """ |
| 485 | with open(f"{self.root_dir}/asr_test.tsv", "r") as f: |
| 486 | next(f) # Skip header |
| 487 | file_text = [line.split("\t")[:2] for line in f] |
| 488 | audio_files, transcript_texts = zip(*file_text) |
| 489 | audio_files = [f"{self.root_dir}/test/{f}.wav" for f in audio_files] |
| 490 | return list(audio_files), list(transcript_texts) |
| 491 | |
| 492 | |
| 493 | class AMILoader(BaseDatasetLoader): |
nothing calls this directly
no outgoing calls
no test coverage detected