Converting Speech to Text is very easy in python. Let’s follow this simple tutorial to implement the same.
Step#1: Get the below python libraries
 pip install SpeechRecognition
 pip install PyAudio
Step#2: Open your favorite IDE, we are choosing Jupyter Notebook, and write the below code.
Step#3: Now after you run the above code snippet, whatever you say on the microphone, gets converted into text :)
POINT TO NOTE:
The above code snippet works with the default language is English. If we speak in any other language example Hindi, the text is interpreted in the form of English, like as below-
In case you want to display text in the language spoken, we have to introduce a very minor change —
Now, if we speak anything in Hindi, the text is displayed in the same language.
Hope it helps. Thanks :)