LLMChat icon indicating copy to clipboard operation
LLMChat copied to clipboard

Dialogue is cut off at the end when using voice chat

Open hc20k opened this issue 1 year ago • 2 comments

Not sure why this is happening. Might need to add silence to the end of the audio data.

hc20k avatar Apr 19 '23 08:04 hc20k

same issue found this the nohup file. also you should put a reminder that ffmpeg is required to use tts somewher. is pretty cool though if kinda inconstant [04-19 22:47:43] [gateway.py:188] WARNING - Shard ID None voice heartbeat blocked for more than 10 seconds Loop thread traceback (most recent call last): File "/root/bb/main.py", line 10, in client = DiscordClient(config) File "/root/bb/llmchat/client.py", line 128, in init self.run( File "/root/bb/brick/lib/python3.10/site-packages/discord/client.py", line 860, in run asyncio.run(runner()) File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/root/bb/brick/lib/python3.10/site-packages/discord/client.py", line 441, in _run_event await coro(*args, **kwargs) File "/root/bb/llmchat/client.py", line 534, in on_message buf = await self.tts.generate_speech(response) File "/root/bb/llmchat/tts_sources/elevenlabs.py", line 8, in generate_speech data = generate(content, self.config.elevenlabs_key, voice=self.config.elevenlabs_voice) File "/root/bb/brick/lib/python3.10/site-packages/elevenlabs/init.py", line 106, in generate return TTS.generate(text, voice) File "/root/bb/brick/lib/python3.10/site-packages/elevenlabs/api/tts.py", line 14, in generate response = API.post(url, data=data) File "/root/bb/brick/lib/python3.10/site-packages/elevenlabs/api/base.py", line 52, in post return API.request(url, method="post", *args, **kwargs) # type: ignore File "/root/bb/brick/lib/python3.10/site-packages/elevenlabs/api/base.py", line 30, in request response = requests.post( File "/root/bb/brick/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/root/bb/brick/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/root/bb/brick/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/root/bb/brick/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/root/bb/brick/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/root/bb/brick/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/root/bb/brick/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse response.begin() File "/usr/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/lib/python3.10/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) File "/usr/lib/python3.10/ssl.py", line 1274, in recv_into return self.read(nbytes, buffer) File "/usr/lib/python3.10/ssl.py", line 1130, i

lameTookan avatar Apr 19 '23 22:04 lameTookan

The event loop blocking issue should be fixed in the latest commit. Speech recognition is a little inconsistent, I find that it's good when I'm using whisper instead of google. Also, thanks for the ffmpeg suggestion, I added it to the README. :)

hc20k avatar Apr 21 '23 09:04 hc20k