|
19 | 19 | import com.google.api.gax.grpc.ApiStreamObserver;
|
20 | 20 | import com.google.api.gax.grpc.OperationFuture;
|
21 | 21 | import com.google.api.gax.grpc.StreamingCallable;
|
| 22 | +import com.google.cloud.speech.v1.LongRunningRecognizeMetadata; |
22 | 23 | import com.google.cloud.speech.v1.LongRunningRecognizeResponse;
|
23 | 24 | import com.google.cloud.speech.v1.RecognitionAudio;
|
24 | 25 | import com.google.cloud.speech.v1.RecognitionConfig;
|
@@ -168,7 +169,7 @@ public static void asyncRecognizeFile(String fileName) throws Exception, IOExcep
|
168 | 169 | .build();
|
169 | 170 |
|
170 | 171 | // Use non-blocking call for getting file transcription
|
171 |
| - OperationFuture<LongRunningRecognizeResponse> response = |
| 172 | + OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> response = |
172 | 173 | speech.longRunningRecognizeAsync(config, audio);
|
173 | 174 | while (!response.isDone()) {
|
174 | 175 | System.out.println("Waiting for response...");
|
@@ -207,7 +208,7 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception, IOExceptio
|
207 | 208 | .build();
|
208 | 209 |
|
209 | 210 | // Use non-blocking call for getting file transcription
|
210 |
| - OperationFuture<LongRunningRecognizeResponse> response = |
| 211 | + OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> response = |
211 | 212 | speech.longRunningRecognizeAsync(config, audio);
|
212 | 213 | while (!response.isDone()) {
|
213 | 214 | System.out.println("Waiting for response...");
|
|
0 commit comments