File tree 4 files changed +271
-256
lines changed
main/java/com/example/speech
test/java/com/example/speech 4 files changed +271
-256
lines changed Original file line number Diff line number Diff line change 34
34
</properties >
35
35
36
36
<dependencies >
37
+ <!-- TODO replace with release version -->
37
38
<!-- [START dependencies] -->
38
39
<dependency >
39
40
<groupId >com.google.cloud</groupId >
40
41
<artifactId >google-cloud-speech</artifactId >
41
- <version >0.23.0 </version >
42
+ <version >0.22.1-alpha-SNAPSHOT </version >
42
43
</dependency >
43
44
<!-- [END dependencies] -->
44
45
Original file line number Diff line number Diff line change 18
18
19
19
// [START speech_quickstart]
20
20
// 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 ;
25
21
import 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 ;
28
28
import com .google .protobuf .ByteString ;
29
29
30
30
import java .nio .file .Files ;
33
33
import java .util .List ;
34
34
35
35
public class QuickstartSample {
36
+
37
+ /**
38
+ * Demonstrates using the Speech API to transcribe an audio file.
39
+ */
36
40
public static void main (String ... args ) throws Exception {
37
41
// Instantiates a client
38
42
try (SpeechClient speechClient = SpeechClient .create ()) {
You can’t perform that action at this time.
0 commit comments