Skip to content

Commit dc54344

Browse files
committed
Improve throughput from YouTube chat arrival to the answer spoken.
1 parent b9cc924 commit dc54344

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
chatai-stream==0.0.3
1+
chatai-stream==1.0.0
22
gTTS==2.3.2
33
deep-translator==1.11.1
44
pydub==0.25.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def _requires_from_file(filename):
1212

1313
setup(
1414
name="chatai-streamer",
15-
version="2.0.0",
15+
version="2.0.1",
1616
license="MIT",
1717
description="ChatGPT answer aloud YouTube chat messages.",
1818
author="General Yadoc",

src/ChatAIStreamer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ def my_answer_cb(self, user_message, completion):
4949
self.answer_cb(user_message, completion)
5050
if self.voice_generator:
5151
while self.__keeping_connection and self.__answer_queue.full():
52+
if self.full_messages_for_ask():
53+
self.__answer_queue.get_nowait()
54+
break
5255
time.sleep(0.01)
5356
if self.__keeping_connection:
5457
self.__answer_queue.put(answerSlot(user_message=user_message, completion=completion))

src/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .ChatAIStreamer import *
22
from .GttsAIStreamer import *
33

4-
__version__ = '2.0.0'
4+
__version__ = '2.0.1'

0 commit comments

Comments
 (0)