File tree Expand file tree Collapse file tree 4 files changed +271
-256
lines changed
main/java/com/example/speech
test/java/com/example/speech Expand file tree Collapse file tree 4 files changed +271
-256
lines changed Original file line number Diff line number Diff line change 3434 </properties >
3535
3636 <dependencies >
37+ <!-- TODO replace with release version -->
3738 <!-- [START dependencies] -->
3839 <dependency >
3940 <groupId >com.google.cloud</groupId >
4041 <artifactId >google-cloud-speech</artifactId >
41- <version >0.23.0 </version >
42+ <version >0.22.1-alpha-SNAPSHOT </version >
4243 </dependency >
4344 <!-- [END dependencies] -->
4445
Original file line number Diff line number Diff line change 1818
1919// [START speech_quickstart]
2020// Imports the Google Cloud client library
21- import com .google .cloud .speech .v1 .RecognitionAudio ;
22- import com .google .cloud .speech .v1 .RecognitionConfig ;
23- import com .google .cloud .speech .v1 .RecognitionConfig .AudioEncoding ;
24- import com .google .cloud .speech .v1 .RecognizeResponse ;
2521import com .google .cloud .speech .v1_1beta1 .SpeechClient ;
26- import com .google .cloud .speech .v1 .SpeechRecognitionAlternative ;
27- import com .google .cloud .speech .v1 .SpeechRecognitionResult ;
22+ import com .google .cloud .speech .v1p1beta1 .RecognitionAudio ;
23+ import com .google .cloud .speech .v1p1beta1 .RecognitionConfig ;
24+ import com .google .cloud .speech .v1p1beta1 .RecognitionConfig .AudioEncoding ;
25+ import com .google .cloud .speech .v1p1beta1 .RecognizeResponse ;
26+ import com .google .cloud .speech .v1p1beta1 .SpeechRecognitionAlternative ;
27+ import com .google .cloud .speech .v1p1beta1 .SpeechRecognitionResult ;
2828import com .google .protobuf .ByteString ;
2929
3030import java .nio .file .Files ;
3333import java .util .List ;
3434
3535public class QuickstartSample {
36+
37+ /**
38+ * Demonstrates using the Speech API to transcribe an audio file.
39+ */
3640 public static void main (String ... args ) throws Exception {
3741 // Instantiates a client
3842 try (SpeechClient speechClient = SpeechClient .create ()) {
You can’t perform that action at this time.
0 commit comments