MCPcopy Index your code
hub / github.com/modelscope/FunASR / find_audio_files

Function find_audio_files

examples/batch_asr_improved.py:26–30  ·  view source on GitHub ↗
(folder: Path, exts: List[str], recursive: bool)

Source from the content-addressed store, hash-verified

24 raise
25
26def find_audio_files(folder: Path, exts: List[str], recursive: bool) -> List[Path]:
27 if recursive:
28 return [p for p in folder.rglob("*") if p.is_file() and p.suffix.lower() in exts]
29 else:
30 return [p for p in folder.iterdir() if p.is_file() and p.suffix.lower() in exts]
31
32def main():
33 parser = argparse.ArgumentParser(description="Batch ASR using FunASR AutoModel")

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…