def __init__(self, **kwargs): super(Naturalreader, self).__init__(**kwargs) self.voice = kwargs.get('voice', None) if self.voice is None: raise MissingTTSParameter( "voice parameter is required by the NaturalReader TTS") if not VOICE_NAME_DATA.has_key(self.voice): raise MissingTTSParameter("Unknow voice") self.src = "pw" # speech rate self.speed = kwargs.get('speed', 180) self.t = None
def __init__(self, **kwargs): super(Acapela, self).__init__(**kwargs) self.voice = kwargs.get('voice', None) if self.voice is None: raise MissingTTSParameter( "voice parameter is required by the Acapela TTS")
def __init__(self, **kwargs): # voxygen does'nt need a language. The name of the voice correspond to a lang super(Voxygen, self).__init__(language="any", **kwargs) self.voice = kwargs.get('voice', None) if self.voice is None: raise MissingTTSParameter( "voice parameter is required by the Voxygen TTS")
def _check_parameters(self): """ Check parameters are ok, raise missingparameters exception otherwise. :return: true if parameters are ok, raise an exception otherwise .. raises:: MissingParameterException """ if self.username is None or self.password is None or self.voice is None: raise MissingTTSParameter("[Watson] Missing parameters, check documentation !") return True
def _check_parameters(self): """ Check parameters are ok, raise MissingTTSParameterException exception otherwise. :return: true if parameters are ok, raise an exception otherwise .. raises:: MissingTTSParameterException """ if self.language == "default" or self.language is None or self.key is None or self.speaker is None: raise MissingTTSParameter("[YandexTTS] Missing parameters, check documentation !") return True
def _check_parameters(self): """ Check parameters are ok, raise MissingTTSParameterException exception otherwise. :return: true if parameters are ok, raise an exception otherwise .. raises:: MissingTTSParameterException """ if self.locale is None or self.voice is None: raise MissingTTSParameter( "[MaryTTS] Missing parameters, check documentation !") return True
def __init__(self, **kwargs): super(Acapela, self).__init__(**kwargs) self.voice = kwargs.get('voice', None) if self.voice is None: raise MissingTTSParameter("voice parameter is required by the Acapela TTS") # speech rate self.spd = kwargs.get('spd', 180) # VOICE SHAPING self.vct = kwargs.get('vct', 100) self.words = None
def __init__(self, **kwargs): super(Espeak, self).__init__(language="any", **kwargs) # set parameter from what we receive from the settings self.variant = kwargs.get('variant', None) self.speed = str(kwargs.get('speed', '160')) self.amplitude = str(kwargs.get('amplitude', '100')) self.pitch = str(kwargs.get('pitch', '50')) self.espeak_exec_path = kwargs.get('path', r'/usr/bin/espeak') if self.voice == 'default' or self.voice is None: raise MissingTTSParameter( "voice parameter is required by the eSpeak TTS") # if voice = default, don't add voice option to espeak if self.variant is None: self.voice_and_variant = self.voice else: self.voice_and_variant = self.voice + '+' + self.variant