-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InfiniteStreamRecognize - io.grpc.StatusRuntimeException: CANCELLED: Failed to read message when EnableVoiceActivityEvents is true #8950
Comments
@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 |
@stefalbi it will help us to triage the problem if you are able to answer to a few questions below:
Thank you |
Here the stack trace |
@minherz Shabir does not work on samples anymore, can you reroute? Thanks! |
@gericdong you are listed as one of the owners of the thank you |
In which file did you encounter the issue?
https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/speech/src/main/java/com/example/speech/InfiniteStreamRecognize.java
Did you change the file? If so, how?
Added enable voice activity event option and set audio channel count to 1
RecognitionConfig recognitionConfig =
RecognitionConfig.newBuilder()
.setEncoding(RecognitionConfig.AudioEncoding.LINEAR16)
.setLanguageCode(languageCode)
.setSampleRateHertz(16000)
.setAudioChannelCount(1)
.build();
StreamingRecognitionConfig streamingRecognitionConfig =
StreamingRecognitionConfig.newBuilder()
.setConfig(recognitionConfig)
.setInterimResults(true)
.setEnableVoiceActivityEvents(true)
.setVoiceActivityTimeout(VoiceActivityTimeout.newBuilder()
.setSpeechStartTimeout(Duration.newBuilder().setSeconds(15L))
)
.build();
Describe the issue
After I receive the event SPEECH_ACTIVITY_BEGIN I get the CancelledException: Failed to read message.
The text was updated successfully, but these errors were encountered: