mirror of
https://github.com/nims11/IPod-Shuffle-4g.git
synced 2025-12-07 16:08:00 +09:00
redundant conditions removed
This commit is contained in:
parent
7d07168c0d
commit
dd368a5266
1 changed files with 5 additions and 8 deletions
13
shuffle.py
13
shuffle.py
|
|
@ -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:
|
|
||||||
return False
|
|
||||||
else:
|
else:
|
||||||
if Text2Speech.valid_tts['pico2wave']:
|
if Text2Speech.pico2wave(out_wav_path, text):
|
||||||
return Text2Speech.pico2wave(out_wav_path, text)
|
return True
|
||||||
elif Text2Speech.valid_tts['espeak']:
|
elif Text2Speech.espeak(out_wav_path, text):
|
||||||
return Text2Speech.espeak(out_wav_path, text)
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue