Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CartesiaTTSService: Potential Bug in WebSocket Handling #471

Open
amacapri opened this issue Sep 18, 2024 · 0 comments
Open

CartesiaTTSService: Potential Bug in WebSocket Handling #471

amacapri opened this issue Sep 18, 2024 · 0 comments

Comments

@amacapri
Copy link

amacapri commented Sep 18, 2024

Occasionally, I encounter this error in CartesiaTTSService. Could this be a bug in the CartesiaTTSService, the Cartesia library, or my code?

2024-09-18 09:25:01.202 | ERROR | pipecat.services.cartesia:_receive_task_handler:189 - CartesiaTTSService#0 exception: no close frame received or sent
Traceback (most recent call last):

File "/Users/magnacarta/p/sunray/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 963, in transfer_data
message = await self.read_message()
│ └ <function WebSocketCommonProtocol.read_message at 0x13c9f4360>
└ <websockets.legacy.client.WebSocketClientProtocol object at 0x175ec6fc0>
File "/Users/magnacarta/p/sunray/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1033, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
│ │ │ └ 1048576
│ │ └ <websockets.legacy.client.WebSocketClientProtocol object at 0x175ec6fc0>
│ └ <function WebSocketCommonProtocol.read_data_frame at 0x13c9f4400>
└ <websockets.legacy.client.WebSocketClientProtocol object at 0x175ec6fc0>
File "/Users/magnacarta/p/sunray/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1108, in read_data_frame
frame = await self.read_frame(max_size)
│ │ └ 1048576
│ └ <function WebSocketCommonProtocol.read_frame at 0x13c9f44a0>
└ <websockets.legacy.client.WebSocketClientProtocol object at 0x175ec6fc0>
File "/Users/magnacarta/p/sunray/.venv/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1165, in read_frame
frame = await Frame.read(
│ └ <classmethod(<function Frame.read at 0x13c9cefc0>)>
└ <class 'websockets.legacy.framing.Frame'>
File "/Users/magnacarta/p/sunray/.venv/lib/python3.12/site-packages/websockets/legacy/framing.py", line 68, in read
data = await reader(2)
└ <bound method StreamReader.readexactly of <StreamReader eof limit=32768 transport=<asyncio.sslproto._SSLProtocolTransport obj...

File "/opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/streams.py", line 750, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
│ │ │ └ 2
│ │ └ b''
│ └ <class 'asyncio.exceptions.IncompleteReadError'>
└ <module 'asyncio.exceptions' from '/opt/homebrew/Cellar/[email protected]/3.12.6/Frameworks/Python.framework/Versions/3.12/lib/pyth...

asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 2 expected bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant