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 symptoms(): with sr.Microphone() as source: speak("patient\'s symptoms") try: r.adjust_for_ambient_noise(source,duration=0.7) audio= r.listen(source) t1 = r.recognize_google(audio) sm_entry.insert(0,t1) pr.symptoms(sm_entry.get()) except: speak(' could not recognize ')