def detect_intent_with_texttospeech_response(project_id, session_id, texts,<EOL>language_code):
import dialogflow_v2beta1 as dialogflow<EOL>session_client = dialogflow.SessionsClient()<EOL>session_path = session_client.session_path(project_id, session_id)<EOL>print('<STR_LIT>'.format(session_path))<EOL>for text in texts:<EOL><INDENT>text_input = dialogflow.types.TextInput(<EOL>text=text, language_code=language_code)<EOL>query_input = dialogflow.types.QueryInput(text=text_input)<EOL>output_audio_config = dialogflow.types.OutputAudioConfig(<EOL>audio_encoding=dialogflow.enums.OutputAudioEncoding<EOL>.OUTPUT_AUDIO_ENCODING_LINEAR_16)<EOL>response = session_client.detect_intent(<EOL>session=session_path, query_input=query_input,<EOL>output_audio_config=output_audio_config)<EOL>print('<STR_LIT:=>' * <NUM_LIT:20>)<EOL>print('<STR_LIT>'.format(response.query_result.query_text))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.intent.display_name,<EOL>response.query_result.intent_detection_confidence))<EOL>print('<STR_LIT>'.format(<EOL>response.query_result.fulfillment_text))<EOL>with open('<STR_LIT>', '<STR_LIT:wb>') as out:<EOL><INDENT>out.write(response.output_audio)<EOL>print('<STR_LIT>')<EOL><DEDENT><DEDENT>
Returns the result of detect intent with texts as inputs and includes
    the response in an audio format.

    Using the same `session_id` between requests allows continuation
    of the conversaion.