I'm attempting to get pydub to mix 2 audio wav files into a single wav file. Here is my current code:
from pydub import AudioSegment
sound1 = AudioSegment.from_wav("Test_1.wav")
sound2 = AudioSegment.from_wav("Test_2.wav")
# mix sound2 with sound1, starting at 5000ms into sound1)
output = sound1.overlay(sound2, position=5000)
# save the result
output.export("mixed.wav", format="wav")
here is the exact error log:
Traceback (most recent call last):
File "heterodyning.py", line 10, in <module>
output.export("mixed.wav", format = "wav")
File "build/bdist.linux-armv6l/egg/pydub/audio_segment.py", line 234, in export
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
However, for whatever reason, whenever i try to run this, it raises a raise_child exception, and tells me that there is no such file or directory, referring to the last line where I tell it to export. I have no idea why. Can anyone tell me why this is happening?