Giter VIP home page Giter VIP logo

Comments (5)

minherz avatar minherz commented on June 19, 2024

@Shabirmean please, triage this issue. If the problem is with the sample, please submit a fix or comment with the problem description and/or fix suggestion

from java-docs-samples.

minherz avatar minherz commented on June 19, 2024

@stefalbi it will help us to triage the problem if you are able to answer to a few questions below:

  1. Can you please confirm that the original example (without your changes) works as expected?
  2. I assume that you added the links to this code block. Can you run your code without setting VoiceActivityTimeout and report whether you get this exception?
  3. I assume that the CancelledException is catched by the catch exception block at the end of the sample. Can you please post the full content of the exception printed by the catch block?

Thank you

from java-docs-samples.

stefalbi avatar stefalbi commented on June 19, 2024
  1. yes, it works
  2. without setting VoiceActivityTimeout it does not works
  3. I made a new test and printed the error wirh the stack trace on this method, the exception causing the CANCELLED message was an IndexOutOfBoundsException , the sample does not handle StreamingRecognizeResponse on the ResponseObserver onResponse method with empty ResultList, causing IndexOutOfBoundsException here

Here the stack tracecom.google.api.gax.rpc.CancelledException: io.grpc.StatusRuntimeException: CANCELLED: Failed to read message. at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:88) at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:41) at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:86) at com.google.api.gax.grpc.GrpcApiExceptionFactory.create(GrpcApiExceptionFactory.java:66) at com.google.api.gax.grpc.ExceptionResponseObserver.onErrorImpl(ExceptionResponseObserver.java:82) at com.google.api.gax.rpc.StateCheckingResponseObserver.onError(StateCheckingResponseObserver.java:84) at com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:148) at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39) at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23) at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40) at com.google.api.gax.grpc.ChannelPool$ReleasingClientCall$1.onClose(ChannelPool.java:541) at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489) at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453) at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486) at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:567) at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:71) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:735) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:716) at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: io.grpc.StatusRuntimeException: CANCELLED: Failed to read message. at io.grpc.Status.asRuntimeException(Status.java:539) ... 17 more Caused by: java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:4454) at com.example.speech.InfiniteStreamRecognize$1.onResponse(InfiniteStreamRecognize.java:141) at com.example.speech.InfiniteStreamRecognize$1.onResponse(InfiniteStreamRecognize.java:1) at com.google.api.gax.tracing.TracedResponseObserver.onResponse(TracedResponseObserver.java:91) at com.google.api.gax.grpc.ExceptionResponseObserver.onResponseImpl(ExceptionResponseObserver.java:74) at com.google.api.gax.rpc.StateCheckingResponseObserver.onResponse(StateCheckingResponseObserver.java:60) at com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onMessage(GrpcDirectStreamController.java:133) at io.grpc.ForwardingClientCallListener.onMessage(ForwardingClientCallListener.java:33) at io.grpc.internal.DelayedClientCall$DelayedListener.onMessage(DelayedClientCall.java:473) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:660) at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:647) ... 5 more

from java-docs-samples.

averikitsch avatar averikitsch commented on June 19, 2024

@minherz Shabir does not work on samples anymore, can you reroute? Thanks!

from java-docs-samples.

minherz avatar minherz commented on June 19, 2024

@gericdong you are listed as one of the owners of the /speech code samples. Can you please look into the info about and provide feedback about use of the modified code and a possible problem for the observed behavior?

thank you

from java-docs-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.