[英]I am using https://github.com/scaperot/the-BPM-detector-python/blob/master/bpm_detection/bpm_detection.py, how to input the audio file?
我正在使用以下代码来获取WAV文件的BPMS,但是如何输入音频文件?
我试着跑
bpm_detection.py --filename
但出现IO错误
主要功能如下:
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Process .wav file to
determine the Beats Per Minute.')
parser.add_argument('--filename', required=True,
help='.wav file for processing')
parser.add_argument('--window', type=float, default=3,
help='size of the the window (seconds) that will be scanned to determine the bpm. Typically less than 10 seconds. [3]')
args = parser.parse_args()
samps,fs = read_wav(args.filename)
采用
python file.py --filename file.wav
要么
python file.py --filename C:\path\path\test.wav
要么
python file.py --filename C:\\path\\path\\test.wav
要么
python file.py --filename ./test.wav
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.