(records: List[Dict[str, Any]])
| 243 | |
| 244 | |
| 245 | def processor_needs_audio_tokenizer(records: List[Dict[str, Any]]) -> bool: |
| 246 | for record in records: |
| 247 | ref_audio = normalize_audio_path_list(record.get("ref_audio"), "ref_audio") |
| 248 | if record.get("ref_audio_codes") is None and ref_audio is not None: |
| 249 | return True |
| 250 | if record.get("reference_audio_codes") is None: |
| 251 | reference = normalize_audio_path_list(record.get("reference"), "reference", allow_none=True) |
| 252 | if reference is not None and any(item is not None for item in reference): |
| 253 | return True |
| 254 | reference_audio = normalize_audio_path_list(record.get("reference_audio"), "reference_audio") |
| 255 | if reference_audio is not None: |
| 256 | return True |
| 257 | return False |
| 258 | |
| 259 | |
| 260 | def build_processor( |
no test coverage detected