python-audio-effects
python-audio-effects copied to clipboard
[WinError 2] The system cannot find the file specified still happens
I used the code in the tutorial:
from pysndfx import AudioEffectsChain
fx = (
AudioEffectsChain()
.highshelf()
.reverb()
.phaser()
.delay()
.lowshelf()
)
infile = 'C:/Users/user/Desktop/test\\000D3D330B1371EB.wav'
outfile = 'C:/Users/user/Desktop/test\\000D3D330B1371EB.wav'
fx(infile, outfile)
But the file can never be found.
pysndfx and fox are both up to date. It seems the error comes at the subprocess.Popen.
Could you try again but make sure outfile
is different from infile
?
Also, try this sanity check:
import os
assert os.path.isfile('C:/Users/user/Desktop/test\\000D3D330B1371EB.wav')
Thanks for the advice. I changed outfile to 'C:/Users/user/Desktop/save\000D3D330B1371EB.wav' and made sure the wav file is at the address I mention in infile, but it still gives me the error, 'could not find the file specified'.
btw the error is towards infile
Hello @MRrollingJerry , in case you still need the solution, I think it's possibly because you don't have SoX installed on windows, or did not add its path to the system. The error is caused by not finding sox.exe, instead of not finding the input file.
sox not in path solved it for me.
Hi, did you find the solution? I have faced this problem too.