forked from vivjay30/pychorus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
25 lines (18 loc) · 697 Bytes
/
main.py
File metadata and controls
25 lines (18 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from __future__ import division
import argparse
from pychorus.helpers import find_and_output_chorus
def main(args):
find_and_output_chorus(args.input_file, args.output_file, args.min_clip_length)
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Select and output the chorus of a piece of music")
parser.add_argument("input_file", help="Path to input audio file")
parser.add_argument(
"--output_file",
default="chorus.wav",
help="Output file")
parser.add_argument(
"--min_clip_length",
default=15,
help="Minimum length (in seconds) to be considered a chorus")
main(parser.parse_args())