def show(): pr.name(name_entry.get()) pr.age(age_entry.get()) pr.gender(gen_entry.get()) pr.serial(sl_entry.get()) pr.symptoms(sm_entry.get()) pr.diagnosis(dia_entry.get()) pr.medicine(0,md_entry.get(),'',0,1) pr.advice(ad_entry.get()) pr.signature(sig_entry.get()) cv()
def medicines(): global count with sr.Microphone() as source: speak("patient\'s medicines") try: count+=1 r.adjust_for_ambient_noise(source,duration=1) audio= r.listen(source) t1 = r.recognize_google(audio) t1.remove('tablets') t1=t1.split() md_entry.insert(0,t1[0]) pr.medicine(count,t1[0],t1[1],0,1) except: speak(' could not recognize ')