def _make_streaming_request(sample, language_code, max_alternatives, profanity_filter, speech_context, single_utterance, interim_results):
 config = RecognitionConfig(encoding=sample.encoding, sample_rate=sample.sample_rate, language_code=language_code, max_alternatives=max_alternatives, profanity_filter=profanity_filter, speech_context=speech_context)
 streaming_config = StreamingRecognitionConfig(config=config, single_utterance=single_utterance, interim_results=interim_results)
 config_request = StreamingRecognizeRequest(streaming_config=streaming_config)
 return config_request

def _make_streaming_request ( sample , language_code , max_alternatives , profanity_filter , speech_context , single_utterance , interim_results ) : config = RecognitionConfig ( encoding = sample . encoding , sample_rate = sample . sample_rate , language_code = language_code , max_alternatives = max_alternatives , profanity_filter = profanity_filter , speech_context = speech_context ) streaming_config = StreamingRecognitionConfig ( config = config , single_utterance = single_utterance , interim_results = interim_results ) config_request = StreamingRecognizeRequest ( streaming_config = streaming_config ) return config_request
build streaming request .