|
18 | 18 |
|
19 | 19 | import com.google.api.gax.rpc.ApiStreamObserver; |
20 | 20 | import com.google.api.gax.rpc.BidiStreamingCallable; |
21 | | -import com.google.api.gax.rpc.OperationFuture; |
| 21 | +import com.google.api.gax.longrunning.OperationFuture; |
22 | 22 | import com.google.cloud.speech.v1.LongRunningRecognizeMetadata; |
23 | 23 | import com.google.cloud.speech.v1.LongRunningRecognizeResponse; |
24 | 24 | import com.google.cloud.speech.v1.RecognitionAudio; |
|
34 | 34 | import com.google.cloud.speech.v1.StreamingRecognizeResponse; |
35 | 35 | import com.google.cloud.speech.v1.WordInfo; |
36 | 36 | import com.google.common.util.concurrent.SettableFuture; |
37 | | -import com.google.longrunning.Operation; |
38 | 37 | import com.google.protobuf.ByteString; |
39 | 38 | import java.io.IOException; |
40 | 39 | import java.nio.file.Files; |
@@ -221,8 +220,7 @@ public static void asyncRecognizeFile(String fileName) throws Exception, IOExcep |
221 | 220 | .build(); |
222 | 221 |
|
223 | 222 | // Use non-blocking call for getting file transcription |
224 | | - OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata, |
225 | | - Operation> response = |
| 223 | + OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> response = |
226 | 224 | speech.longRunningRecognizeAsync(config, audio); |
227 | 225 |
|
228 | 226 | while (!response.isDone()) { |
@@ -263,8 +261,7 @@ public static void asyncRecognizeWords(String gcsUri) throws Exception, IOExcept |
263 | 261 | .build(); |
264 | 262 |
|
265 | 263 | // Use non-blocking call for getting file transcription |
266 | | - OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata, |
267 | | - Operation> response = |
| 264 | + OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> response = |
268 | 265 | speech.longRunningRecognizeAsync(config, audio); |
269 | 266 | while (!response.isDone()) { |
270 | 267 | System.out.println("Waiting for response..."); |
@@ -311,8 +308,7 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception, IOExceptio |
311 | 308 | .build(); |
312 | 309 |
|
313 | 310 | // Use non-blocking call for getting file transcription |
314 | | - OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata, |
315 | | - Operation> response = |
| 311 | + OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> response = |
316 | 312 | speech.longRunningRecognizeAsync(config, audio); |
317 | 313 | while (!response.isDone()) { |
318 | 314 | System.out.println("Waiting for response..."); |
|
0 commit comments