@@ -338,16 +338,17 @@ public static void asyncRecognizeWords(String gcsUri) throws Exception {
338338 public static void asyncRecognizeGcs (String gcsUri ) throws Exception {
339339 // Configure polling algorithm
340340 SpeechSettings .Builder speechSettings = SpeechSettings .newBuilder ();
341- TimedRetryAlgorithm timedRetryAlgorithm = OperationTimedPollAlgorithm .create (
342- RetrySettings .newBuilder ()
343- .setInitialRetryDelay (Duration .ofMillis (500L ))
344- .setRetryDelayMultiplier (1.5 )
345- .setMaxRetryDelay (Duration .ofMillis (5000L ))
346- .setInitialRpcTimeout (Duration .ZERO ) // ignored
347- .setRpcTimeoutMultiplier (1.0 ) // ignored
348- .setMaxRpcTimeout (Duration .ZERO ) // ignored
349- .setTotalTimeout (Duration .ofHours (24L )) // set polling timeout to 24 hours
350- .build ());
341+ TimedRetryAlgorithm timedRetryAlgorithm =
342+ OperationTimedPollAlgorithm .create (
343+ RetrySettings .newBuilder ()
344+ .setInitialRetryDelay (Duration .ofMillis (500L ))
345+ .setRetryDelayMultiplier (1.5 )
346+ .setMaxRetryDelay (Duration .ofMillis (5000L ))
347+ .setInitialRpcTimeout (Duration .ZERO ) // ignored
348+ .setRpcTimeoutMultiplier (1.0 ) // ignored
349+ .setMaxRpcTimeout (Duration .ZERO ) // ignored
350+ .setTotalTimeout (Duration .ofHours (24L )) // set polling timeout to 24 hours
351+ .build ());
351352 speechSettings .longRunningRecognizeOperationSettings ().setPollingAlgorithm (timedRetryAlgorithm );
352353
353354 // Instantiates a client with GOOGLE_APPLICATION_CREDENTIALS
0 commit comments