alphacep / alphacep/vosk-server

"Incorrect Masking" Error in WebSocket Communication with Vosk Server

Đang mở
#243 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1.3k
Fork
317
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I’m reaching out regarding a recurring issue with the Vosk server when interfacing with FreeSWITCH’s mod_vosk. We have a setup where FreeSWITCH with mod_vosk is on one EC2 instance, and the Vosk server on another, both using Debian. Despite following your setup instructions, we're stuck with an "incorrect masking" error in WebSocket communications.

Here's the situation:

Real-time transcription works fine most of the time.
We often run into an "incorrect masking" error during WebSocket communication. What's puzzling is that this doesn't always happen; sometimes the WebSocket connection stays up without any issues.

Error:
ERROR:websockets.server:Error in connection handler
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/lib/python3/dist-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/lib/python3/dist-packages/websockets/framing.py", line 116, in read
raise ProtocolError("incorrect masking")
websockets.exceptions.ProtocolError: incorrect masking

Steps we've taken:

Compiled and installed a custom libks library from Alphacep’s vosk-fix branch, aimed at addressing WebSocket issues. We made sure mod_vosk is linked to this custom libks, which we verified using the ldd command.

Our Vosk server is set up using the standard Docker command:
docker run -d -p 2700:2700 alphacep/kaldi-en:latest

Despite these measures, the "incorrect masking" error keeps cropping up. It's hit or miss – sometimes it occurs, other times everything works smoothly. Any advice or suggestions you can provide to get past this would be appreciated. Let me know if you need logs or more details.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.