(example_id: str)
| 71 | |
| 72 | |
| 73 | def _parse_example_id(example_id: str) -> tuple[str, int] | None: |
| 74 | matched = re.fullmatch(r"(zh|en)/(\d+)", (example_id or "").strip()) |
| 75 | if matched is None: |
| 76 | return None |
| 77 | return matched.group(1), int(matched.group(2)) |
| 78 | |
| 79 | |
| 80 | def _resolve_reference_audio_path(language: str, index: int) -> Path | None: |
no outgoing calls
no test coverage detected