diff --git a/speech/grpc/src/main/java/com/examples/cloud/speech/AsyncRecognizeClient.java b/speech/grpc/src/main/java/com/examples/cloud/speech/AsyncRecognizeClient.java index 2b29e68157b..9d9d5899a4b 100644 --- a/speech/grpc/src/main/java/com/examples/cloud/speech/AsyncRecognizeClient.java +++ b/speech/grpc/src/main/java/com/examples/cloud/speech/AsyncRecognizeClient.java @@ -28,10 +28,9 @@ import com.google.longrunning.OperationsGrpc; import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; import io.grpc.StatusRuntimeException; import io.grpc.auth.ClientAuthInterceptor; -import io.grpc.netty.NegotiationType; -import io.grpc.netty.NettyChannelBuilder; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; @@ -86,8 +85,7 @@ public static ManagedChannel createChannel(String host, int port) throws IOExcep GoogleCredentials creds = GoogleCredentials.getApplicationDefault(); creds = creds.createScoped(OAUTH2_SCOPES); ManagedChannel channel = - NettyChannelBuilder.forAddress(host, port) - .negotiationType(NegotiationType.TLS) + ManagedChannelBuilder.forAddress(host, port) .intercept(new ClientAuthInterceptor(creds, Executors.newSingleThreadExecutor())) .build();