redundant conditions removed

This commit is contained in:
Nimesh Ghelani 2016-03-24 21:45:50 +05:30
parent 7d07168c0d
commit dd368a5266

View file

@ -102,15 +102,12 @@ class Text2Speech(object):
text = unicode(text, 'utf-8') text = unicode(text, 'utf-8')
lang = Text2Speech.guess_lang(text) lang = Text2Speech.guess_lang(text)
if lang == "ru-RU": if lang == "ru-RU":
if Text2Speech.valid_tts['RHVoice']:
return Text2Speech.rhvoice(out_wav_path, text) return Text2Speech.rhvoice(out_wav_path, text)
else: else:
return False if Text2Speech.pico2wave(out_wav_path, text):
else: return True
if Text2Speech.valid_tts['pico2wave']: elif Text2Speech.espeak(out_wav_path, text):
return Text2Speech.pico2wave(out_wav_path, text) return True
elif Text2Speech.valid_tts['espeak']:
return Text2Speech.espeak(out_wav_path, text)
else: else:
return False return False