From 5087be4d34718c53b9c7d0c3a1082b649e0edafa Mon Sep 17 00:00:00 2001 From: maltesrocke <31953184+maltesrocke@users.noreply.github.com> Date: Mon, 2 Oct 2017 16:15:11 +0200 Subject: [PATCH] Update marytts.py INPUT_TEXT can contain unicode-characters which urllib.urlencode might not like and result in an error. Therefore encoding the phrase beforehand. --- plugins/tts/mary-tts/marytts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tts/mary-tts/marytts.py b/plugins/tts/mary-tts/marytts.py index 6f3336c05..85e56e5de 100644 --- a/plugins/tts/mary-tts/marytts.py +++ b/plugins/tts/mary-tts/marytts.py @@ -93,7 +93,7 @@ def say(self, phrase): query = {'OUTPUT_TYPE': 'AUDIO', 'AUDIO': 'WAVE_FILE', 'INPUT_TYPE': 'TEXT', - 'INPUT_TEXT': phrase, + 'INPUT_TEXT': phrase.encode('utf8'), 'LOCALE': self.language, 'VOICE': self.voice}