I'm trying to get this reCaptcha code to run and I've gotten very close but I get this error:
File "search_bot.py", line 53, in solveReCaptcha
sound = pydub.AudioSegment.from_mp3(os.getcwd()+"\\sample.mp3")
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydub\audio_segment.py", line 738, in from_mp3
return cls.from_file(file, 'mp3', parameters=parameters)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydub\audio_segment.py", line 685, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Users\username\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
It's throwing an error on a .py file that I didn't even write but is just part of the Python lib so I don't know how to fix it or even why I am getting it. I already looked at this answer but it didn't help me.
EDIT:
This the code that is throwing the error:
urllib.request.urlretrieve(src, os.getcwd() + "\\sample.mp3")
sound = pydub.AudioSegment.from_mp3(os.getcwd() + "\\sample.mp3")
sound.export(os.getcwd() + "\\sample.wav", format="wav")
sample_audio = sr.AudioFile(os.getcwd() + "\\sample.wav")
r = sr.Recognizer()