#Bot - Train (Data) : From Import From Import Import
#Bot - Train (Data) : From Import From Import Import
bot = ChatBot('bot')
bot.set_trainer(ListTrainer)
while True:
message =input("You: ")
if message.strip() !='Bye' :
reply = bot.get_response(message)
print("Chatbot: ", reply)
if message.strip() == 'bye' :
print("Chatbot: Bye")
break
import speech_recognition as sr
r = sr.Recognizer()
with sr.Microphone() as source:
print('say atharav')
audio = r.listen(source)
print(audio)
try:
print('google thinks you said:\n'
+ r.recognize_google(audio))
except:
print('there is something error in recognition')