From dd368a52661e631977683e6bbc3bcdc9cc091ff2 Mon Sep 17 00:00:00 2001 From: Nimesh Ghelani Date: Thu, 24 Mar 2016 21:45:50 +0530 Subject: [PATCH] redundant conditions removed --- shuffle.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/shuffle.py b/shuffle.py index 748c143..19c8af2 100755 --- a/shuffle.py +++ b/shuffle.py @@ -102,15 +102,12 @@ class Text2Speech(object): text = unicode(text, 'utf-8') lang = Text2Speech.guess_lang(text) if lang == "ru-RU": - if Text2Speech.valid_tts['RHVoice']: - return Text2Speech.rhvoice(out_wav_path, text) - else: - return False + return Text2Speech.rhvoice(out_wav_path, text) else: - if Text2Speech.valid_tts['pico2wave']: - return Text2Speech.pico2wave(out_wav_path, text) - elif Text2Speech.valid_tts['espeak']: - return Text2Speech.espeak(out_wav_path, text) + if Text2Speech.pico2wave(out_wav_path, text): + return True + elif Text2Speech.espeak(out_wav_path, text): + return True else: return False