Summary
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?
requirements.txt
When I test the functionality without using Streamlit, the system works as expected:
- When I speak on the microphone, the audio signal is recognised
- The system is also able to synthesise the text, as expected
When I try to embed these functions in a Streamlit app, on the contrary, the system raises this exception: