From 9c8a81e06fda34ca8fe3084d06c1a58dd43f83a9 Mon Sep 17 00:00:00 2001 From: Hexagon <130850854+Hexer-7@users.noreply.github.com> Date: Sun, 28 Apr 2024 13:56:25 +0300 Subject: [PATCH] Update google.py added ssl to endpoint url, help users who had issue "WinError 10054" --- speech_recognition/recognizers/google.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speech_recognition/recognizers/google.py b/speech_recognition/recognizers/google.py index 9b552be1..9fe17cfd 100644 --- a/speech_recognition/recognizers/google.py +++ b/speech_recognition/recognizers/google.py @@ -32,7 +32,7 @@ class GoogleResponse(TypedDict): class RequestBuilder: - endpoint = "http://www.google.com/speech-api/v2/recognize" + endpoint = "https://www.google.com/speech-api/v2/recognize" def __init__( self, *, key: str, language: str, filter_level: ProfanityFilterLevel @@ -55,7 +55,7 @@ def build_url(self) -> str: """ >>> builder = RequestBuilder(key="awesome-key", language="en-US", filter_level=0) >>> builder.build_url() - 'http://www.google.com/speech-api/v2/recognize?client=chromium&lang=en-US&key=awesome-key&pFilter=0' + 'https://www.google.com/speech-api/v2/recognize?client=chromium&lang=en-US&key=awesome-key&pFilter=0' """ params = urlencode( {