I want to convert recorded audio files speech to text. I'm trying to use Google Speech API using Asynchronous Speech Recognition.
I have few question on how to proceed.
1 . I want to convert audio text and don't want it in real-time. So I should use Asynchronous recgonition ?
Google sample project uses SpeechGrpc. Is it necessary to use in android ASychronous speech recognition? Or I can use SpeechClient After authentication ..How?
2 . SpeechGrpc (com.google.cloud.speech.v1.SpeechGrpc)
is not present in my package ! (com.google.cloud.speech.v1). I'll have to install it from here? grpc.io
3 . I used Google Cloud Platform Console API key to authenticate to the Speech API (ManagedChannel object) but I cant understand how to use it and which function to use for Asynchronous Speech Recognition.
// 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);
}
So what should I do after authentication. Is there any code reference or documentation for Asynchronous Speech Recognition in android.