Unable to Deploy streamlit app

Error: OSError: PortAudio library not found (any leads will be appreciated)

2024-12-05 01:31:19.575 503 GET /script-health-check (127.0.0.1) 718.06ms

────────────────────── Traceback (most recent call last) ───────────────────────

/home/adminuser/venv/lib/python3.12/site-packages/streamlit/runtime/scriptru

nner/script_runner.py:534 in _run_script

/mount/src/music_genre_classifier_ml/app/src/main.py:6 in

  3 import numpy as np                                                      

  4 import librosa                                                          

  5 from tensorflow.image import resize                                     

❱ 6 import sounddevice as sd

  7 from scipy.io.wavfile import write                                      

  8 import tempfile                                                         

  9 import os                                                               

/home/adminuser/venv/lib/python3.12/site-packages/sounddevice.py:71 in

  68 │   │   if _libname is not None:                                       

  69 │   │   │   break                                                      

  70 │   else:                                                              

❱ 71 │ │ raise OSError(‘PortAudio library not found’)

  72 │   _lib = _ffi.dlopen(_libname)                                       

  73 except OSError:                                                        

  74 │   if _platform.system() == 'Darwin':                                 

────────────────────────────────────────────────────────────────────────────────

OSError: PortAudio library not found

2024-12-05 01:31:24.607 503 GET /script-health-check (127.0.0.1) 724.47ms

You need to configure your environment to install PortAudio.

Try adding a packages.txt file to the root of your repository with this:

portaudio19-dev