title: How to use the AWS Transcribe javascript sdk
body: <p>I am trying to use the <a href="https://www.npmjs.com/package/@aws-sdk/client-transcribe-streaming" rel="nofollow noreferrer">@aws-sdk/client-transcribe-streaming</a> in an Angular project, without any luck.</p>
  <p>The below code is the only example provided by AWS</p>
  <pre class="lang-js prettyprint-override"><code>// ES6+ example
  import {
    TranscribeStreamingClient,
    StartStreamTranscriptionCommand,
  } from &quot;@aws-sdk/client-transcribe-streaming&quot;;
  
  // a client can be shared by different commands.
  const client = new TranscribeStreamingClient({ region: &quot;REGION&quot; });
  
  const params = {
    /** input parameters */
  };
  const command = new StartStreamTranscriptionCommand(params);
  </code></pre>
  <p>As said by the SDK's <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-transcribe-streaming/classes/startstreamtranscriptioncommand.html" rel="nofollow noreferrer">documentation</a>, the <code>StartStreamTranscriptionCommand</code> object expects the <code>params</code> parameter to be of type <a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-transcribe-streaming/interfaces/startstreamtranscriptioncommandinput.html" rel="nofollow noreferrer">StartStreamTranscriptionCommandInput</a>.</p>
  <p>This <code>StartStreamTranscriptionCommandInput</code> object has an <code>AudioStream</code> field that is of type  <code>AsyncIterable&lt;AudioStream&gt;</code>, which is, I assume, the audio stream that will be sent to be transcribed by AWS.</p>
  <p>The problem is that I don't know how to create this <code>AudioStream</code> object, and the only hint that the documentation gives us is that it is a <em>&quot;PCM-encoded stream of audio blobs. The audio stream is encoded as an HTTP2 data frame.&quot;</em></p>
  <p>Any help on how to create an <code>AsyncIterable&lt;AudioStream&gt;</code> will be greatly appreciated.</p>