carlthome / python-audio-effects

Apply audio effects such as reverb and EQ directly to audio files or NumPy ndarrays.
MIT License
381 stars 52 forks source link

[WinError 2] The system cannot find the file specified still happens #13

Open MRrollingJerry opened 5 years ago

MRrollingJerry commented 5 years ago

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.

carlthome commented 5 years ago

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')
MRrollingJerry commented 5 years ago

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

wangtiance commented 5 years ago

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.

iamgoinghomenow commented 5 years ago

sox not in path solved it for me.

MinaBabahaji commented 3 years ago

Hi, did you find the solution? I have faced this problem too.