Set the Proxy for SpeechRecognition's Legacy Google urllib Path
Launch the job with both relevant proxy variables and distinguish that backend from recognize_google_cloud's separate client.
For the legacy Google backend using urllib's default opener, launch Python with:
http_proxy=http://proxy.example:8080 https_proxy=http://proxy.example:8080 python recognize_job.pyThe backend builds an urllib Request and calls urlopen. A separate Requests session in the surrounding application cannot set that opener's route.
Both variables are relevant because the default legacy endpoint is HTTP. Setting only https_proxy leaves that default HTTP request unconfigured. Their values describe the intermediary protocol. For a test using non-sensitive audio, the HTTP proxy list supplies public candidates for these values.
Set the recognizer's operation_timeout to bound this urlopen operation when needed. A microphone-listening timeout governs an earlier stage.
recognize_google_cloud uses the Google Cloud Speech client instead, with its own transport and authentication. Keep the backend name, effective endpoint and failed stage with the error rather than copying the legacy method into site-packages to change a route already supported by urllib.