Load AMI corpus audio files and transcripts. Parses the text file to extract utterance IDs and maps them to corresponding audio files in the evaluation subset. Returns: Tuple[list, list]: A tuple containing: - List of audio file paths (WAV format
(self)
| 510 | """ |
| 511 | |
| 512 | def load(self) -> Tuple[list, list]: |
| 513 | """Load AMI corpus audio files and transcripts. |
| 514 | |
| 515 | Parses the text file to extract utterance IDs and maps them to |
| 516 | corresponding audio files in the evaluation subset. |
| 517 | |
| 518 | Returns: |
| 519 | Tuple[list, list]: A tuple containing: |
| 520 | - List of audio file paths (WAV format) |
| 521 | - List of corresponding transcript strings |
| 522 | """ |
| 523 | with open(f"{self.root_dir}/text", "r") as f: |
| 524 | file_text = [line.split(" ", 1) for line in f] |
| 525 | audio_files, transcript_texts = zip(*file_text) |
| 526 | audio_files = [ |
| 527 | f"{self.root_dir}/{f.split('_')[1]}/eval_{f.lower()}.wav" |
| 528 | for f in audio_files |
| 529 | ] |
| 530 | return list(audio_files), list(transcript_texts) |
| 531 | |
| 532 | |
| 533 | class CORAALLoader(BaseDatasetLoader): |
no outgoing calls
no test coverage detected