OSError: No Default Input Device Available

I have deployed streamlit app in spaces which uses speec_recognition module of python.
with sr.Microphone() as source:
Once I click the button for recording, it throws an error: OSError: No Default Input Device Available

Please let me know how to fix it.
Is there a limitation of using speech_recognition module.

Please help me on this.

Did you find any solution to this?