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