3aa5e7f2896b2e03bdb749d139140505eaa537cd,speech/grpc/transcribe_streaming.py,,make_channel,#Any#Any#,45
Before Change
def make_channel (host, port) :
Creates an SSL channel with auth credentials from the environment.
ssl_channel = implementations.ssl_channel_credentials(None, None, None)
creds = credentials.get_credentials().create_scoped([SPEECH_SCOPE])
auth_header = (
"Authorization" ,
"Bearer " + creds.get_access_token().access_token)
auth_plugin = implementations.metadata_call_credentials(
lambda _, cb: cb([auth_header], None),
name="google_creds" )
composite_channel = implementations.composite_channel_credentials(
ssl_channel, auth_plugin)
return implementations.secure_channel(host, port, composite_channel)
def _audio_data_generator (buff) :
A generator that yields all available data in the given buffer.
After Change
def make_channel (host, port) :
Creates a secure channel with auth credentials from the environment.
credentials , _ = google.auth.default (scopes=[SPEECH_SCOPE])
http_request = google.auth.transport.requests.Request()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 3aa5e7f2896b2e03bdb749d139140505eaa537cd
Time: 2016-12-15
Author: jonwayne@google.com
File Name: speech/grpc/transcribe_streaming.py
Class Name:
Method Name: make_channel
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 3aa5e7f2896b2e03bdb749d139140505eaa537cd
Time: 2016-12-15
Author: jonwayne@google.com
File Name: speech/grpc/transcribe.py
Class Name:
Method Name: make_channel
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 3aa5e7f2896b2e03bdb749d139140505eaa537cd
Time: 2016-12-15
Author: jonwayne@google.com
File Name: speech/grpc/transcribe_async.py
Class Name:
Method Name: make_channel