簡體   English   中英

我正在使用https://github.com/scaperot/the-BPM-detector-python/blob/master/bpm_detection/bpm_detection.py,如何輸入音頻文件?

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM