我正在使用audiodiff检测两个音频文件,无论它们是不同的还是相似的

时间:2019-03-09 13:14:21

标签: python audio

This is the code that I'm using:

import audiodiff

import os

dir_path = os.path.dirname(os.path.realpath(__file__))

fname1 = os.path.join(dir_path, 'SampleAudio_0.7mb.mp3')

fname2 = os.path.join(dir_path, 'SampleAudio_0.4mb.mp3')

audiodiff.equal(fname1, fname2, ffmpeg_bin= None)

但是我不断收到此错误:

C:\Users\Lenovo\Desktop>python audio.py
Traceback (most recent call last):
  File "audio.py", line 6, in <module>
    audiodiff.equal('SampleAudio_0.7mb.mp3', 'SampleAudio_0.7mb.mp3', ffmpeg_bin=None)
  File "C:\Python27\lib\site-packages\audiodiff\__init__.py", line 40, in equal
    return audio_equal(name1, name2, ffmpeg_bin) and tags_equal(name1,
  File "C:\Python27\lib\site-packages\audiodiff\__init__.py", line 51, in audio_equal
    return checksum(name1, ffmpeg_bin) == checksum(name2, ffmpeg_bin)
  File "C:\Python27\lib\site-packages\audiodiff\__init__.py", line 86, in checksum
    stderr=subprocess.PIPE)
  File "C:\Python27\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

请帮助。而且,如果您对音频检测有一些建议,也非常欢迎。

0 个答案:

没有答案