Make Factory get Mimic TTS class from normal list
Removes duplicated code and makes method easier to testpull/2450/head
parent
72adf0465b
commit
391b92ce56
|
@ -513,8 +513,8 @@ class TTSFactory:
|
||||||
if tts_module != 'mimic':
|
if tts_module != 'mimic':
|
||||||
LOG.exception('The selected TTS backend couldn\'t be loaded. '
|
LOG.exception('The selected TTS backend couldn\'t be loaded. '
|
||||||
'Falling back to Mimic')
|
'Falling back to Mimic')
|
||||||
from mycroft.tts.mimic_tts import Mimic
|
clazz = TTSFactory.CLASSES.get('mimic')
|
||||||
tts = Mimic(tts_lang, tts_config)
|
tts = clazz(tts_lang, tts_config)
|
||||||
tts.validator.validate()
|
tts.validator.validate()
|
||||||
else:
|
else:
|
||||||
LOG.exception('The TTS could not be loaded.')
|
LOG.exception('The TTS could not be loaded.')
|
||||||
|
|
Loading…
Reference in New Issue