示例#1
0
 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'
示例#2
0
 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")
示例#3
0
 def __init__(self, profile=None):
     self.language = utils.get_profile(profile, key='lang', default='en-GB')