MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS-TTS / processor_needs_audio_tokenizer

Function processor_needs_audio_tokenizer

moss_tts_delay/finetuning/sft.py:245–257  ·  view source on GitHub ↗
(records: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

243
244
245def 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
260def build_processor(

Callers 1

mainFunction · 0.70

Calls 2

getMethod · 0.45

Tested by

no test coverage detected