Even though there are a handful of threads on this issue, no solutions have helped me, here is the problematic lines of code:
AudioSegment.converter = r'C:/users/user_/appdata/local/packages/pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0/localcache/local-packages/python38/site-packages/ffmpeg.exe'
AudioSegment.ffprobe = r'C:/users/user_/appdata/local/packages/pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0/localcache/local-packages/python38/site-packages/ffprobe.exe'
final_voice = AudioSegment.from_mp3(file_path) + AudioSegment.silent(duration=silence_duration)
I have tried different methods to solve this issue, such as adding the paths to ffmpeg.exe and ffprobe.exe but nothing changed after that, other solutions do not make much sense as I am not using the modules they have had issues with and I did not do things they have done.
If you have any ideas please share as I have not found how to do the things AudioSegment does with other modules (by the way this issue has come up in every line of code containing AudioSegment.from_mp3(file_path))
Thanks
Adding the ffmpeg files was not an option for me so I dug a little deeper. Short answer:
Change the else clause of get_prober_name() in your local
...\site-packages\pydub\utils.py
(line 199 in my current version) to return the absolute path of your ffprobe.exe. After that the following code worked for me:I'm using Windows with a unzipped version of ffmpeg (so no installation, Path entry or similar). While the converter method seemed to acutally set a value, the ffprobe method didn't do anything.
The subprocess the script is calling simply calls 'ffprobe' as a program. Which of course will not work if this is not a registered program. So the easiest (and hopefully safest) way to circumvent this behaviour is to set the default prober name to the correct full path (as done above).