-
Notifications
You must be signed in to change notification settings - Fork 391
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
get connection closed error when sending long file to Streaming Server from online_websocket_client_decode_file #1363
Comments
could you post complete.logs and describe how to.reproduce it? |
Sure, the audio file I am sending is from a public repo: I converted it to .wav format with 16k sampling rate using ffmpeg I am sending a 55 plus minute audio file using this command: python3 online-websocket-client-decode-file.py --server-addr localhost --server-port 6005 --seconds-per-message 0.1 --samples-per-message 16000 ./test_audio/4320211.wav I start the server using this command: python3 streming_server_tests.py --tokens=./sherpa-onnx-streaming-zipformer-en-2023-06-21/tokens.txt --encoder=./sherpa-onnx-streaming-zipformer-en-2023-06-21/encoder-epoch-99-avg-1.onnx --decoder=./sherpa-onnx-streaming-zipformer-en-2023-06-21/decoder-epoch-99-avg-1.onnx --joiner=./sherpa-onnx-streaming-zipformer-en-2023-06-21/joiner-epoch-99-avg-1.onnx --port=6005 This is the error log: The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
What is inside |
It is the same as streaming_server.py. I had to change the name as I had multiple files. I tried again with the streaming_server.py file from GitHub, and get same error in the online wbesocket client decode file logs: Traceback (most recent call last): |
Could you add some log messages in your client code and try to find how many samples it has sent before it throws? |
I printed logs in streaming server to see how many samples are being received stream.accept_waveform(sample_rate=self.sample_rate, waveform=samples) Logs show: length of samples received is 16000 I printed logs in online websocket client decode file in the run function
Logs show: length of sent data 64000 even before the error the logs show the same in both client and server |
Hello I get the following error when sending a long file >50 mins. File format is 16k sampling rate.
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1289, in close_connection
await self.transfer_data_task
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 955, in transfer_data
message = await self.read_message()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1025, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1113, in read_data_frame
await self.write_close_frame(self.close_rcvd, frame.data)
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1226, in write_close_frame
await self.write_frame(True, OP_CLOSE, data, _state=State.CLOSING)
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1201, in write_frame
await self.drain()
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 1182, in drain
async with self._drain_lock:
File "/usr/lib/python3.12/asyncio/locks.py", line 14, in aenter
await self.acquire()
File "/usr/lib/python3.12/asyncio/locks.py", line 113, in acquire
await fut
asyncio.exceptions.CancelledError
async for message in socket:
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 494, in aiter
yield await self.recv()
^^^^^^^^^^^^^^^^^
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 564, in recv
await self.ensure_open()
File "/home/sherpa-onnx/python-api-examples/lib/python3.12/site-packages/websockets/legacy/protocol.py", line 940, in ensure_open
raise self.connection_closed_exc()
The text was updated successfully, but these errors were encountered: