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