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

Fix WinError 10054 #751

Closed
wants to merge 1 commit into from
Closed

Fix WinError 10054 #751

wants to merge 1 commit into from

Conversation

Hexer-7
Copy link

@Hexer-7 Hexer-7 commented Apr 28, 2024

added SSL to "endpoint" url, help users who had issue "WinError 10054"

added ssl to endpoint url, help users who had issue "WinError 10054"
@ftnext
Copy link
Collaborator

ftnext commented Apr 29, 2024

@Hexer-7 Thanks! Could you tell me the link of "WinError 10054" issue?

@ftnext ftnext changed the title Update google.py Fix WinError 10054 Apr 30, 2024
@Hexer-7
Copy link
Author

Hexer-7 commented May 1, 2024

#733

@ftnext
Copy link
Collaborator

ftnext commented May 1, 2024

@Hexer-7 Thanks. Could you please demonstrate how this pull request addresses the issue?

@Hexer-7
Copy link
Author

Hexer-7 commented May 2, 2024

This issue has personally confronted me, and I've tried to investigate its causes.
I noticed that sometimes when running the code in PyCharm, the server responds once, then stops responding, leading to the "WinError 10054" problem.
I suspect that the firewall is rejecting access in a certain way.
However, what's certain is that when I attempted to extract the speech-to-text API from Chrome, I noticed it was sending requests to "https://www.google.com/speech-api/full-duplex/v1/up".
This caught my attention, comparing it to the link in the library, which lacks SSL.
I modified the library's link, adding SSL to it, and observed that the problem was completely resolved.
Therefore, I believe that the cause of the problem is SSL-related, possibly due to the type of connection used or the firewall.
I'm not entirely sure, but this solution emerged from my experimentation, and I hope it proves useful.

ftnext added a commit to ftnext/speech_recognition that referenced this pull request May 5, 2024
@ftnext
Copy link
Collaborator

ftnext commented May 5, 2024

@Hexer-7 Thank you very much for your detailed reply.
It convinced me that adding SSL to "endpoint" url is helpful.

When specifying a specific URL, various approaches can be considered.
In addition to hardcoding, there may be implementations that allow users to pass URLs as well.
My idea: #754
I think it is better for users to pass URL than hardcoding.

I close this PR, but I appreciate your investigation and proposal.
Many thanks

@ftnext ftnext closed this May 5, 2024
@ftnext ftnext added needinfo and removed needinfo labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants