def __init__(self, profile=None): self.list_voices() self.voice = utils.get_profile(profile, key='voice', default='Kate') for name, language in self.voices: if name == self.voice: break else: self.voice = 'Kate'
def __init__(self, profile=None): self.language = utils.get_profile(profile, key="lang", default="en-uk") if self.language not in gtts.gTTS.LANGUAGES: raise KeyError("Unknown language")
def __init__(self, profile=None): self.language = utils.get_profile(profile, key='lang', default='en-GB')