| 93 | usage = 'lowlevel.py [options] <inputfilename> <outputfilename>' |
| 94 | |
| 95 | def parse_args(): |
| 96 | |
| 97 | import numpy |
| 98 | |
| 99 | essentia_version = '%s\n'\ |
| 100 | 'python version: %s\n'\ |
| 101 | 'numpy version: %s' % (essentia.__version__, # full version |
| 102 | sys.version.split()[0], # python major version |
| 103 | numpy.__version__) # numpy version |
| 104 | |
| 105 | from optparse import OptionParser |
| 106 | parser = OptionParser(usage=usage, version=essentia_version) |
| 107 | |
| 108 | parser.add_option("--start", |
| 109 | action="store", dest="startTime", default="0.0", |
| 110 | help="time in seconds from which the audio is computed") |
| 111 | |
| 112 | parser.add_option("--end", |
| 113 | action="store", dest="endTime", default="600.0", |
| 114 | help="time in seconds till which the audio is computed, 'end' means no time limit") |
| 115 | |
| 116 | |
| 117 | (options, args) = parser.parse_args() |
| 118 | |
| 119 | return options, args |
| 120 | |
| 121 | |
| 122 | |