title: How to stream audio from AngularJS to Google Cloud Speech API
body: <p>I am new to the HTML5 Web Audio API and to Google Cloud Speech API. I am trying to build speech-recognition into an AngularJS application so the user can perform a search using speech-to-text instead of typing into a search with the keyboard.</p>
  
  <p>The intent is to use getUserMedia() to capture and stream audio from the client to the Google <a href="https://cloud.google.com/speech/" rel="nofollow noreferrer">Cloud Speech API</a>, and asynchronously recieve back results.</p>
  
  <p>Google offers a set of <a href="https://cloud.google.com/speech/docs/reference/libraries#client-libraries-install-nodejs" rel="nofollow noreferrer">client libraries</a> that allow you to stream from server-side platforms like C#, Node and Java to their API but I can't find an example showing how I can do either of the following:</p>
  
  <ul>
  <li>Stream audio from AngularJS directly to Google Cloud Speech API</li>
  <li>Stream audio from AngularJS to a custom API that relays the feed to Google Cloud Speech API using a client library</li>
  </ul>
  
  <p>Has anyone found a way to stream audio from an AngularJS/HTML5 client to an API like the Google Cloud Speech API? </p>