From eb75caca4803c06978f6da81fd1929a1ac949496 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Aug 2021 11:07:02 +0530 Subject: [PATCH] Fix read aloud not working on mobile browsers Chrome now has a ridiculously small limit on utterance sizes. Capping it at 2K seems to work, though of course the whole thing is pointless since speech gets interrupted when the phone screen turns off due to inactivity. --- src/pyj/read_book/tts.pyj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyj/read_book/tts.pyj b/src/pyj/read_book/tts.pyj index 998d72250f..0e29c4fe0f 100644 --- a/src/pyj/read_book/tts.pyj +++ b/src/pyj/read_book/tts.pyj @@ -126,7 +126,7 @@ class Client: self.onevent = onevent buf = v'[]' size = 0 - limit = 24000 + limit = 2048 def commit(): nonlocal buf, size