I am trying to use subprocess.call to run a sox command as follows:
import subprocess
subprocess.call(['sox','-n','-b','16','output.wav','synth','2.25','sine','300','vol','0.5'])
While this command works fine on a unix command line, here I get the following error:
OSError: [Errno 2] No such file or directory
I also tried this using os.system:
os.system('sox -n -b 16 output.wav synth 2.25 sine 300 vol 0.5')
And I get a command not found error. Calling other unix commands works fine for me, e.g.
subprocess.call(['say' ,'hello'])
Any ideas? I'm running OS 10.8.4, python 2.7.6, sox 14.4.1.