title: dialogflow - ImportError: cannot import name 'AgentsClient'
body: <p>I'm a noob with dialogue flow. Here is the audio-to-text code that I'm using.
  I googled the error but couldn't find a solution. Any help is appreciated. Thank you!</p>
  <pre><code>import os
  import dialogflow_v2 as dialogflow
  from dialogflow_v2 import AgentsClient
  os.environ[&quot;GOOGLE_APPLICATION_CREDENTIALS&quot;] = r&quot;D:\Resume building\gcloudtstuff24Jan2020\testing-302710-cc7fef4033ff.json&quot;
  project_id = '*******'
  session_id = &quot;ayesha&quot;
  audio_file_path = r'C:\Users\ayesha\Downloads\sample - mp3 inserted.wav'
  language_code = 'en'
  def detect_intent_audio(project_id, session_id, audio_file_path, language_code):
      &quot;&quot;&quot;Returns the result of detect intent with an audio file as input.
  
      Using the same `session_id` between requests allows continuation
      of the conversation.&quot;&quot;&quot;
      from google.cloud import dialogflow
  
      session_client = dialogflow.SessionsClient()
  
      # Note: hard coding audio_encoding and sample_rate_hertz for simplicity.
      audio_encoding = dialogflow.AudioEncoding.AUDIO_ENCODING_LINEAR_16
      sample_rate_hertz = 16000
  
      session = session_client.session_path(project_id, session_id)
      print(&quot;Session path: {}\n&quot;.format(session))
  
      with open(audio_file_path, &quot;rb&quot;) as audio_file:
          input_audio = audio_file.read()
  
      audio_config = dialogflow.InputAudioConfig(
          audio_encoding=audio_encoding,
          language_code=language_code,
          sample_rate_hertz=sample_rate_hertz,
      )
      query_input = dialogflow.QueryInput(audio_config=audio_config)
  
      request = dialogflow.DetectIntentRequest(
          session=session,
          query_input=query_input,
          input_audio=input_audio,
      )
      response = session_client.detect_intent(request=request)
  
      print(&quot;=&quot; * 20)
      print(&quot;Query text: {}&quot;.format(response.query_result.query_text))
      print(
          &quot;Detected intent: {} (confidence: {})\n&quot;.format(
              response.query_result.intent.display_name,
              response.query_result.intent_detection_confidence,
          )
      )
      print(&quot;Fulfillment text: {}\n&quot;.format(response.query_result.fulfillment_text))
      
  detect_intent_audio(project_id, session_id, audio_file_path, language_code)    dialogflow services.
  </code></pre>
  <p>And I am getting</p>
  <blockquote>
  <p>ImportError: cannot import name 'AgentsClient'</p>
  </blockquote>