You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
I have used two files of speech module namely SpeechService.java & VoiceRecorder.java.
And have used the streamingApi call as follows:
`public void startRecognizing(int sampleRate) {
if (mApi == null) {
Log.w(TAG, "API not ready. Ignoring the request.");
return;
}
System.out.println("calling api....");
// Configure the API
mRequestObserver = mApi.streamingRecognize(mResponseObserver);
mRequestObserver.onNext(StreamingRecognizeRequest.newBuilder()
.setStreamingConfig(StreamingRecognitionConfig.newBuilder()
.setConfig(RecognitionConfig.newBuilder()
.setLanguageCode(getDefaultLanguageCode())
.setEncoding(RecognitionConfig.AudioEncoding.LINEAR16)
.setSampleRateHertz(sampleRate)
.build())
.setInterimResults(true)
.setSingleUtterance(true)
.build())
.build());
}`
I am showing a progress bar until the callbacks namely are called via the StreamObserver mResponseObserver`s onNext() or orError() or OnCompleted().
But due to no response the progress bar keeps shown indefinitely so Now I need to add a timeout for this API call. With the help of which I can disable the progress bar and reset the view i.e, make the mic(for voice recording) again visible for user to try recording speech further.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have used two files of speech module namely SpeechService.java & VoiceRecorder.java.
And have used the streamingApi call as follows:
I am showing a progress bar until the callbacks namely are called via the StreamObserver mResponseObserver`s onNext() or orError() or OnCompleted().
But due to no response the progress bar keeps shown indefinitely so Now I need to add a timeout for this API call. With the help of which I can disable the progress bar and reset the view i.e, make the mic(for voice recording) again visible for user to try recording speech further.
The text was updated successfully, but these errors were encountered: