speech recognition

Copy this👇

import speech recognition as sr

r sr.Recognizer()

while True:

try:

with sr.Microphone() as source:

print("Say something, good")

audio =r.listen(source)

text=r.recognize_google (audio)

text = text.lower()

print("Recognized text: (text)")



except:

print("You were trying to be funny")

r = sr.Recognizer()

continue

Comments