Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DGrothe-PhD committed Oct 7, 2024
1 parent b703c12 commit fa43ba7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions speakerSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def talk(cls, text):

@classmethod
def talkInLanguage(cls, text, lang="system_default", rate = 200):
"""Switches to a different language and speaks text"""
if not cls.engine:
if cls.speak:
cls.speak(text)
Expand Down Expand Up @@ -138,13 +139,13 @@ def prepareLanguages(cls):
for voice in voices:
if foundvoices == 3:
break
if not "German" in cls.voices_dict and voice.name.__contains__("German"):
if "German" not in cls.voices_dict and "German" in voice.name:
cls.voices_dict["German"] = voice.id
foundvoices += 1
if not "French" in cls.voices_dict and voice.name.__contains__("French"):
if "French" not in cls.voices_dict and "French" in voice.name:
cls.voices_dict["French"] = voice.id
foundvoices += 1
elif not "English" in cls.voices_dict and voice.name.__contains__("English"):
elif "English" not in cls.voices_dict and "English" in voice.name:
cls.voices_dict["English"] = voice.id
foundvoices += 1
return voices
Expand Down

0 comments on commit fa43ba7

Please sign in to comment.