From ed5aac388baf1702e63e1ced256250dff2bb0475 Mon Sep 17 00:00:00 2001 From: Gus Class Date: Tue, 2 May 2017 15:46:41 -0700 Subject: [PATCH] samples: Vision speech upgrade (#641) * Fixes dependencies and class package changes. * Guava exclusions so Truth doesn't conflict with Cloud Client * Upgrades vision to 0.17.1 --- vision/snippets/src/main/java/com/example/vision/Detect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vision/snippets/src/main/java/com/example/vision/Detect.java b/vision/snippets/src/main/java/com/example/vision/Detect.java index bf06b7a276d..c07bc70e7f6 100644 --- a/vision/snippets/src/main/java/com/example/vision/Detect.java +++ b/vision/snippets/src/main/java/com/example/vision/Detect.java @@ -41,7 +41,7 @@ import com.google.cloud.vision.v1.WebDetection.WebPage; import com.google.cloud.vision.v1.Word; import com.google.protobuf.ByteString; -import org.joda.time.Duration; +import org.threeten.bp.Duration; import java.io.FileInputStream; import java.io.IOException; @@ -210,7 +210,7 @@ public static void detectFacesGcs(String gcsPath, PrintStream out) throws IOExce imageAnnotatorSettingsBuilder .batchAnnotateImagesSettings() .getRetrySettingsBuilder() - .setTotalTimeout(Duration.standardSeconds(30)); + .setTotalTimeout(Duration.ofSeconds(30)); ImageAnnotatorSettings settings = imageAnnotatorSettingsBuilder.build(); ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();