diff --git a/Speech_to_text.py b/Speech_to_text.py new file mode 100644 index 0000000..21d27e9 --- /dev/null +++ b/Speech_to_text.py @@ -0,0 +1,18 @@ +import pyttsx3 +import speech_recognition as sr + +def get(): + r = sr.Recognizer() + with sr.Microphone() as source: + print('Say Something...!') + audio = r.listen(source) + print('done!') + + try: + text = r.recognize_google(audio) + print("You Said, "+ text) + + except Exception as e: + print(e) + +get()