fixed encoding issues with umlauts in text to speech input

... closes #23
This commit is contained in:
Erhard 2017-08-03 22:56:06 +02:00
parent 6a77fa054d
commit 281560045d

View File

@ -33,7 +33,7 @@ def index(sound=None, text=None, video=None):
pitch = request.form.get("pitch", default="") pitch = request.form.get("pitch", default="")
pitch = pitch if pitch.strip() != "" else "50" pitch = pitch if pitch.strip() != "" else "50"
subprocess.Popen(["espeak", "-v", voice, "-s", speed, "-p", pitch, text], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) subprocess.Popen(["espeak", "-v", voice, "-s", speed, "-p", pitch, text.encode("utf-8")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return redirect("/") return redirect("/")
video = request.args.get("video") video = request.args.get("video")