FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe' when trying audio = AudioSegment.from_file()

95 Views Asked by At

Trying to convert an audio file to wav format file using:

AudioSegment.from_file(input_audio_file).

Functionality works fine on local machine, however when deployed on Heroku seeing a following error logs:

FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'

1

There are 1 best solutions below

0
Rizwan Basharat Ali On

Basically, the issue you're facing is that Heroku is a cloud application platform and it can only access files which are in cloud storage.

The reason you're not facing the error in your local environment because the uploaded file is saved in your machine locally and it can be accessed easily but in case of deployed application, it cannot access that file.

What you have to do is configure a cloud storage like S3, Azure Blob Storage, etc. with your project, then your problem will be solved.