From 281560045d329d7f6303e1a74159846e5ea7886d Mon Sep 17 00:00:00 2001 From: Andreas Erhard Date: Thu, 3 Aug 2017 22:56:06 +0200 Subject: [PATCH] fixed encoding issues with umlauts in text to speech input ... closes #23 --- soundboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soundboard.py b/soundboard.py index beb27be..5d32c74 100644 --- a/soundboard.py +++ b/soundboard.py @@ -33,7 +33,7 @@ def index(sound=None, text=None, video=None): pitch = request.form.get("pitch", default="") 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("/") video = request.args.get("video")