这是终端的样子:
>>> from pydub import AudioSegment
>>> song = AudioSegment.from_wav("E:\\sounds\\ahh.wav")
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
song = AudioSegment.from_wav("E:\\sounds\\ahh.wav")
File "C:\Python27\lib\pydub\audio_segment.py", line 534, in from_wav
return cls.from_file(file, 'wav', parameters)
File "C:\Python27\lib\pydub\audio_segment.py", line 505, in from_file
p = subprocess.Popen(conversion_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
现在,这个文件肯定存在于我的计算机上,据我所知,我正确使用了反斜杠。为什么 Python 找不到它?