title: How to use Google Speech API Asynchronous Speech Recognition in Android
body: <p>I want to convert recorded audio files speech to text. I'm trying to use Google Speech API using <strong>Asynchronous Speech Recognition</strong>. </p>
  
  <p>I have few question on how to proceed.</p>
  
  <p><strong>1 .</strong> I want to convert audio text and don't want it in real-time. So I should use Asynchronous recgonition ?  <br>
  <a href="https://github.com/GoogleCloudPlatform/android-docs-samples/blob/master/speech/Speech/app/src/main/java/com/google/cloud/android/speech/SpeechService.java" rel="nofollow noreferrer">Google sample project</a> uses <strong>SpeechGrpc</strong>. Is it necessary to use in android <em>ASychronous speech recognition</em>? Or I can use <strong>SpeechClient</strong> After authentication ..How?</p>
  
  <p><strong>2 .</strong> <strong>SpeechGrpc</strong> <code>(com.google.cloud.speech.v1.SpeechGrpc)</code> is not present in my package ! (com.google.cloud.speech.v1). I'll have to install it from here? <a href="http://grpc.io" rel="nofollow noreferrer">grpc.io</a> </p>
  
  <p><strong>3 .</strong> I used Google Cloud Platform Console API key to authenticate to the Speech API (<em>ManagedChannel</em> object) but I cant understand how to use it and which function to use for Asynchronous Speech Recognition.</p>
  
  <pre><code>// Authentication 
  
  try {
                  GoogleCredentials creds = GoogleCredentials.fromStream(stream);
                  creds = creds.createScoped(SCOPE);
                  mChannel = ManagedChannelBuilder.forAddress(HOSTNAME, PORT)
                          .intercept(new ClientAuthInterceptor(creds, Executors.newSingleThreadExecutor()))
                          .build();
              }catch (IOException e){
                  Log.e(TAG, "Failed to create channel.", e);
              }
  </code></pre>
  
  <p>So what should I do after authentication. Is there any code reference or documentation for Asynchronous Speech Recognition in android.</p>