Return the number of samples in the dataset. Returns: int: Total number of audio samples available for evaluation Note: For HuggingFace datasets, returns the length of the loaded dataset. For custom datasets, returns the length of the audio files
(self)
| 1204 | self.transcript_texts = transcript_texts |
| 1205 | |
| 1206 | def __len__(self): |
| 1207 | """Return the number of samples in the dataset. |
| 1208 | |
| 1209 | Returns: |
| 1210 | int: Total number of audio samples available for evaluation |
| 1211 | |
| 1212 | Note: |
| 1213 | For HuggingFace datasets, returns the length of the loaded dataset. |
| 1214 | For custom datasets, returns the length of the audio files list. |
| 1215 | """ |
| 1216 | if self.eval_set in HF_DATASETS: |
| 1217 | return len(self.dataset) |
| 1218 | return len(self.audio_files) |
| 1219 | |
| 1220 | def __getitem__(self, index): |
| 1221 | """Get a single sample from the dataset. |
nothing calls this directly
no outgoing calls
no test coverage detected