forked from upstream/IPod-Shuffle-4g
use double dash (--) to indicate start of voiceover text parameter
This commit is contained in:
parent
8863026157
commit
6186600e4c
1 changed files with 3 additions and 3 deletions
|
|
@ -171,21 +171,21 @@ class Text2Speech(object):
|
||||||
def pico2wave(out_wav_path, unicodetext):
|
def pico2wave(out_wav_path, unicodetext):
|
||||||
if not Text2Speech.valid_tts['pico2wave']:
|
if not Text2Speech.valid_tts['pico2wave']:
|
||||||
return False
|
return False
|
||||||
subprocess.call(["pico2wave", "-l", "en-GB", "-w", out_wav_path, unicodetext])
|
subprocess.call(["pico2wave", "-l", "en-GB", "-w", out_wav_path, '--', unicodetext])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def say(out_wav_path, unicodetext):
|
def say(out_wav_path, unicodetext):
|
||||||
if not Text2Speech.valid_tts['say']:
|
if not Text2Speech.valid_tts['say']:
|
||||||
return False
|
return False
|
||||||
subprocess.call(["say", "-o", out_wav_path, '--data-format=LEI16', '--file-format=WAVE', unicodetext])
|
subprocess.call(["say", "-o", out_wav_path, '--data-format=LEI16', '--file-format=WAVE', '--', unicodetext])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def espeak(out_wav_path, unicodetext):
|
def espeak(out_wav_path, unicodetext):
|
||||||
if not Text2Speech.valid_tts['espeak']:
|
if not Text2Speech.valid_tts['espeak']:
|
||||||
return False
|
return False
|
||||||
subprocess.call(["espeak", "-v", "english_rp", "-s", "150", "-w", out_wav_path, unicodetext])
|
subprocess.call(["espeak", "-v", "english_rp", "-s", "150", "-w", out_wav_path, '--', unicodetext])
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue