title: Explicitly using service account credentials in code for speech recognition
body: <p>Let it be stated that this is the first time I'm working with Google Cloud, so this is probably a noob question.   </p>
  
  <p>I want to use the Google Cloud Speech library to do some speech to text on an audio file. I also want to explicitly state within the code which Google Cloud service account credentials to use by giving the private key file. How do I do so? </p>
  
  <p>It seems that what I want is a mix of <a href="https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/speech/cloud-client/quickstart.py" rel="nofollow noreferrer">this quickstart for speech recognition</a> and <a href="https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/auth/cloud-client/snippets.py" rel="nofollow noreferrer">this example of how to set credentials within the code</a> (the <code>explicit()</code> part). </p>
  
  <p>I tried doing so, but <code>explicit()</code> uses <code>google.cloud.storage</code> to set the client,</p>
  
  <pre><code>from google.cloud import storage
  storage_client = storage.Client.from_service_account_json('service_account.json')
  </code></pre>
  
  <p>in order to make the API request. </p>
  
  <p>Setting </p>
  
  <pre><code>client = storage.Client.from_service_account_json('service_account.json')
  </code></pre>
  
  <p>and then running </p>
  
  <pre><code>client.recognize(config, audio)
  </code></pre>
  
  <p>obviously throws an error saying that <code>client</code> doesn't have that attribute. My guess is what I need is something similar, but for <code>google.cloud.speech</code>? I have tried looking through the documentation - am I missing something? </p>