Trying to Run Audio File Analysis Streamlit App on Local Host but Erroring Out

I downloaded a streamlit tutorial (with all associated github code) that does analysis on and displays audio files. I am able to deploy to Streamlit cloud successfully using the tutorialā€™s code.

Link to App: https://share.streamlit.io/pinzhi000/audio_visualization/main/visualize_transformation.py
Github: https://github.com/pinzhi000/audio_visualization

But I want to go through the tutorialā€™s code line by line to really understand what each block of code is doing. So when I try to run the code on my local machine using ā€œstreamlit run visualize_transformation.pyā€ I get the following command line / terminal error:

I know itā€™s something with the pip install of libraries as there are a lot of imported audio related libraries in the code. But when I try to do something like pip install librosa I get this result:

Please help ā€¦ Iā€™m really stuck on what to do, thx

Edit: Please take a look at the github link to see all required packages and requirements. Iā€™m not sure how to properly install or load them into my command line (especially the packages).

I donā€™t see anything suspicious in the libraries in your github repo.
Only your local environment seems to have a problem.
Have you tried the force reinstall of numpy?
I donā€™t use anaconda, but if everything doesnā€™t help, canā€™t you just create a new env if necessary?

I assume you are using windows on your local system?
I think you only need ffmpeg. Either install ffmpeg on your system and make it available in your PATH or just download ffmpeg.exe and place it in the root folder of your streamlit application.

Another solution would be to use Docker. Are you familiar with Docker and do you have Docker Desktop installed on your windows machine? If yes, i could also provide a quick solution.

1 Like

appreciate the reply

  • I am using Windows 10
  • I did try the force reinstall of numpy but it didnā€™t work so Iā€™m going to try your suggestion of creating new environment
  • Iā€™ve setup docker (using Docker Desktop) once before for a class; Iā€™m not super familiar but I can review class notes and hopefully figure it out ā€¦ I would be curious about your quick Docker solution, thx

Update: I setup a new Anaconda environment and was able to pip install everything! Itā€™s working! Thank you so much for suggestion. Also I used ā€œconda install -c main ffmpegā€ to get ffmpeg working as well without downloading ffmpeg.exe file.

Iā€™d still be interested in your docker suggestion for future apps. Thx

1 Like

See my pull request on github.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.