Comments (5)
@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.
@stefalbi it will help us to triage the problem if you are able to answer to a few questions below:
- Can you please confirm that the original example (without your changes) works as expected?
- 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?
- 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.
- yes, it works
- without setting VoiceActivityTimeout it does not works
- 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.
@minherz Shabir does not work on samples anymore, can you reroute? Thanks!
from java-docs-samples.
@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)
- com.example.speech.QuickstartSampleV2IT: testQuickstart failed HOT 1
- com.example.speech.TranscribeFileV2IT: testQuickstart failed HOT 1
- com.example.translate.BatchTranslateTextWithGlossaryTests: testBatchTranslateTextWithGlossary failed HOT 1
- com.example.translate.BatchTranslateTextTests: testBatchTranslateText failed HOT 1
- com.example.translate.GetSupportedLanguagesForTargetTests: testGetSupportedLanguages failed HOT 1
- com.example.translate.DeleteGlossaryTests: testDeleteGlossary failed HOT 1
- com.example.translate.BatchTranslateTextWithModelTests: testBatchTranslateTextWithModel failed HOT 1
- com.example.translate.TranslateTextTests: testTranslateText failed HOT 1
- com.example.translate.CreateGlossaryTests: testCreateGlossary failed HOT 1
- com.example.translate.TranslateTextWithGlossaryTests: testTranslateTextWithGlossary failed HOT 1
- com.example.translate.BatchTranslateTextWithGlossaryAndModelTests: testBatchTranslateTextWithGlossaryAndModel failed HOT 1
- com.example.translate.TranslateTextWithModelTests: testTranslateTextWithModel failed HOT 1
- com.example.translate.DetectLanguageTests: testDetectLanguage failed HOT 1
- com.example.translate.ListGlossariesTests: testListGlossaries failed HOT 1
- com.example.translate.GetGlossaryTests: testGetGlossary failed HOT 1
- com.example.translate.GetSupportedLanguagesTests: testGetSupportedLanguages failed HOT 1
- com.example.vision.AsyncBatchAnnotateImagesTest: testSetEndpoint failed HOT 1
- vision.snippets.ProductInProductSetManagementTests: testPurgeProductsInProductSet failed HOT 1
- vision.snippets.ProductManagementTests: testPurgeOrphanProducts failed HOT 1
- com.example.datacatalog.LookupEntryTests: testLookupPubSubTopic failed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-docs-samples.