| 22 | |
| 23 | |
| 24 | def parse_args(): |
| 25 | parser = argparse.ArgumentParser( |
| 26 | description="Run AudioSep inference from the Hive wrapper." |
| 27 | ) |
| 28 | parser.add_argument( |
| 29 | "--audio_file", |
| 30 | type=str, |
| 31 | default=str(TEST_DATA_DIR / "acoustic_guitar.wav"), |
| 32 | help="Input audio file path.", |
| 33 | ) |
| 34 | parser.add_argument( |
| 35 | "--text", |
| 36 | type=str, |
| 37 | default="acoustic_guitar", |
| 38 | help="Text query used for source separation.", |
| 39 | ) |
| 40 | parser.add_argument( |
| 41 | "--output_file", |
| 42 | type=str, |
| 43 | default=str(TEST_DATA_DIR / "separated_audio.wav"), |
| 44 | help="Output separated audio file path.", |
| 45 | ) |
| 46 | return parser.parse_args() |
| 47 | |
| 48 | |
| 49 | def main(): |