From 8235b8a57eb4c2f2dba0821aba0933a73c1c6280 Mon Sep 17 00:00:00 2001 From: rany Date: Tue, 8 Jun 2021 23:15:20 +0300 Subject: [PATCH] Fix potential bug --- src/edgeTTS/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edgeTTS/__init__.py b/src/edgeTTS/__init__.py index a6ed241..31c66d7 100755 --- a/src/edgeTTS/__init__.py +++ b/src/edgeTTS/__init__.py @@ -122,7 +122,7 @@ class Communicate: if not customspeak: wsmax = 2 ** 16 - overhead = len(self.mkssmlmsg("", voice, pitch, rate, volume, customspeak=False)) + overhead = len(self.mkssmlmsg("", voice, pitch, rate, volume, customspeak=False).encode('utf-8')) msgs = _minimize(escape(removeIncompatibleControlChars(msg)), b" ", wsmax - overhead) async with websockets.connect(