Streamlit + Azure Speech: ModuleNotFoundError: No module named ‘azure’

Andrea 0 Reputation points
2023-06-08T13:46:13.3933333+00:00

I’m trying to build a Streamlit app that leverages the Azure Speech API for speech-to-text and text-to-speech tasks.

The functionality in the backend works as intended, but when I try to add the Streamlit frontend, I get an exception:

ModuleNotFoundError: No module named ‘azure’

I’ve explored threads related to similar problems, and I see that the solution should be to include the module in the requirements.txt file.

In my case, I’ve already included the correct module there (azure-cognitiveservices-speech). Nevertheless, it seems that Streamlit is asking to import the full “azure”, rather than only the specific service I need. Is this a bug, or the intended behavior?

Community Center | Not monitored
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.