@@ -258,9 +258,9 @@ def make_channel(*args):
258
258
channel_args .append (args )
259
259
return channel_obj
260
260
261
- def speech_api (channel = None ):
261
+ def speech_api (channel = None , ** kwargs ):
262
262
return _MockGAPICSpeechAPI (response = _make_sync_response (),
263
- channel = channel )
263
+ channel = channel , ** kwargs )
264
264
265
265
host = 'foo.apis.invalid'
266
266
speech_api .SERVICE_ADDRESS = host
@@ -311,10 +311,10 @@ def make_channel(*args):
311
311
channel_args .append (args )
312
312
return channel_obj
313
313
314
- def speech_api (channel = None ):
314
+ def speech_api (channel = None , ** kwargs ):
315
315
return _MockGAPICSpeechAPI (
316
316
response = _make_sync_response (result ),
317
- channel = channel )
317
+ channel = channel , ** kwargs )
318
318
319
319
host = 'foo.apis.invalid'
320
320
speech_api .SERVICE_ADDRESS = host
@@ -407,8 +407,8 @@ def make_channel(*args):
407
407
encoding = speech .Encoding .LINEAR16 ,
408
408
sample_rate = self .SAMPLE_RATE )
409
409
410
- def speech_api (channel = None ):
411
- return _MockGAPICSpeechAPI (channel = channel )
410
+ def speech_api (channel = None , ** kwargs ):
411
+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
412
412
413
413
host = 'foo.apis.invalid'
414
414
speech_api .SERVICE_ADDRESS = host
@@ -463,8 +463,8 @@ def make_channel(*args):
463
463
channel_args .append (args )
464
464
return channel_obj
465
465
466
- def speech_api (channel = None ):
467
- return _MockGAPICSpeechAPI (channel = channel )
466
+ def speech_api (channel = None , ** kwargs ):
467
+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
468
468
469
469
host = 'foo.apis.invalid'
470
470
speech_api .SERVICE_ADDRESS = host
@@ -522,8 +522,9 @@ def make_channel(*args):
522
522
channel_args .append (args )
523
523
return channel_obj
524
524
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 )
527
528
528
529
host = 'foo.apis.invalid'
529
530
speech_api .SERVICE_ADDRESS = host
@@ -599,8 +600,9 @@ def make_channel(*args):
599
600
channel_args .append (args )
600
601
return channel_obj
601
602
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 )
604
606
605
607
host = 'foo.apis.invalid'
606
608
speech_api .SERVICE_ADDRESS = host
@@ -643,8 +645,9 @@ def make_channel(*args):
643
645
channel_args .append (args )
644
646
return channel_obj
645
647
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 )
648
651
649
652
host = 'foo.apis.invalid'
650
653
speech_api .SERVICE_ADDRESS = host
@@ -677,8 +680,8 @@ def make_channel(*args):
677
680
channel_args .append (args )
678
681
return channel_obj
679
682
680
- def speech_api (channel = None ):
681
- return _MockGAPICSpeechAPI (channel = channel )
683
+ def speech_api (channel = None , ** kwargs ):
684
+ return _MockGAPICSpeechAPI (channel = channel , ** kwargs )
682
685
683
686
host = 'foo.apis.invalid'
684
687
speech_api .SERVICE_ADDRESS = host
@@ -720,9 +723,10 @@ class _MockGAPICSpeechAPI(object):
720
723
721
724
SERVICE_ADDRESS = 'foo.apis.invalid'
722
725
723
- def __init__ (self , response = None , channel = None ):
726
+ def __init__ (self , response = None , channel = None , ** kwargs ):
724
727
self ._response = response
725
728
self ._channel = channel
729
+ self ._kwargs = kwargs
726
730
727
731
def async_recognize (self , config , audio ):
728
732
from google .gapic .longrunning .operations_client import OperationsClient
0 commit comments