Skip navigation links

Package com.google.cloud.speech.v1beta1

A client to Google Cloud Speech API.

See: Description

Package com.google.cloud.speech.v1beta1 Description

A client to Google Cloud Speech API.

The interfaces provided are listed below, along with usage samples.

============ SpeechClient ============

Service Description: Service that implements Google Cloud Speech API.

Sample for SpeechClient:

 
 try (SpeechClient speechClient = SpeechClient.create()) {
   RecognitionConfig.AudioEncoding encoding = RecognitionConfig.AudioEncoding.FLAC;
   int sampleRate = 44100;
   RecognitionConfig config = RecognitionConfig.newBuilder()
     .setEncoding(encoding)
     .setSampleRate(sampleRate)
     .build();
   String uri = "gs://bucket_name/file_name.flac";
   RecognitionAudio audio = RecognitionAudio.newBuilder()
     .setUri(uri)
     .build();
   SyncRecognizeResponse response = speechClient.syncRecognize(config, audio);
 }
 
 
Skip navigation links

Copyright © 2018 Google LLC. All rights reserved.