-
Notifications
You must be signed in to change notification settings - Fork 249
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
"Incorrect Masking" Error in WebSocket Communication with Vosk Server #243
Comments
Its likely you have another module which links to default libks and sometimes it loads first. You can add the debug print statement to alphacep libks library to see that it is actually used. |
Thank you for your quick reply and the guidance provided. Despite following your suggestions, I'm still experiencing the "incorrect masking" issue in the Vosk server, which occurs after about 30 seconds of real-time transcription using the mod_vosk module in FreeSWITCH. Here's an overview of the steps I've taken:
Despite these steps, the issue persists. I'm using Debian 10 Buster for this setup. Interestingly, no new entries appear in the libks log file when the "incorrect masking" error occurs, indicating that the mod_vosk module might not be utilizing the Could you provide any further advice or specific build instructions to ensure the mod_vosk module in FreeSWITCH consistently utilizes the Thank you once again for your assistance and looking forward to any additional guidance you can offer. |
You can give me shell access to your server, I will take a look |
Thank you for offering to take a look at the server issue. I agree that direct access might be the most efficient way to diagnose the problem. For security reasons, we need to share the access credentials privately. Could you please provide a secure method of contact or suggest a preferred way for me to send you these details securely? Thank you for your understanding and assistance.
Al
… On Jan 16, 2024, at 5:33 PM, Nickolay V. Shmyrev ***@***.***> wrote:
You can give me shell access to your server, I will take a look
—
Reply to this email directly, view it on GitHub <#243 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK7UTRCBS7TE6G75LKMYEDTYO353TAVCNFSM6AAAAABB3PRXXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJUGYZDQOBVGY>.
You are receiving this because you authored the thread.
|
I've made some progress on the issue. After compiling FreeSWITCH in debug mode with the following configuration command: ./configure --with-lua=/usr/include/lua5.1 --enable-core-pgsql-support CFLAGS="-g -O0" I can confirm that I now see the log entries from the custom logging functionality I added in |
|
Thank you for checking the setup. Based on your observation about the "incorrect masking" message being possibly related to the way libks finalizes connections on close, I conducted further testing. I discovered an issue with the NAT configuration in However, I've encountered a new error in FreeSWITCH that consistently appears after receiving transcription results from the Vosk server:
This error is logged immediately following the transcription data responses and begins to occur around the 1.5 to 2-minute mark of ongoing transcription activity. Despite the error message, the transcription service continues to function and return partial results. The regularity of the error, following every data exchange with Vosk, suggests an issue with event handling in FreeSWITCH's IVR system. Here's a snippet of the log with the error marked:
Given the error's non-impact on the transcription's continuity, it might not be critical; however, the fact that this error persists until the call is dropped suggests a potential underlying issue in the event queue mechanism. Additionally, I've checked the vosk-server side and haven't noticed any errors corresponding to these occurrences. Could you advise if this is an error that can be safely ignored? I'm concerned it might lead to more problematic behavior when there are multiple, simultaneous transcriptions occurring. Thank you once again for your assistance. |
Event queue failed means that event queue is full. There is a limit of 5000 events there. You need something to pull events from the queue and it will be fine. |
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.
The text was updated successfully, but these errors were encountered: