|
1 | 1 | /*
|
2 |
| - Copyright 2018, Google Inc. |
3 |
| -
|
4 |
| - Licensed under the Apache License, Version 2.0 (the "License"); |
5 |
| - you may not use this file except in compliance with the License. |
6 |
| - You may obtain a copy of the License at |
7 |
| -
|
8 |
| - http://www.apache.org/licenses/LICENSE-2.0 |
9 |
| -
|
10 |
| - Unless required by applicable law or agreed to in writing, software |
11 |
| - distributed under the License is distributed on an "AS IS" BASIS, |
12 |
| - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 |
| - See the License for the specific language governing permissions and |
14 |
| - limitations under the License. |
15 |
| -*/ |
| 2 | + * Copyright 2018 Google Inc. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
16 | 16 |
|
17 | 17 | package com.example.speech;
|
18 | 18 |
|
19 | 19 | import com.google.api.gax.longrunning.OperationFuture;
|
20 | 20 | import com.google.api.gax.rpc.ApiStreamObserver;
|
21 | 21 | import com.google.api.gax.rpc.BidiStreamingCallable;
|
22 |
| -import com.google.cloud.speech.v1p1beta1.SpeechClient; |
23 | 22 | import com.google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata;
|
24 | 23 | import com.google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse;
|
25 | 24 | import com.google.cloud.speech.v1p1beta1.RecognitionAudio;
|
26 | 25 | import com.google.cloud.speech.v1p1beta1.RecognitionConfig;
|
27 | 26 | import com.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding;
|
28 | 27 | import com.google.cloud.speech.v1p1beta1.RecognizeResponse;
|
| 28 | +import com.google.cloud.speech.v1p1beta1.SpeechClient; |
29 | 29 | import com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative;
|
30 | 30 | import com.google.cloud.speech.v1p1beta1.SpeechRecognitionResult;
|
31 | 31 | import com.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig;
|
@@ -448,7 +448,7 @@ public static void transcribeVideoFile(String fileName) throws Exception {
|
448 | 448 | // There can be several alternative transcripts for a given chunk of speech. Just use the
|
449 | 449 | // first (most likely) one here.
|
450 | 450 | SpeechRecognitionAlternative alternative = result.getAlternativesList().get(0);
|
451 |
| - System.out.printf("Transcript : %s\n", alternative.getTranscript()); |
| 451 | + System.out.printf("Transcript : %s\n", alternative.getTranscript()); |
452 | 452 | }
|
453 | 453 | // [END speech_transcribe_model_selection]
|
454 | 454 | }
|
|
0 commit comments