Windows 10 machine not connecting to websocket server on startup.
Solution
Branch out a Win10-specific websocket communication approach.
Discussion
I do not know if other Windows 10 users are experiencing the same issue. I would love to get some feedback from another Windows 10 user to know more.
Apparently, Win 10 has more than the double of market shares compared to Win 11, so maybe I'm not gonna switch too fast to be able to catch remaining Win 10 issues.
Here is an overview of changes:
Create a lambda function to detected Win10.
Refactor the websocket_communication function:
Extract the bulk of the existing websocket_communication function into a sub function (allows for different approach when connecting to the WS before running it).
Run the code as usual (just invoking the sub-function) for non-Win10 code.
If Win10 is detected, avoid using an async context manager loop (async with websockets.connect(uri) as websocket) that seems to stale here. Create the connection then run the sub-function.
After that, the connection happens. The "Hold spacebar..." message appears. When I hold the spacebar and talk, I have verified that a wav file is created and stored in the temp directory. After that, it's not working as expected (message displayed, sent, message talks to you), but this would be another bug to tackle in another PR.
Verified in Win10 PC and macOS Sonoma 14.3.1 (23D60) for regressions.
Context
Closes #197.
Problem
Windows 10 machine not connecting to websocket server on startup.
Solution
Branch out a Win10-specific websocket communication approach.
Discussion
I do not know if other Windows 10 users are experiencing the same issue. I would love to get some feedback from another Windows 10 user to know more.
Apparently, Win 10 has more than the double of market shares compared to Win 11, so maybe I'm not gonna switch too fast to be able to catch remaining Win 10 issues.
Here is an overview of changes:
websocket_communication
function:websocket_communication
function into a sub function (allows for different approach when connecting to the WS before running it).async with websockets.connect(uri) as websocket
) that seems to stale here. Create the connection then run the sub-function.After that, the connection happens. The "Hold spacebar..." message appears. When I hold the spacebar and talk, I have verified that a wav file is created and stored in the temp directory. After that, it's not working as expected (message displayed, sent, message talks to you), but this would be another bug to tackle in another PR.
Verified in Win10 PC and macOS Sonoma 14.3.1 (23D60) for regressions.