title: Using Google Speech Recognition API with PHP
body: <p>I want to make a simple script that uses google speech recognition, I have tried various ways so that I can access the API with Request Body, but has always failed.</p>
  
  <p>Example URL: <a href="https://content-speech.googleapis.com/v1/speech:recognize?prettyPrint=true&amp;alt=json&amp;key=AIzaSyD-XXXXXXXXXXXXXXXXX-Al7hLQDbugrDcw" rel="nofollow noreferrer">https://content-speech.googleapis.com/v1/speech:recognize?prettyPrint=true&amp;alt=json&amp;key=AIzaSyD-XXXXXXXXXXXXXXXXX-Al7hLQDbugrDcw</a></p>
  
  <p>JSON example:</p>
  
  <pre><code>{
  "audio": {
      "content": "ZkxhQwAAACIEg....more......FzSi6SngVApeE="
    },
    "config": {
      "encoding": "FLAC",
      "sampleRateHertz": 16000,
      "languageCode": "en-US"
    }
  }
  </code></pre>