@@ -258,9 +258,9 @@ def make_channel(*args):
258258 channel_args .append (args )
259259 return channel_obj
260260
261- def speech_api (channel = None ):
261+ def speech_api (channel = None , ** kwargs ):
262262 return _MockGAPICSpeechAPI (response = _make_sync_response (),
263- channel = channel )
263+ channel = channel , ** kwargs )
264264
265265 host = 'foo.apis.invalid'
266266 speech_api .SERVICE_ADDRESS = host
@@ -311,10 +311,10 @@ def make_channel(*args):
311311 channel_args .append (args )
312312 return channel_obj
313313
314- def speech_api (channel = None ):
314+ def speech_api (channel = None , ** kwargs ):
315315 return _MockGAPICSpeechAPI (
316316 response = _make_sync_response (result ),
317- channel = channel )
317+ channel = channel , ** kwargs )
318318
319319 host = 'foo.apis.invalid'
320320 speech_api .SERVICE_ADDRESS = host
@@ -407,8 +407,8 @@ def make_channel(*args):
407407 encoding = speech .Encoding .LINEAR16 ,
408408 sample_rate = self .SAMPLE_RATE )
409409
410- def speech_api (channel = None ):
411- return _MockGAPICSpeechAPI (channel = channel )
410+ def speech_api (channel = None , ** kwargs ):
411+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
412412
413413 host = 'foo.apis.invalid'
414414 speech_api .SERVICE_ADDRESS = host
@@ -463,8 +463,8 @@ def make_channel(*args):
463463 channel_args .append (args )
464464 return channel_obj
465465
466- def speech_api (channel = None ):
467- return _MockGAPICSpeechAPI (channel = channel )
466+ def speech_api (channel = None , ** kwargs ):
467+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
468468
469469 host = 'foo.apis.invalid'
470470 speech_api .SERVICE_ADDRESS = host
@@ -522,8 +522,9 @@ def make_channel(*args):
522522 channel_args .append (args )
523523 return channel_obj
524524
525- def speech_api (channel = None ):
526- return _MockGAPICSpeechAPI (channel = channel , response = responses )
525+ def speech_api (channel = None , ** kwargs ):
526+ return _MockGAPICSpeechAPI (channel = channel , response = responses ,
527+ ** kwargs )
527528
528529 host = 'foo.apis.invalid'
529530 speech_api .SERVICE_ADDRESS = host
@@ -599,8 +600,9 @@ def make_channel(*args):
599600 channel_args .append (args )
600601 return channel_obj
601602
602- def speech_api (channel = None ):
603- return _MockGAPICSpeechAPI (channel = channel , response = responses )
603+ def speech_api (channel = None , ** kwargs ):
604+ return _MockGAPICSpeechAPI (channel = channel , response = responses ,
605+ ** kwargs )
604606
605607 host = 'foo.apis.invalid'
606608 speech_api .SERVICE_ADDRESS = host
@@ -643,8 +645,9 @@ def make_channel(*args):
643645 channel_args .append (args )
644646 return channel_obj
645647
646- def speech_api (channel = None ):
647- return _MockGAPICSpeechAPI (channel = channel , response = responses )
648+ def speech_api (channel = None , ** kwargs ):
649+ return _MockGAPICSpeechAPI (channel = channel , response = responses ,
650+ ** kwargs )
648651
649652 host = 'foo.apis.invalid'
650653 speech_api .SERVICE_ADDRESS = host
@@ -677,8 +680,8 @@ def make_channel(*args):
677680 channel_args .append (args )
678681 return channel_obj
679682
680- def speech_api (channel = None ):
681- return _MockGAPICSpeechAPI (channel = channel )
683+ def speech_api (channel = None , ** kwargs ):
684+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
682685
683686 host = 'foo.apis.invalid'
684687 speech_api .SERVICE_ADDRESS = host
@@ -720,9 +723,10 @@ class _MockGAPICSpeechAPI(object):
720723
721724 SERVICE_ADDRESS = 'foo.apis.invalid'
722725
723- def __init__ (self , response = None , channel = None ):
726+ def __init__ (self , response = None , channel = None , ** kwargs ):
724727 self ._response = response
725728 self ._channel = channel
729+ self ._kwargs = kwargs
726730
727731 def async_recognize (self , config , audio ):
728732 from google .gapic .longrunning .operations_client import OperationsClient
0 commit comments