[TTS] Fixes

This commit is contained in:
Bertrand Songis
2017-04-26 13:13:55 +02:00
parent 37155363ff
commit c2a6a20fc1
+2 -2
View File
@@ -29,12 +29,12 @@ sys.path.append(lib_path)
def generate(str, filename):
if 1:
output = "output.wav"
command = 'pico2wave -l=%s -w=%s ""' % (voice, output, str)
command = 'pico2wave -l=%s -w=%s "%s"' % (voice, output, str)
else:
output = "output.mp3"
command = 'gtts-cli -l %s -o %s "%s"' % (voice[:2], output, str)
os.system(command.encode('utf-8'))
command = "sox %s %s reverse silence 1 0.1 0.1% reverse" % (output, filename)
command = "sox %s -r 32000 %s reverse silence 1 0.1 0.1%% reverse" % (output, filename)
os.system(command.encode('utf-8'))
################################################################