Reputation: 270
How to use the Google Speech To Text API behind the Proxy Settings in the iOS application? When I am trying to create the connection behind the proxy I am getting "Failed to create subchannel" error. Please suggest any solution to resolve this error.
Upvotes: 11
Views: 1736
Reputation: 97
Simply Add following line in your python code
import os
os.environ["http_proxy"] = "http://<ip>:<port>"
os.environ["https_proxy"] = "https://<ip>:<port>"
Example: http://10.78.21.2:8082
Upvotes: 1
Reputation: 2395
As per this answer Google clients (among them Speech to text client) honor http_proxy
or https_proxy
environment variables.
Consider connecting to Google Speech to text API using Google cloud client or peep into the code and try implementing similar proxy solution.
Here's Python client and there are clients for other languages too
https://github.com/googleapis/google-cloud-python
Upvotes: 0