I get the error below in production, not in development, when attempting to use the pydub library.
I am a relatively new fullstack developer and I use VSCode to automatically use Docker and upload to Azure.
It seems like ffprobe isn't found; however, it is included in my requirements.txt, along with pydub.
Profiler Installer is exiting as installation is completedEnding Log Tail of existing logs ---Starting Live Log Stream ---
2024-03-27T21:05:43.4049623Z warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning)
2024-03-27T21:05:43.4919891Z [2024-03-27 21:05:43,416] ERROR in app: Exception on /feedback_on_audio [POST]
2024-03-27T21:05:43.4932562Z Traceback (most recent call last):
2024-03-27T21:05:43.4941038Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app
2024-03-27T21:05:43.4949103Z response = self.full_dispatch_request()
2024-03-27T21:05:43.5018333Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5031494Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
2024-03-27T21:05:43.5219047Z Transcription request made.
2024-03-27T21:05:43.5235303Z 174.118.230.220:54450 - - [27/Mar/2024:21:05:43 +0000] "POST /feedback_on_audio HTTP/1.1" 500 265 "http://localhost:3000/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
2024-03-27T21:05:43.5302210Z rv = self.handle_user_exception(e)
2024-03-27T21:05:43.5318485Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5334019Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
2024-03-27T21:05:43.5405049Z rv = self.dispatch_request()
2024-03-27T21:05:43.5420619Z ^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5435109Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
2024-03-27T21:05:43.5516272Z return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-03-27T21:05:43.5525298Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5533240Z File "/tmp/8dc4e778715d083/ai.py", line 60, in feedback_on_audio
2024-03-27T21:05:43.5599696Z transcription = transcribe(audio_file, language)
2024-03-27T21:05:43.5607822Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5615925Z File "/tmp/8dc4e778715d083/ai.py", line 126, in transcribe
2024-03-27T21:05:43.5625904Z audio = AudioSegment.from_file(io.BytesIO(audio_data))
2024-03-27T21:05:43.5791697Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5801780Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/pydub/audio_segment.py", line 728, in from_file
2024-03-27T21:05:43.5810711Z info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
2024-03-27T21:05:43.5819085Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.5982678Z File "/tmp/8dc4e778715d083/antenv/lib/python3.11/site-packages/pydub/utils.py", line 274, in mediainfo_json
2024-03-27T21:05:43.5992950Z res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
2024-03-27T21:05:43.6001662Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-27T21:05:43.6012470Z File "/opt/python/3.11.7/lib/python3.11/subprocess.py", line 1026, in init
2024-03-27T21:05:43.6175875Z self._execute_child(args, executable, preexec_fn, close_fds,
2024-03-27T21:05:43.6186100Z File "/opt/python/3.11.7/lib/python3.11/subprocess.py", line 1950, in _execute_child
2024-03-27T21:05:43.6195215Z raise child_exception_type(errno_num, err_msg, err_filename)
2024-03-27T21:05:43.6202836Z FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe'