title: Amazon Transcribe Streaming service request in PHP or Laravel?
body: <p>I'm a PHP developer, I would like to use transcribe real time transcriptions, but I haven't found documentation for PHP about this tool, do you have a strength?
  For audio translation, I found it, but I didn't find real time.
  Below audio conversion example:</p>
  <pre class="lang-php prettyprint-override"><code> //Storage::disk('temp')-&gt;get('1.mp3');
      // // https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-transcribe-2017-10-26.html
      // https://docs.aws.amazon.com/transcribe/latest/dg/streaming.html
      public function transcribeVoice(Request $request)
      {
          $client = AWS::createClient('transcribeService');
          $path = 'https://audio-job.s3.us-east-2.amazonaws.com/audio.mp3';
          try {
              $result = $client-&gt;getTranscriptionJob([
                  'TranscriptionJobName' =&gt; 'audio-job'
              ]);
              if ($result['TranscriptionJob']['TranscriptionJobStatus'] == 'IN_PROGRESS') {
                  return redirect('/')-&gt;with('status', 'Progressing now');
              } else if ($result['TranscriptionJob']['TranscriptionJobStatus'] == 'COMPLETED') {
                  $file = file_get_contents($result['TranscriptionJob']['Transcript']['TranscriptFileUri']);
                  $json = json_decode($file);
                  $transcript = $json-&gt;results-&gt;transcripts[0]-&gt;transcript;
                  $client-&gt;deleteTranscriptionJob([
                      'TranscriptionJobName' =&gt; 'audio-job', // REQUIRED
                  ]);
                  return redirect('/transcribeVoice')-&gt;with('result', $transcript);
              }
          } catch (Aws\TranscribeService\Exception\TranscribeServiceException $e) {
              $result = $client-&gt;startTranscriptionJob([
                  'LanguageCode' =&gt; 'pt-BR', // REQUIRED
                  'Media' =&gt; [ // REQUIRED
                      'MediaFileUri' =&gt; $path,
                  ],
                  'MediaFormat' =&gt; 'mp3', // REQUIRED
                  'TranscriptionJobName' =&gt; 'audio-job', // REQUIRED
              ]);
              return redirect('/transcribeVoice')-&gt;with('status', 'Progressing now');
          }
      }
  }
  // StartStreamTranscription – Starts a bi-directional HTTP/2 stream where audio is streamed to Amazon Transcribe and the transcription results are streamed to your application.
  // https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.TranscribeService.TranscribeServiceClient.html
  </code></pre>