title: ImportError: cannot import name 'texttospeech' from 'google.cloud' (unknown location)
body: <p>Trying to make an extention for my discord bot that converts the input of the user's text to an audio file so that my bot can play that audio.  I just can't figure out why I can't import the <em>google</em> module.</p>
  <pre class="lang-py prettyprint-override"><code>from google.cloud import texttospeech
  
  
  def synthesize_text(text):
  
      &quot;&quot;&quot;Synthesizes speech from the input string of text.&quot;&quot;&quot;
  
      client = texttospeech.TextToSpeechClient()
  
      input_text = texttospeech.SynthesisInput(text=text)
  
      # Note: the voice can also be specified by name.
      # Names of voices can be retrieved with client.list_voices().
  
      voice = texttospeech.VoiceSelectionParams(
  
          language_code=&quot;en-US&quot;,
          name=&quot;en-US-Standard-C&quot;,
          ssml_gender=texttospeech.SsmlVoiceGender.FEMALE,
      )
  
      audio_config = texttospeech.AudioConfig(audio_encoding=texttospeech.AudioEncoding.MP3)
  
      response = client.synthesize_speech(request={&quot;input&quot;: input_text, &quot;voice&quot;: voice, &quot;audio_config&quot;: audio_config})
  
      # The response's audio_content is binary.
  
      with open(&quot;output.mp3&quot;, &quot;wb&quot;) as out:
  
  
          out.write(response.audio_content)
  
          print('Audio content written to file &quot;output.mp3&quot;')
  </code></pre>