diff --git a/pyttsx3/drivers/sapi5.py b/pyttsx3/drivers/sapi5.py index 622ff1d..404298a 100644 --- a/pyttsx3/drivers/sapi5.py +++ b/pyttsx3/drivers/sapi5.py @@ -110,7 +110,7 @@ def _toVoice(attr): # Retrieve gender gender_attr = attr.GetAttribute("Gender") - gender_title_case = (gender or "").title() + gender_title_case = (gender_attr or "").title() gender = gender_title_case if gender_title_case in {"Male", "Female"} else None # Retrieve age